0

I wonder how can I extrat refresh token value using Spring Boot and Spring Security OAuth2?

There are plans for implementing Refresh Token Repository but for now is there any easy way to intercept this value?

Clarification: This is client application. I'm using 3rd party resource server, Spring Boot 2.x, Spring Security 5.x and Spring Security OAuth2 2.3.x

Trynkiewicz Mariusz
  • 2,722
  • 3
  • 21
  • 27
  • You get the refresh token with [`DefaultOAuth2AccessToken.html#getRefreshToken`](https://docs.spring.io/spring-security/oauth/apidocs/org/springframework/security/oauth2/common/DefaultOAuth2AccessToken.html#getRefreshToken()). – dur May 03 '18 at 15:16
  • @dur any Idea how do I get access to this object? The closest thing is [OAuth2AccessToken](https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/oauth2/core/OAuth2AccessToken.html) I get from [OAuth2AuthorizedClient](https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/oauth2/client/OAuth2AuthorizedClient.html) – Trynkiewicz Mariusz May 03 '18 at 15:23
  • Do you use Spring Security 5? – dur May 03 '18 at 15:38
  • @dur yes, basically everything is from RELEASE tag – Trynkiewicz Mariusz May 03 '18 at 15:40
  • Ok, then it seems, that you have to use `OAuth2AuthorizedClient`. – dur May 03 '18 at 15:43
  • @dur and any idea what to do with it? – Trynkiewicz Mariusz May 04 '18 at 07:36

0 Answers0