Search in sources :

Example 6 with JwtTokenStore

use of org.springframework.security.oauth2.provider.token.store.JwtTokenStore in project spring-security-oauth by spring-projects.

the class Application method tokenStore.

@Bean
public JwtTokenStore tokenStore() throws Exception {
    JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
    // N.B. in a real system you would have to configure the verifierKey (or use JdbcTokenStore)
    enhancer.afterPropertiesSet();
    return new JwtTokenStore(enhancer);
}
Also used : JwtTokenStore(org.springframework.security.oauth2.provider.token.store.JwtTokenStore) JwtAccessTokenConverter(org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter) Bean(org.springframework.context.annotation.Bean)

Aggregations

JwtTokenStore (org.springframework.security.oauth2.provider.token.store.JwtTokenStore)6 Field (java.lang.reflect.Field)3 Test (org.junit.Test)3 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)3 OAuth2AccessToken (org.springframework.security.oauth2.common.OAuth2AccessToken)2 Before (org.junit.Before)1 Bean (org.springframework.context.annotation.Bean)1 InMemoryClientDetailsServiceBuilder (org.springframework.security.oauth2.config.annotation.builders.InMemoryClientDetailsServiceBuilder)1 JwtAccessTokenConverter (org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter)1