Example usage for org.springframework.security.oauth2.provider.token DefaultTokenServices setReuseRefreshToken

List of usage examples for org.springframework.security.oauth2.provider.token DefaultTokenServices setReuseRefreshToken

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.provider.token DefaultTokenServices setReuseRefreshToken.

Prototype

public void setReuseRefreshToken(boolean reuseRefreshToken) 

Source Link

Document

Whether to reuse refresh tokens (until expired).

Usage

From source file:org.osiam.configuration.OAuth2AuthorizationServerConfig.java

@Bean
public DefaultTokenServices tokenServices() throws Exception {
    DefaultTokenServices tokenServices = new DefaultTokenServices();
    tokenServices.setTokenStore(tokenStore());
    tokenServices.setSupportRefreshToken(true);
    tokenServices.setReuseRefreshToken(true);
    tokenServices.setClientDetailsService(osiamClientDetailsService);
    tokenServices.setTokenEnhancer(osiamTokenEnhancer());
    tokenServices.afterPropertiesSet();/*from w w  w.ja  v a2s  . c  om*/
    return tokenServices;
}