Skip to content

Show 'claims_supported' in discovery document #137

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

Closed
cicnavi opened this issue Sep 2, 2021 · 4 comments · Fixed by #299
Closed

Show 'claims_supported' in discovery document #137

cicnavi opened this issue Sep 2, 2021 · 4 comments · Fixed by #299
Assignees
Milestone

Comments

@cicnavi
Copy link
Collaborator

cicnavi commented Sep 2, 2021

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

@cicnavi
Copy link
Collaborator Author

cicnavi commented Sep 2, 2021

Keys from 'claim to attribute translate table' from module config file could be used, however, claim names can have type designations at the beginning...

@pradtke
Copy link
Collaborator

pradtke commented Sep 2, 2021

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.

@cicnavi
Copy link
Collaborator Author

cicnavi commented Sep 3, 2021

Great, thanks for sharing this option!

@cicnavi cicnavi added this to the v7.x milestone Feb 1, 2025
@cicnavi
Copy link
Collaborator Author

cicnavi commented Mar 28, 2025

Note to self that OpenID Federation certification tests show warning for this, as this is the recommended feature to implement by the OpenID Discovery spec:

claims_supported
RECOMMENDED. JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants