Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.springframework.beans.factory.annotation.Value;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.Configuration;
- import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
- import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
- @Configuration
- public class JwtTokenConfiguration {
- @Value("${api-security.jwt.signing-key}")
- private String signingKey;
- @Bean
- public JwtAccessTokenConverter accessTokenConverter() {
- final JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
- converter.setSigningKey(signingKey);
- return converter;
- }
- @Bean
- public JwtTokenStore tokenStore(final JwtAccessTokenConverter converter) {
- return new JwtTokenStore(converter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement