feat: add authenticator invalidate (SHOP-231)#134
Closed
vsolovei-smartling wants to merge 1 commit intomasterfrom
Closed
feat: add authenticator invalidate (SHOP-231)#134vsolovei-smartling wants to merge 1 commit intomasterfrom
vsolovei-smartling wants to merge 1 commit intomasterfrom
Conversation
PavelLoparev
reviewed
Mar 3, 2026
Comment on lines
+119
to
+124
| public synchronized void invalidate() | ||
| { | ||
| this.authentication = null; | ||
| this.expiresAt = -1; | ||
| this.refreshExpiresAt = -1; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
There was a problem hiding this comment.
that filter is only for logging. your http client from sdk already gets 401 response isn't? why can't you handle this 401 in sdk directly?
Comment on lines
-123
to
+130
| this.refreshExpiresAt = authentication.getRefreshExpiresIn() * 100 + System.currentTimeMillis(); | ||
| this.refreshExpiresAt = authentication.getRefreshExpiresIn() * 1000 + System.currentTimeMillis(); |
There was a problem hiding this comment.
Seems like the real fix is this one?
Contributor
Author
There was a problem hiding this comment.
I don't think this is THE fix, it will reduce full re-authentication count, the only downside of having 100 vs 1000 is the frequency of full re-authentications vs refreshes.
Contributor
Author
|
Will go with handling in the sdk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Having invalidation will allow to retry invalid token