Return HTTP OK on token drop for oauth2 authentication#10929
Merged
kokosing merged 2 commits intotrinodb:masterfrom Feb 3, 2022
Merged
Return HTTP OK on token drop for oauth2 authentication#10929kokosing merged 2 commits intotrinodb:masterfrom
kokosing merged 2 commits intotrinodb:masterfrom
Conversation
HttpTokenPoller waits 4 seconds for token drop to be acknowledged. With this small change CLI/JDBC returns token almost immediately upon resolution.
Contributor
Author
|
@kokosing because HttpTokenPoller waits for the ACK (HTTP OK) on HTTP DELETE on token endpoint with a timeout of 4s. And didn't return Response http status that was HTTP OK (I guess that it was NO CONTENT) |
Member
Can we make HttpTokenPoller to wait for 2xx? Are there any other places likes that? |
Contributor
Author
|
@kokosing done |
eaf2048 to
816cebc
Compare
kokosing
reviewed
Feb 3, 2022
client/trino-client/src/main/java/io/trino/client/auth/external/HttpTokenPoller.java
Show resolved
Hide resolved
s2lomon
approved these changes
Feb 3, 2022
client/trino-client/src/main/java/io/trino/client/auth/external/HttpTokenPoller.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2TokenExchangeResource.java
Show resolved
Hide resolved
Contributor
Author
|
Ping @kokosing |
Closed
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.
HttpTokenPoller waits 4 seconds for token drop to be acknowledged (checks for HTTP OK). With this small change CLI/JDBC returns token almost immediately upon resolution.