-
Notifications
You must be signed in to change notification settings - Fork 29
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
Cie UserInfoResponse does not respect scopes #293
Comments
yes at time of the development of this toolchain the cie specifications was in progress, and the feature you have described is something that was defined later on I'll keep this for the next milestones, thx |
Thanks for the response. Until then I've got around with a quick&dirty implementation which maybe can help others
|
please do that in a PR and I'll review, approve and we'll have a new release together in a settings.py like this https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/provider/settings.py create a mapping of the scopes2claims
then in the code do something like this
try to use the local app settings defaults (overloadable also in the settings project) to reduce the constants in the code |
It looks like the userInfo response supports only claims explicitly requested. When the authorization request contains
scope=openid profile
and noclaims
both idToken and userInfo should report the "standard" profile, as per specFrom https://docs.italia.it/italia/spid/spid-cie-oidc-docs/it/versione-corrente/authorization_endpoint.html#parametri-scope-e-claims
It looks like the code simply picks explicitly requested claims from attributes with matching names
spid-cie-oidc-django/spid_cie_oidc/provider/views/userinfo_endpoint.py
Line 78 in 2b0c2ef
Maybe related #271
The text was updated successfully, but these errors were encountered: