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

Authorize Endpoint expires_in Parameter does not use OIDC_IDTOKEN_EXPIRE for ID Tokens #390

Open hi5grant opened 3 years ago

hi5grant commented 3 years ago

While using the id_token client response type, I planned to save the expires_in redirect uri parameter to reference how long I should cache my returned ID token. However I saw the token expired sooner than what was returned in the redirect param. I looked through the code for the authorize endpoint and saw the OIDC_TOKEN_EXPIRE setting is used for any flow, access token and ID token, rather than referencing OIDC_IDTOKEN_EXPIRE when that’s the returning token.

Is this expected? Maybe I’m missing something.

The JWT itself has the right details anyway, so in the meantime I’m planning to just stash that value while in my code’s validate JWT step