-
Notifications
You must be signed in to change notification settings - Fork 6k
Gh 6053 support jwt bearer grant type #9505
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
Gh 6053 support jwt bearer grant type #9505
Conversation
- Change method hasTokenExpired in JwtBearerOAuth2AuthorizedClientProvider to avoid error when including skew time (same as spring-projectsgh-7511) - Rename classes to follow conventions - Define and use constants in AuthorizationGrantType, OAuth2ParameterNames and OAuth2AuthorizationContext - Add jwtBearer builder in OAuth2AuthorizedClientProviderBuilder - Add Junit tests, mainly copied and adapted from Password grant
@H-LREB Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@H-LREB Thank you for signing the Contributor License Agreement! |
Thank you @jgrandja. That is a great news. I am so happy the feature is likely to be part of the next release. However, could you reconsider the choice of not allowing the reuse of the obtained access token in class I think the reason behind this choice is mainly the phrase "a reasonably short lifetime" in the spec. However, this does not necessarily imply that the access token cannot be reused. Besides, a "reasonably short" time is relative to the application context (could be a few minutes, several minutes, 1h et.c). Thus, I think the Spring Framework still can allow reusing the obtained access token as long as it is valid, and let the OAuth Server decide about the reasonable validity interval. In high frequency services, even the reuse of the access token for 5 or 10 minutes may spare a lot of requests to the OAuth server. |
The
Yes, this is how it was implemented. |
@jgrandja Thank you for these answers. Indeed, I have not read the code carefully enough before submitting my previous comment. I have another question though. I posted it in 9535 discussion. |
This PR is related to gh-6053.
I have been using the classes from Joe Grandja POC for a while and they are working fine. This PR aims at integrating those classes into Spring Security :