-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
refresh access token spring webflux #26616
Comments
According to https://www.baeldung.com/spring-webclient-oauth2 On the other hand there is an AuthorizationCodeReactiveOAuth2AuthorizedClientProvider which throws ClientAuthorizationRequiresException. |
By default token will be refreshed 1 min before expire: Line 30 in a50c88e
Once expired a new login is required. |
If you're passing in an |
I cannot use offline_access scope because I do not use Okta. However Spring Security 5 do refresh access_token automatically. |
The |
Yes, but not work with my OIDC server unfortunately. I think is the same problem like: github.com//issues/9707 |
@germanicus9 the answer is here #26616 (comment). |
Basically I redone the OAuth2ReactiveRefreshTokensWebFilter and now if I walk through the the application, the filter is called and access_token and refresh_token are changed accordingly. I use
refreshes token automatically regardless inactivity period or what? @mshima can provide more details, pls? |
clockSkew is used to avoid token timestamp validation and the server timestamp differences conflict. So if clockSkew is half of token validation, the token will be refreshed after half of its lifetime. |
Hello,
I have a jHipster Spring Boot Webflux app. and the next filter:
The behaviour is the following:
this branch else {return chain.filter(exchange);} is called every time when I access the app and the access token is renewed automatically when the accessToken is expired. How is this done, by whom?
this branch return refreshAccessToken(authorizedClient, authentication, exchange, chain); is never called. Why?
In concluzion apparently OAuth2ReactiveRefreshTokensWebFilter do nothing!?? What is the goal of this filter?
On the other hand if I stay 10 min in idle mode (no click) I receive
org.springframework.security.oauth2.client.ClientAuthorizationRequiredException: [client_authorization_required] Authorization required for Client Registration Id: oidc (probably for /api/account). Who throws this error and how should be controlled?
Is there any example?
Waiting for your comments. Thank you!!
The text was updated successfully, but these errors were encountered: