Java Code Examples for org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter#afterPropertiesSet()

The following examples show how to use org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter#afterPropertiesSet() .
Example 1
Project: open-cloud   File: OpenHelper.java    License: MIT License 5 votes vote down vote up
/**
 * 构建jwtToken转换器
 *
 * @param properties
 * @return
 */
public static JwtAccessTokenConverter buildJwtTokenEnhancer(OpenCommonProperties properties) throws Exception {
    JwtAccessTokenConverter converter = new OpenJwtAccessTokenEnhancer();
    converter.setSigningKey(properties.getJwtSigningKey());
    converter.afterPropertiesSet();
    return converter;
}
 
Example 2
Project: Learning-Path-Spring-5-End-to-End-Programming   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 3
Project: Learning-Path-Spring-5-End-to-End-Programming   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 4
Project: Learning-Path-Spring-5-End-to-End-Programming   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 5
Project: Learning-Path-Spring-5-End-to-End-Programming   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 6
Project: Learning-Path-Spring-5-End-to-End-Programming   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 7
Project: Learning-Path-Spring-5-End-to-End-Programming   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 8
Project: Learning-Path-Spring-5-End-to-End-Programming   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 9
Project: Spring-5.0-By-Example   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 10
Project: Spring-5.0-By-Example   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 11
Project: Spring-5.0-By-Example   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 12
Project: Spring-5.0-By-Example   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 13
Project: Spring-5.0-By-Example   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 14
Project: Spring-5.0-By-Example   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 15
Project: Spring-5.0-By-Example   File: OAuthTokenConfiguration.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
  JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
  enhancer.setSigningKey(privateKey);
  enhancer.setVerifierKey(publicKey);
  enhancer.afterPropertiesSet();
  return new JwtTokenStore(enhancer);
}
 
Example 16
Project: resource-server-testing   File: AuthorizationServerConfig.java    License: MIT License 5 votes vote down vote up
@Bean
public JwtAccessTokenConverter accessTokenConverter() throws Exception {
	JwtAccessTokenConverter jwt = new JwtAccessTokenConverter();
	jwt.setSigningKey(signing);
	jwt.setVerifierKey(verifier);
	jwt.afterPropertiesSet();
	return jwt;
}
 
Example 17
Project: allegro-intellij-templates   File: $ Spring OAuth2 Access Token Decoder.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
public $NAME(@Value("${oauth2.tokenKey}") String publicKeyUrl) throws Exception {
    String publicKey = (String) new RestTemplate().getForObject(publicKeyUrl, Map.class).get("value");

    JwtAccessTokenConverter tokenConverter = new JwtAccessTokenConverter();
    tokenConverter.setVerifierKey(publicKey);
    tokenConverter.afterPropertiesSet();

    tokenStore = new JwtTokenStore(tokenConverter);
}
 
Example 18
Project: spring-polymer-demo   File: PolymerResourceOAuthConfig.java    License: Artistic License 2.0 4 votes vote down vote up
@Bean
public JwtTokenStore tokenStore() throws Exception {
	JwtAccessTokenConverter enhancer = new JwtAccessTokenConverter();
	enhancer.afterPropertiesSet();
	return new JwtTokenStore(enhancer);
}