Skip to content
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

StoredCredential / AbstractDataStoreFactory - optimistic lock #401

Open
JWillow opened this issue Nov 20, 2019 · 0 comments
Open

StoredCredential / AbstractDataStoreFactory - optimistic lock #401

JWillow opened this issue Nov 20, 2019 · 0 comments
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@JWillow
Copy link

JWillow commented Nov 20, 2019

Is your feature request related to a problem? Please describe.

I'm facing to a concurrent requests that for the same user need to refresh the access token. All is good for the first request, but the second that uses the same refresh token has been rejected and in consequence, write null in the database. The access token and the new refresh are lost.

Describe the solution you'd like
Add a version field to the StoredCredential object. At this time this object cannot be overridden because it is declared as final class. This new field permit to implement a optimistic lock in my DataStoreFactory.
Result:
The second request it want to insert null with version 1, will be rejected because in database the first request put the new token with version 2. The right access token and refresh token aren't lost.

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Nov 21, 2019
@codyoss codyoss added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants