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() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OAuthTokenConfiguration.java    From Spring-5.0-By-Example with 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 2
Source File: $ Spring OAuth2 Access Token Decoder.java    From allegro-intellij-templates with 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 3
Source File: AuthorizationServerConfig.java    From resource-server-testing with 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 4
Source File: OAuthTokenConfiguration.java    From Spring-5.0-By-Example with 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
Source File: OAuthTokenConfiguration.java    From Spring-5.0-By-Example with 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
Source File: OAuthTokenConfiguration.java    From Spring-5.0-By-Example with 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
Source File: OAuthTokenConfiguration.java    From Spring-5.0-By-Example with 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
Source File: OAuthTokenConfiguration.java    From Spring-5.0-By-Example with 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
Source File: OpenHelper.java    From open-cloud with 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 10
Source File: OAuthTokenConfiguration.java    From Spring-5.0-By-Example with 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
Source File: OAuthTokenConfiguration.java    From Learning-Path-Spring-5-End-to-End-Programming with 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
Source File: OAuthTokenConfiguration.java    From Learning-Path-Spring-5-End-to-End-Programming with 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
Source File: OAuthTokenConfiguration.java    From Learning-Path-Spring-5-End-to-End-Programming with 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
Source File: OAuthTokenConfiguration.java    From Learning-Path-Spring-5-End-to-End-Programming with 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
Source File: OAuthTokenConfiguration.java    From Learning-Path-Spring-5-End-to-End-Programming with 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
Source File: OAuthTokenConfiguration.java    From Learning-Path-Spring-5-End-to-End-Programming with 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 17
Source File: OAuthTokenConfiguration.java    From Learning-Path-Spring-5-End-to-End-Programming with 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 18
Source File: PolymerResourceOAuthConfig.java    From spring-polymer-demo with 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);
}