Example usage for org.springframework.security.oauth2.client.token AccessTokenRequest getExistingToken

List of usage examples for org.springframework.security.oauth2.client.token AccessTokenRequest getExistingToken

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.client.token AccessTokenRequest getExistingToken.

Prototype

OAuth2AccessToken getExistingToken();

Source Link

Usage

From source file:curly.commons.config.feign.OAuth2FeignRequestInterceptor.java

private String value(String tokenType) {
    final AccessTokenRequest accessTokenRequest = oAuth2ClientContext.getAccessTokenRequest();
    if (accessTokenRequest.getExistingToken() != null) {
        logger.debug("Returning token {} value", tokenType);
        return String.format("%s %s", tokenType, accessTokenRequest.getExistingToken().toString());
    }/*from   ww  w .j  a  v a  2 s  .c om*/
    logger.debug("No accessTokenRequest found for Feign RequestTemplate!");
    return "";
}