-
-
Notifications
You must be signed in to change notification settings - Fork 247
Allow changing subject claim #66
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
Conversation
flask_jwt_extended/tokens.py
Outdated
|
|
||
|
|
||
| def decode_jwt(encoded_token, secret, algorithm, csrf): | ||
| def decode_jwt(encoded_token, secret, algorithm, csrf, identity): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add this to the encode_refresh_token and encode_access_token too? I think the identity kwarg is already in use, so we could use something like identity_claim or something instead? In fact, maybe we should change this to identity_claim as well?
We will need to update the calls to encode_access_token and encode_refresh_token as well. I think those are only used in the jwt_manager.py.
| such as ``RS*`` or ``ES*``. PEM format expected. | ||
| ``JWT_IDENTITY_CLAIM`` Claim in the tokens that is used on decoding as source of identity. | ||
| For interoperativity, the JWT RFC recommends using ``'sub'``. | ||
| Defaults to ``'identity'``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In conjunction with the comment below, lets remove the decoding from this, as it will be both encoding and
decoding.
Changes which claim to validate and retrieve as 'identity', as a client.
Allows user to configure which is the claim through app.config.
Related to issue #65