-
Notifications
You must be signed in to change notification settings - Fork 25
Add parameter to revoke old refresh token upon issuing new #137
Add parameter to revoke old refresh token upon issuing new #137
Conversation
72c3b74
to
3ceea51
Compare
3ceea51
to
1a0b5b5
Compare
src/oidcop/oidc/token.py
Outdated
issue_refresh = kwargs.get("issue_refresh", False) | ||
if "offline_access" in grant.scope: | ||
issue_refresh = True |
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.
The logic is reversed here as well. issue_refresh
used to override offline_access
, which IMHO is the correct behavior. Maybe this is better:
issue_refresh = kwargs.get("refresh_token", None)
# The existence of offline_access scope overwrites issue_refresh
if issue_refresh is None and "offline_access" in scope:
issue_refresh = True
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.
ok @nsklikas I wait for your revision before merge
1a0b5b5
to
d96cddc
Compare
d96cddc
to
16e99e6
Compare
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.
I like this feature, thank you guys!
@ctriant let us know when this PR would be ready to be merged, we're watching many integrations, take your time and give us a know when ready for merge
@peppelinux i think we are ready, i integrated the suggestions of @nsklikas |
Introduce parameter
revoke_refresh_on_issue
in order to revoke the Refresh Token used to issue a new one.