simplesamlphp-module-oidc
simplesamlphp-module-oidc copied to clipboard
Show 'claims_supported' in discovery document
Find a way to show which claims are supported by OP using 'claims_supported' property in discovery document as per https://openid.net/specs/openid-connect-discovery-1_0.html
Keys from 'claim to attribute translate table' from module config file could be used, however, claim names can have type designations at the beginning...
I think (even without dealing with the type issue) you would need to get the claims from ClaimTranslatorExtractor since ClaimTranslatorExtractorFactory does all the custom scope/claim prefixing when it builds ClaimTranslatorExtractor (though I've never used the claim prefixing feature, so I easily could be wrong)
Then maybe something like this to remove the types
$claims = [];
foreach ($this->translationTable as $claimWithType) {
list($type, $claim) = $this->getTypeAndClaimName($claimWithType);
$claims[] = $claim;
}
Overall I agree with your point in #138 that maybe a different syntax for indicating type would make the code and data structures easier.
Great, thanks for sharing this option!