juanifioren / django-oidc-provider

OpenID Connect and OAuth2 provider implementation for Djangonauts.
http://django-oidc-provider.readthedocs.org
MIT License
416 stars 239 forks source link

Send standard claims in token view #406

Open mastnym opened 1 year ago

mastnym commented 1 year ago

If sending claims in token view is allowed in settings, there is a piece of code which checks if there are any extra scope claims. If so, it sends these, otherwise it sends standard claims: https://github.com/juanifioren/django-oidc-provider/blob/master/oidc_provider/lib/utils/token.py#L57

On the other hand, at userinfo endpoint, standard claims are sent automatically and extra claims are added if defined. IMHO, same scenario should be applied to token endpoint as well. Send standard claims and if there are extra claims defined, send those too.