Skip to content
Snippets Groups Projects
Commit fdfd5a95 authored by Martin van Es's avatar Martin van Es
Browse files

WIP

parent 73c88cd8
Branches
No related tags found
No related merge requests found
{ {
"account1" : { "Research and Scholarship": {
"type" : "Research and Scholarship", "message": "This is the Research ad Scholarship Section",
"explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided in the 'displayname' attribute", "profiles": {
"display": "John D. Rockefeller", "account1": {
"eduPersonPrincipalName" : "jrockefeller@idp.example.org", "explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided in the 'displayname' attribute",
"displayName" : "John D. Rockefeller", "display": "John D. Rockefeller",
"mail" : "John.D.Rockefeller@idp.example.org" "eduPersonPrincipalName": "jrockefeller@idp.example.org",
}, "displayName": "John D. Rockefeller",
"account2" : { "mail": "John.D.Rockefeller@idp.example.org"
"type" : "Research and Scholarship", },
"explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided in both a 'displayname' attribute as well as seperate 'surname' and 'givenname' attributes", "account2": {
"display": "Georg Ohm", "explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided in both a 'displayname' attribute as well as seperate 'surname' and 'givenname' attributes",
"eduPersonPrincipalName" : "g_ohm@idp.example.org", "display": "Georg Ohm",
"displayName" : "Georg Ohm", "eduPersonPrincipalName": "g_ohm@idp.example.org",
"givenName" : "Georg", "displayName": "Georg Ohm",
"sn" : "Ohm", "givenName": "Georg",
"mail" : "georg.ohm@idp.example.org" "sn": "Ohm",
}, "mail": "georg.ohm@idp.example.org"
"account3" : { },
"type" : "Research and Scholarship", "account3": {
"explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided as seperate 'surname' and 'givenname' attributes. In addition the users affiliations are provided in the 'eduPersonScopedAffiliation' attribute", "explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided as seperate 'surname' and 'givenname' attributes. In addition the users affiliations are provided in the 'eduPersonScopedAffiliation' attribute",
"display": "Joseph Weeler", "display": "Joseph Weeler",
"eduPersonPrincipalName" : "jweeler@idp.example.org", "eduPersonPrincipalName": "jweeler@idp.example.org",
"givenName" : "Joseph", "givenName": "Joseph",
"sn" : "Weeler", "sn": "Weeler",
"mail" : "joseph.weeler@idp.example.org", "mail": "joseph.weeler@idp.example.org",
"eduPersonScopedAffiliation" : ["member@idp.example.org", "student@idp.example.org"] "eduPersonScopedAffiliation": [
}, "member@idp.example.org",
"account4" : { "student@idp.example.org"
"type" : "Research and Scholarship", ]
"explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided as seperate 'surname' and 'givenname' attributes. Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point", },
"display": "Anthony West", "account4": {
"eduPersonPrincipalName" : "awest@idp.example.org", "explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided as seperate 'surname' and 'givenname' attributes. Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point",
"eduPersonTargetedID" : "bd09168cf0c2e675b2def0ade6f50b7d4bb4aae", "display": "Anthony West",
"givenName" : "Anthony", "eduPersonPrincipalName": "awest@idp.example.org",
"sn" : "West", "eduPersonTargetedID": "bd09168cf0c2e675b2def0ade6f50b7d4bb4aae",
"mail" : "anthony.west@idp.example.org", "givenName": "Anthony",
"eduPersonScopedAffiliation" : ["member@idp.example.org", "employee@idp.example.org", "faculty@idp.example.org"] "sn": "West",
}, "mail": "anthony.west@idp.example.org",
"account5" : { "eduPersonScopedAffiliation": [
"type" : "Research and Scholarship", "member@idp.example.org",
"explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided in the displayname attribute. Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point", "employee@idp.example.org",
"display": "Ben Bernanke", "faculty@idp.example.org"
"eduPersonPrincipalName" : "bbernanke@idp.example.org", ]
"eduPersonTargetedId" : "bbernanke@idp.example.org", },
"displayName" : "Ben Bernanke", "account5": {
"mail" : "bbernanke@idp.example.org" "explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided in the displayname attribute. Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point",
}, "display": "Ben Bernanke",
"account6" : { "eduPersonPrincipalName": "bbernanke@idp.example.org",
"type" : "Research and Scholarship", "eduPersonTargetedId": "bbernanke@idp.example.org",
"explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided as seperate 'surname' and 'givenname' attributes. Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point", "displayName": "Ben Bernanke",
"display": "Alan Greenspan", "mail": "bbernanke@idp.example.org"
"eduPersonPrincipalName" : "agreenspan@idp.example.org", },
"eduPersonTargetedId" : "agreenspan@idp.example.org", "account6": {
"givenName" : "Alan", "explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided as seperate 'surname' and 'givenname' attributes. Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point",
"sn" : "Greenspan", "display": "Alan Greenspan",
"mail" : "agreenspan6@idp.example.org" "eduPersonPrincipalName": "agreenspan@idp.example.org",
}, "eduPersonTargetedId": "agreenspan@idp.example.org",
"account7" : { "givenName": "Alan",
"type" : "Research and Scholarship", "sn": "Greenspan",
"explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided in the displayname attribute. Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point. In addition the users affiliations are provided in the 'eduPersonScopedAffiliation' attribute", "mail": "agreenspan6@idp.example.org"
"display": "André-Marie Ampère", },
"eduPersonPrincipalName" : "am_ampere@idp.example.org", "account7": {
"eduPersonTargetedId" : "am_ampere@idp.example.org", "explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided in the displayname attribute. Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point. In addition the users affiliations are provided in the 'eduPersonScopedAffiliation' attribute",
"displayName" : "André-Marie Ampère", "display": "André-Marie Ampère",
"mail" : "am_ampere@idp.example.org", "eduPersonPrincipalName": "am_ampere@idp.example.org",
"eduPersonScopedAffiliation" : ["employee@idp.example.org", "staff@idp.example.org", "member@idp.example.org", "student@idp.example.org"] "eduPersonTargetedId": "am_ampere@idp.example.org",
}, "displayName": "André-Marie Ampère",
"account8" : { "mail": "am_ampere@idp.example.org",
"type" : "Research and Scholarship", "eduPersonScopedAffiliation": [
"explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided as seperate 'surname' and 'givenname' attributes.Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point. In addition the users affiliations are provided in the 'eduPersonScopedAffiliation' attribute", "employee@idp.example.org",
"display": "Wilhelm Röntgen", "staff@idp.example.org",
"eduPersonPrincipalName" : "w_rontgen@idp.example.org", "member@idp.example.org",
"eduPersonTargetedId" : "w_rontgen@idp.example.org", "student@idp.example.org"
"givenName" : "Wilhelm", ]
"sn" : "Röntgen", },
"mail" : "w_rontgen@idp.example.org", "account8": {
"eduPersonScopedAffiliation" : ["employee@idp.example.org", "staff@idp.example.org", "member@idp.example.org", "student@idp.example.org"] "explanation": "This profile provides a R&S compatible attribute bundle with the name of the user name being provided as seperate 'surname' and 'givenname' attributes.Please note the usage of both 'eduPersonPrincipalName' as well as 'eduPersonTargetedID' which suggest the 'eduPersonPrincipalName' may not be a stable identifier, but may be reassigned at some point. In addition the users affiliations are provided in the 'eduPersonScopedAffiliation' attribute",
}, "display": "Wilhelm Röntgen",
"account9" : { "eduPersonPrincipalName": "w_rontgen@idp.example.org",
"type": "Custom attributes", "eduPersonTargetedId": "w_rontgen@idp.example.org",
"explanation": "More expansive attribute list", "givenName": "Wilhelm",
"display": "Joseph Stiglitz", "sn": "Röntgen",
"uid" : ["jstiglitz"], "mail": "w_rontgen@idp.example.org",
"schacHomeOrganization" : "harvard-example.edu", "eduPersonScopedAffiliation": [
"eduPersonPrincipalName" : "stiglitz@harvard-example.edu", "employee@idp.example.org",
"cn" : "Joseph Eugene Stiglitz", "staff@idp.example.org",
"givenName" : "Joseph", "member@idp.example.org",
"sn" : "Stiglitz", "student@idp.example.org"
"displayName" : "Joseph Stiglitz", ]
"mail" : "stiglitz@harvard-example.edu", }
"homePhone" : "+1 827 675 3232", }
"eduPersonOrcid" : "http://orcid.org/0000-1111-2222-3333", },
"eduPersonAffiliation" : ["member", "student"], "Custom attributes": {
"eduPersonScopedAffiliation" : ["employee@harvard-example.edu", "faculty@harvard-example.edu", "member@harvard-example.edu"], "message": "This is the Custom attributes Section",
"isMemberOf" : "urn:collab:org:aarc-project.eu" "profiles": {
}, "account9": {
"account10" : { "explanation": "More expansive attribute list",
"type": "Behaviour tests", "display": "Joseph Stiglitz",
"explanation": "Test - multi-valued mail attribute.", "uid": [
"display": "Jordan R. Belfort", "jstiglitz"
"uid" : ["belfort"], ],
"schacHomeOrganization" : "harvard-example.edu", "schacHomeOrganization": "harvard-example.edu",
"eduPersonPrincipalName" : "belfort@harvard-example.edu", "eduPersonPrincipalName": "stiglitz@harvard-example.edu",
"cn" : "Jordan Ross Belfort", "cn": "Joseph Eugene Stiglitz",
"givenName" : "Jordan", "givenName": "Joseph",
"sn" : "Belfort", "sn": "Stiglitz",
"displayName" : "Jordan R. Belfort", "displayName": "Joseph Stiglitz",
"mail" : ["Jordan.Belfort@harvard-example.edu", "jordan@harvard-example.edu"], "mail": "stiglitz@harvard-example.edu",
"eduPersonAffiliation" : ["employee", "faculty", "member"], "homePhone": "+1 827 675 3232",
"eduPersonScopedAffiliation" : ["employee@harvard-example.edu", "faculty@harvard-example.edu", "member@harvard-example.edu"], "eduPersonOrcid": "http://orcid.org/0000-1111-2222-3333",
"eduPersonEntitlement" : "urn:mace:dir:entitlement:common-lib-terms-example", "eduPersonAffiliation": [
"isMemberOf" : "urn:collab:org:aarc-project.eu" "member",
}, "student"
"account11" : { ],
"type": "Behaviour tests", "eduPersonScopedAffiliation": [
"explanation": "Test - No member affiliation ind eduPersonAffiliation.", "employee@harvard-example.edu",
"display": "Steve Wynn", "faculty@harvard-example.edu",
"uid" : ["wynn"], "member@harvard-example.edu"
"schacHomeOrganization" : "harvard-example.edu", ],
"eduPersonPrincipalName" : "wynn@harvard-example.edu", "isMemberOf": "urn:collab:org:aarc-project.eu"
"cn" : "Steve Alen Wynn", }
"givenName" : "Steve", }
"sn" : "Wynn", },
"displayName" : "Steve Wynn", "Behaviour tests": {
"mail" : ["S.Wynn@harvard-example.edu", "Steve.Wynn@example-casino.com", "steve.Wynn@las.vegas.com"], "message": "This is the beahaviour tests Section",
"eduPersonAffiliation" : ["employee", "faculty"], "profiles": {
"eduPersonScopedAffiliation" : ["employee@harvard-example.edu", "faculty@harvard-example.edu", "member@harvard-example.edu"], "account10": {
"eduPersonEntitlement" : "urn:mace:dir:entitlement:common-lib-terms-example", "explanation": "Test - multi-valued mail attribute.",
"isMemberOf" : "urn:collab:org:aarc-project.eu" "display": "Jordan R. Belfort",
}, "uid": [
"account12" : { "belfort"
"type": "Behaviour tests", ],
"explanation": "Test - Incorrect domain scope for Home organisation", "schacHomeOrganization": "harvard-example.edu",
"display": "Isaac Newton", "eduPersonPrincipalName": "belfort@harvard-example.edu",
"uid" : ["isaac"], "cn": "Jordan Ross Belfort",
"schacHomeOrganization" : "university-example.org", "givenName": "Jordan",
"eduPersonPrincipalName" : "isaac@university-example.edu", "sn": "Belfort",
"cn" : "Sir Isaac Newton", "displayName": "Jordan R. Belfort",
"givenName" : "Isaac", "mail": [
"sn" : "Newton", "Jordan.Belfort@harvard-example.edu",
"displayName" : "Isaac Newton", "jordan@harvard-example.edu"
"mail" : ["isaacnewton@university-example.org", "newton@university-example.org"], ],
"eduPersonScopedAffiliation" : ["employee@huniversity-example.org", "faculty@university-example.org", "member@university-example.org"], "eduPersonAffiliation": [
"eduPersonEntitlement" : "urn:mace:dir:entitlement:common-lib-terms-example", "employee",
"isMemberOf" : "urn:collab:org:aarc-project.eu" "faculty",
}, "member"
"account13" : { ],
"type": "Behaviour tests", "eduPersonScopedAffiliation": [
"explanation": "Test - Invalid email address, note that ePPN is NOT an email adress, so having multiple @ signs is allowed", "employee@harvard-example.edu",
"display": "Oscar Burton", "faculty@harvard-example.edu",
"uid" : ["oburton"], "member@harvard-example.edu"
"schacHomeOrganization" : "university-example.org", ],
"eduPersonPrincipalName" : "o@burton@university-example.org", "eduPersonEntitlement": "urn:mace:dir:entitlement:common-lib-terms-example",
"cn" : "Oscar Burton", "isMemberOf": "urn:collab:org:aarc-project.eu"
"givenName" : "Oscar", },
"sn" : "Burton", "account11": {
"displayName" : "Oscar Burton", "explanation": "Test - No member affiliation ind eduPersonAffiliation.",
"mail" : "o@burton@university-example.edu", "display": "Steve Wynn",
"eduPersonAffiliation" : ["employee", "member", "staff"], "uid": [
"eduPersonScopedAffiliation" : ["employee@huniversity-example.org", "staff@university-example.org", "member@university-example.org"], "wynn"
"isMemberOf" : "urn:collab:org:aarc-project.eu" ],
}, "schacHomeOrganization": "harvard-example.edu",
"eduPersonPrincipalName": "wynn@harvard-example.edu",
"account14" : { "cn": "Steve Alen Wynn",
"type": "Behaviour tests", "givenName": "Steve",
"explanation": "Test - Invalid ePPN", "sn": "Wynn",
"display": "Nikola Tesla", "displayName": "Steve Wynn",
"uid" : ["n_tesla"], "mail": [
"schacHomeOrganization" : "university-example.org", "S.Wynn@harvard-example.edu",
"eduPersonPrincipalName" : "n_tesla@university-example.edu", "Steve.Wynn@example-casino.com",
"cn" : "Nikola Tesla", "steve.Wynn@las.vegas.com"
"givenName" : "Nikola", ],
"sn" : "Tesla", "eduPersonAffiliation": [
"displayName" : "Nikola Tesla", "employee",
"mail" : "n_tesla@university-example.org", "faculty"
"eduPersonAffiliation" : ["employee", "member", "staff"], ],
"eduPersonScopedAffiliation" : ["employee@huniversity-example.org", "staff@university-example.org", "member@university-example.org"], "eduPersonScopedAffiliation": [
"isMemberOf" : "urn:collab:org:aarc-project.eu" "employee@harvard-example.edu",
}, "faculty@harvard-example.edu",
"member@harvard-example.edu"
"account15" : { ],
"type": "Behaviour tests", "eduPersonEntitlement": "urn:mace:dir:entitlement:common-lib-terms-example",
"explanation": "Test - Member only", "isMemberOf": "urn:collab:org:aarc-project.eu"
"display": "Steve Jobs", },
"uid" : ["s_jobs"], "account12": {
"schacHomeOrganization" : "idp.example.org", "explanation": "Test - Incorrect domain scope for Home organisation",
"eduPersonPrincipalName" : "student1@idp.example.org", "display": "Isaac Newton",
"cn" : "Steven Paul Jobs", "uid": [
"givenName" : "Steve", "isaac"
"sn" : "Jobs", ],
"displayName" : "Steve Jobs", "schacHomeOrganization": "university-example.org",
"mail" : "steve.jobs@idp.example.org", "eduPersonPrincipalName": "isaac@university-example.edu",
"eduPersonAffiliation" : ["member"], "cn": "Sir Isaac Newton",
"eduPersonScopedAffiliation" : ["member@idp.example.org"], "givenName": "Isaac",
"isMemberOf" : "urn:collab:org:aarc-project.eu" "sn": "Newton",
}, "displayName": "Isaac Newton",
"account16" : { "mail": [
"type": "Behaviour tests", "isaacnewton@university-example.org",
"explanation": "Test - Non human-friendly ePPN", "newton@university-example.org"
"display": "Bill Gates", ],
"uid" : ["FyHah7$J"], "eduPersonScopedAffiliation": [
"schacHomeOrganization" : "idp.example.org", "employee@huniversity-example.org",
"eduPersonPrincipalName" : "FyHah7$J@idp.example.org", "faculty@university-example.org",
"cn" : "William Henry Gates III", "member@university-example.org"
"givenName" : "Bill", ],
"sn" : "Gates", "eduPersonEntitlement": "urn:mace:dir:entitlement:common-lib-terms-example",
"displayName" : "Bill Gates", "isMemberOf": "urn:collab:org:aarc-project.eu"
"mail" : "bill.gates@example.org", },
"eduPersonAffiliation" : ["student", "member"], "account13": {
"eduPersonScopedAffiliation" : ["member@idp.example.org", "student@idp.example.org"], "explanation": "Test - Invalid email address, note that ePPN is NOT an email adress, so having multiple @ signs is allowed",
"isMemberOf" : "urn:collab:org:aarc-project.eu" "display": "Oscar Burton",
}, "uid": [
"account17" : { "oburton"
"type": "Behaviour tests", ],
"explanation": "Test - Blank attribute values", "schacHomeOrganization": "university-example.org",
"display": "Michael Faraday", "eduPersonPrincipalName": "o@burton@university-example.org",
"uid" : ["m_faraday"], "cn": "Oscar Burton",
"schacHomeOrganization" : "idp.example.org", "givenName": "Oscar",
"eduPersonPrincipalName" : "m_faraday@idp.example.org", "sn": "Burton",
"cn" : "", "displayName": "Oscar Burton",
"givenName" : "", "mail": "o@burton@university-example.edu",
"sn" : "Faraday", "eduPersonAffiliation": [
"displayName" : "Michael Faraday", "employee",
"mail" : "m_faraday@idp.example.org", "member",
"eduPersonAffiliation" : ["member", "student"], "staff"
"eduPersonScopedAffiliation" : ["member@idp.example.org", "student@idp.example.org"], ],
"isMemberOf" : "urn:collab:org:aarc-project.eu" "eduPersonScopedAffiliation": [
}, "employee@huniversity-example.org",
"account18" : { "staff@university-example.org",
"type": "Behaviour tests", "member@university-example.org"
"explanation": "Test - Inconsistant user name", ],
"display": "Godfried Viggo", "isMemberOf": "urn:collab:org:aarc-project.eu"
"uid" : ["viggo7"], },
"schacHomeOrganization" : "unidenmark-example.dk", "account14": {
"eduPersonPrincipalName" : "viggo7@unidenmark-example.dk", "explanation": "Test - Invalid ePPN",
"cn" : "Christian Godfried Viggo Lind", "display": "Nikola Tesla",
"givenName" : "Godfried", "uid": [
"sn" : "Viggo", "n_tesla"
"displayName" : "Godfried Viggo", ],
"mail" : "Godfried.Viggo@unidenmark-example.dk", "schacHomeOrganization": "university-example.org",
"eduPersonAffiliation" : "student", "eduPersonPrincipalName": "n_tesla@university-example.edu",
"eduPersonScopedAffiliation" : ["student@unidenmark-example.dk"], "cn": "Nikola Tesla",
"isMemberOf" : "urn:collab:org:aarc-project.eu" "givenName": "Nikola",
}, "sn": "Tesla",
"account19" : { "displayName": "Nikola Tesla",
"type": "Behaviour tests", "mail": "n_tesla@university-example.org",
"explanation": "Test - non-ASCII UTF-8 common name ", "eduPersonAffiliation": [
"display": "Daisuke Takahashi", "employee",
"uid" : ["U3342109"], "member",
"schacHomeOrganization" : "exchange-example.edu", "staff"
"eduPersonPrincipalName" : "U3342109@exchange-example.edu", ],
"cn" : "Daisuke Takahashi, 髙橋 大輔", "eduPersonScopedAffiliation": [
"givenName" : "Daisuke", "employee@huniversity-example.org",
"sn" : "Takahashi", "staff@university-example.org",
"displayName" : "Daisuke Takahashi", "member@university-example.org"
"mail" : "U3342109@exchange-example.edu", ],
"eduPersonAffiliation" : ["member", "student"], "isMemberOf": "urn:collab:org:aarc-project.eu"
"eduPersonScopedAffiliation" : ["member@exchange-example.edu", "student@exchange-example.edu"], },
"isMemberOf" : ["urn:collab:org:exchange-university.org", "urn:collab:org:home-university.org"] "account15": {
}, "explanation": "Test - Member only",
"display": "Steve Jobs",
"account20" : { "uid": [
"type": "Behaviour tests", "s_jobs"
"explanation": "Test - Diacritical marks", ],
"display": "Martin N. Jørgensen", "schacHomeOrganization": "idp.example.org",
"uid" : ["jorgensen"], "eduPersonPrincipalName": "student1@idp.example.org",
"schacHomeOrganization" : "stockholmuni-example.se", "cn": "Steven Paul Jobs",
"eduPersonPrincipalName" : "jorgensen@stockholmuni-example.se", "givenName": "Steve",
"cn" : "Martin Nikolaus Jørgensen", "sn": "Jobs",
"givenName" : "Martin", "displayName": "Steve Jobs",
"sn" : "Jørgensen", "mail": "steve.jobs@idp.example.org",
"displayName" : "Martin N. Jørgensen", "eduPersonAffiliation": [
"mail" : "jorgensen07@stockholmuni-example.se", "member"
"eduPersonAffiliation" : ["member", "student"], ],
"eduPersonScopedAffiliation" : ["member@stockholmuni-example.se", "student@stockholmuni-example.se"], "eduPersonScopedAffiliation": [
"isMemberOf" : "urn:collab:org:sunet-example.se" "member@idp.example.org"
} ],
"isMemberOf": "urn:collab:org:aarc-project.eu"
},
"account16": {
"explanation": "Test - Non human-friendly ePPN",
"display": "Bill Gates",
"uid": [
"FyHah7$J"
],
"schacHomeOrganization": "idp.example.org",
"eduPersonPrincipalName": "FyHah7$J@idp.example.org",
"cn": "William Henry Gates III",
"givenName": "Bill",
"sn": "Gates",
"displayName": "Bill Gates",
"mail": "bill.gates@example.org",
"eduPersonAffiliation": [
"student",
"member"
],
"eduPersonScopedAffiliation": [
"member@idp.example.org",
"student@idp.example.org"
],
"isMemberOf": "urn:collab:org:aarc-project.eu"
},
"account17": {
"explanation": "Test - Blank attribute values",
"display": "Michael Faraday",
"uid": [
"m_faraday"
],
"schacHomeOrganization": "idp.example.org",
"eduPersonPrincipalName": "m_faraday@idp.example.org",
"cn": "",
"givenName": "",
"sn": "Faraday",
"displayName": "Michael Faraday",
"mail": "m_faraday@idp.example.org",
"eduPersonAffiliation": [
"member",
"student"
],
"eduPersonScopedAffiliation": [
"member@idp.example.org",
"student@idp.example.org"
],
"isMemberOf": "urn:collab:org:aarc-project.eu"
},
"account18": {
"explanation": "Test - Inconsistant user name",
"display": "Godfried Viggo",
"uid": [
"viggo7"
],
"schacHomeOrganization": "unidenmark-example.dk",
"eduPersonPrincipalName": "viggo7@unidenmark-example.dk",
"cn": "Christian Godfried Viggo Lind",
"givenName": "Godfried",
"sn": "Viggo",
"displayName": "Godfried Viggo",
"mail": "Godfried.Viggo@unidenmark-example.dk",
"eduPersonAffiliation": "student",
"eduPersonScopedAffiliation": [
"student@unidenmark-example.dk"
],
"isMemberOf": "urn:collab:org:aarc-project.eu"
},
"account19": {
"explanation": "Test - non-ASCII UTF-8 common name ",
"display": "Daisuke Takahashi",
"uid": [
"U3342109"
],
"schacHomeOrganization": "exchange-example.edu",
"eduPersonPrincipalName": "U3342109@exchange-example.edu",
"cn": "Daisuke Takahashi, 髙橋 大輔",
"givenName": "Daisuke",
"sn": "Takahashi",
"displayName": "Daisuke Takahashi",
"mail": "U3342109@exchange-example.edu",
"eduPersonAffiliation": [
"member",
"student"
],
"eduPersonScopedAffiliation": [
"member@exchange-example.edu",
"student@exchange-example.edu"
],
"isMemberOf": [
"urn:collab:org:exchange-university.org",
"urn:collab:org:home-university.org"
]
},
"account20": {
"explanation": "Test - Diacritical marks",
"display": "Martin N. Jørgensen",
"uid": [
"jorgensen"
],
"schacHomeOrganization": "stockholmuni-example.se",
"eduPersonPrincipalName": "jorgensen@stockholmuni-example.se",
"cn": "Martin Nikolaus Jørgensen",
"givenName": "Martin",
"sn": "Jørgensen",
"displayName": "Martin N. Jørgensen",
"mail": "jorgensen07@stockholmuni-example.se",
"eduPersonAffiliation": [
"member",
"student"
],
"eduPersonScopedAffiliation": [
"member@stockholmuni-example.se",
"student@stockholmuni-example.se"
],
"isMemberOf": "urn:collab:org:sunet-example.se"
}
}
}
} }
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<title>customauth login page</title>
</head>
<body>
<h1>CustomAuth login page</h1>
<form method="post" action="?">
<p><b>Choose User profile</b><p>
<?php
foreach ($this->data['users'] as $user => $values) {
echo "<input type=radio name=username value='$user'> " . $values['displayName'] . "<br>\n";
}
?>
<p><b>Choose attributes</b></p>
<div style="float: left" id="attributes"></div>
<div id="explanation"></div><br style="clear: both" />
<p><b>Released attributes</b></p>
<div id="output"></div>
<input type="hidden" name="ReturnTo" value="<?= htmlspecialchars($this->data['returnTo']) ?>">
<p><input type="submit" value="Log in"></p>
</form>
</body>
<script>
var users = [];
var keys = [];
var user = '';
<?php
foreach ($this->data['users'] as $user => $values) {
echo "users['$user'] = [];\n";
foreach ($values as $key => $value) {
echo "users['$user']['$key'] = '$value';\n";
echo "keys['$key'] = true;";
}
}
?>
function update() {
var html = "";
for (let key in users[user]) {
if (keys[key]) {
html += key + ": " + users[user][key] + "<br />\n";
}
}
$('#output').html(html);
};
$('input[type=radio][name=username]').change(function() {
var attributes = "";
user = this.value;
for (let key in users[user]) {
attribute = users[user][key];
attributes += "<input id=chkbx_" + key + " type=checkbox name=keys[" + key + "] " + (keys[key]?'checked':'') + ">" + key + "<br>\n";
};
$('#attributes').html(attributes);
$('#explanation').html('');
$('input[id^=chkbx_]').change(function() {
var key = this.name.slice(5,-1);
keys[key] = this.checked;
if (this.checked) $('#explanation').html('Ah! You enabled ' + key + '!<br />\nIt\'s allways good to enable ' + key + ', because it\'s good you know!');
else $('#explanation').html('Never disable ' + key + '! You should leave it there.<br />No good will come from disabling ' + key + '!');
});
update();
});
//$('#attributes').change(update);
$('#attributes').change(function() {
update();
});
</script>
</html>
...@@ -23,25 +23,32 @@ ...@@ -23,25 +23,32 @@
<form method="post" action="?"> <form method="post" action="?">
<p><hr/><b>Choose User profile</b></p> <p><hr/><b>Choose User profile</b></p>
<div style="float:left; margin-right: 10px"> <div style="float:left; margin-right: 10px">
<select name=username size=5> <select name=username size=5 style='width: 250px;'>
<?php <?php
foreach ($this->data['users'] as $user => $values) { $first = true;
$uarr = explode(':', $user); $users = $this->data['users'];
$uid = $uarr[0]; $displays = $this->data['displays'];
$display = $this->data['displays'][$user]; $categories = $this->data['categories'];
echo "<option name=\"$uid\" value=\"$uid\">$display</option>\n"; foreach ($categories as $category => $cat) {
if (!$first) echo "<option></option>\n"; $first = false;
echo "<option value=\"$category\">--- $category ---</option>\n";
foreach ($cat['users'] as $user) {
$display = $displays[$user];
echo "<option name=\"$user\" value=\"$user\">$display</option>\n";
}
} }
?> ?>
<option></option>
<option value="Error Scenarios">--- Error Scenarios ---</option>
<option value="error">SAML Error</option>
</select> </select>
</div> </div>
<div id="explanation">Woohaa!</div><br style="clear: both" /> <div id="explanation" style='display: grid'>Woohaa!</div><br style="clear: both" />
<p><hr/><b>Choose attributes</b></p> <p><hr/><b>Choose attributes</b></p>
<div style="float: left" id="attributes"></div> <div style="float: left" id="attributes"></div>
<div id="about"></div><br style="clear: both" /> <div id="about"></div><br style="clear: both" />
<p><hr/><b>Released attributes</b></p> <p><hr/><b>Released attributes</b></p>
<div id="output"></div> <div id="output"></div>
<p><hr/><b>Special</b></p>
<div><input type="checkbox" name="error" value="true"> Create SAML Error Response</div>
<input type="hidden" name="ReturnTo" value="<?= htmlspecialchars($this->data['returnTo']) ?>"> <input type="hidden" name="ReturnTo" value="<?= htmlspecialchars($this->data['returnTo']) ?>">
<p><input id="submit_button" class="btn" type="submit" value="Log in"></p> <p><input id="submit_button" class="btn" type="submit" value="Log in"></p>
</form> </form>
...@@ -69,11 +76,14 @@ ...@@ -69,11 +76,14 @@
} }
?> ?>
explanations['Error Scenarios'] = "These are the Error Scenarios";
explanations['error'] = "This generates a SAML Error";
function update() { function update() {
var html = ""; var html = "";
for (let key in users[user]) { for (let key in users[user]) {
if (keys[key]) { if (keys[key]) {
html += key + ": " + users[user][key] + "<br />\n"; html += "<b>" + key + "</b>: " + users[user][key] + "<br />\n";
} }
} }
$('#output').html(html); $('#output').html(html);
...@@ -84,7 +94,7 @@ ...@@ -84,7 +94,7 @@
user = this.value; user = this.value;
for (let key in users[user]) { for (let key in users[user]) {
attribute = users[user][key]; attribute = users[user][key];
attributes += "<input id=chkbx_" + key + " type=checkbox name=keys[" + key + "] " + (keys[key]?'checked':'') + ">" + key + "<br>\n"; attributes += "<input id=chkbx_" + key + " type=checkbox name=keys[" + key + "] " + (keys[key]?'checked':'') + " value='" + users[user][key] + "'><span title='" + message[key] + "'>" + key + "</span><br>\n";
}; };
$('#explanation').html(explanations[user]); $('#explanation').html(explanations[user]);
$('#attributes').html(attributes); $('#attributes').html(attributes);
......
...@@ -42,34 +42,35 @@ $attributes = json_decode(file_get_contents('/opt/simplesamlphp/config/attribute ...@@ -42,34 +42,35 @@ $attributes = json_decode(file_get_contents('/opt/simplesamlphp/config/attribute
$users = []; $users = [];
$explanations = []; $explanations = [];
$displays = []; $displays = [];
foreach ($raw_users as $user => $values) { $categories = [];
foreach ($raw_users as $category => $cat) {
$categories[$category]['name'] = $category;
$explanations[$category] = $cat['message'];
foreach ($cat['profiles'] as $user => $values) {
$categories[$category]['users'][] = $user;
$explanations[$user] = $values['explanation']; $explanations[$user] = $values['explanation'];
$displays[$user] = $values['display']; $displays[$user] = $values['display'];
$type[$user] = $values['type'];
unset($values['explanation']); unset($values['explanation']);
unset($values['display']); unset($values['display']);
unset($values['type']);
$users[$user] = $values; $users[$user] = $values;
}
} }
// time to handle login responses; since this is a dummy example, we accept any data // time to handle login responses; since this is a dummy example, we accept any data
$badUserPass = false; $badUserPass = false;
if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = (string) $_REQUEST['username'];
$user_aa = $users[$username];
if (!session_id()) { if (!session_id()) {
// session_start not called before. Do it here. // session_start not called before. Do it here.
session_start(); session_start();
} }
foreach ($user_aa as $key => $value) { $attributes = @$_POST['keys'] or [];
if (isset($_POST['keys'][$key])) {
$_SESSION['attributes'][$key] = $value; foreach ($attributes as $key => $value) {
} $_SESSION['attributes'][$key] = $value;
} }
if (isset($_POST['error'])) {
$username = (string) $_REQUEST['username'];
if ($username == 'error') {
$_SESSION['ErrorResponse'] = TRUE; $_SESSION['ErrorResponse'] = TRUE;
} }
...@@ -83,5 +84,6 @@ $t->data['users'] = $users; ...@@ -83,5 +84,6 @@ $t->data['users'] = $users;
$t->data['attributes'] = $attributes; $t->data['attributes'] = $attributes;
$t->data['explanations'] = $explanations; $t->data['explanations'] = $explanations;
$t->data['displays'] = $displays; $t->data['displays'] = $displays;
$t->data['categories'] = $categories;
$t->data['returnTo'] = $returnTo; $t->data['returnTo'] = $returnTo;
$t->show(); $t->show();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment