Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Conversation

@miklish
Copy link
Contributor

@miklish miklish commented Dec 4, 2019

New refresh tokens are now keyed by their token string, rather than the token string of the old refresh token in the request. This fix prevents refresh tokens from being re-used. Old refresh tokens are now properly revoked fter a single use.

References issue #215

@miklish miklish requested a review from stevehu December 4, 2019 19:54
@miklish miklish changed the base branch from master to jdk11 December 4, 2019 19:56
@stevehu stevehu changed the base branch from jdk11 to master December 4, 2019 20:29
@stevehu
Copy link
Contributor

stevehu commented Dec 4, 2019

@miklish I have switched back to master branch. The JDK11 branch will be removed. Thanks.

@stevehu
Copy link
Contributor

stevehu commented Dec 4, 2019

For people like me have hard time understanding how the system works before. @miklish has explained here.

New database entries are created for the new keys; however, (oldKey, new RefreshToken())
The database store code looks at the data in the RefreshTken object. When you call tokens.remove(newKey) it seems to find the keys in the database. 

The defect is buried very deep. @miklish Good catch!!!

@stevehu stevehu merged commit 7034efc into master Dec 4, 2019
@stevehu stevehu deleted the issue215 branch December 4, 2019 21:36
stevehu pushed a commit that referenced this pull request Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants