Skip to content

Commit

Permalink
Merge pull request #20 from privacybydesign/desired-attribute
Browse files Browse the repository at this point in the history
fix to have desired attribute in chained session (irma-demos-ops)
  • Loading branch information
saravahdatipour authored Dec 5, 2024
2 parents 6e3349a + 929dbc9 commit 519ef1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
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

0 comments on commit 519ef1d

Please sign in to comment.