Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix to have desired attribute in chained session (irma-demos-ops) #20

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
define('API_TOKEN', getenv('API_TOKEN') ?: '');
define('DEMO', false);
define('JWT_ENABLED', getenv('JWT_ENABLED')?: false);
define('DESIRED_ATTRIBUTE_TO_DISCLOSE', getenv('DESIRED_ATTRIBUTE_TO_DISCLOSE') ?: '');


if (DEMO) {
define('ISSUER', 'irma-demo');
define('SCHEME', 'irma-demo');
define('BASE_URL', 'http://localhost:8080');
define('IRMATUBE_NEXT_SESSION_URL', BASE_URL . '/get_session_request.php');
define('IRMATUBE_CREDENTIAL', 'irma-demo.IRMATube.member');
} else {
define('ISSUER',getenv('ISSUER') ?: 'pbdf');
define('SCHEME',getenv('SCHEME') ?: 'pbdf');
define('BASE_URL', getenv('BASE_URL') ?: 'https://privacybydesign.foundation');
define('IRMATUBE_NEXT_SESSION_URL',getenv('IRMATUBE_NEXT_SESSION_URL') ?: BASE_URL . '/get_session_request.php');
define('IRMATUBE_CREDENTIAL', getenv('IRMATUBE_CREDENTIAL') ?: 'pbdf.pbdf.irmatube');
Expand Down
7 changes: 4 additions & 3 deletions start_session.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@
'disclose' => [
array_merge(
[
[ISSUER .'.pbdf.linkedin.familyname'],
[ISSUER .'.gemeente.personalData.fullname'],
[SCHEME .'.pbdf.linkedin.familyname'],
[SCHEME .'.gemeente.personalData.fullname'],
DESIRED_ATTRIBUTE_TO_DISCLOSE ? [SCHEME . DESIRED_ATTRIBUTE_TO_DISCLOSE] : [],
],
ISSUER === 'pbdf' ? [
SCHEME === 'pbdf' ? [
['pbdf.pilot-amsterdam.idcard.surname'],
['pbdf.pilot-amsterdam.passport.surname'],
] : [] // These credential types have no equivalent in irma-demo
Expand Down
Loading