Java Code Examples for org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter#setSigningKey()
The following examples show how to use
org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter#setSigningKey() .
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: OAuth2ResourceServerConfig.java From spring-security-oauth with MIT License | 6 votes |
@Bean public JwtAccessTokenConverter accessTokenConverter() { final JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey("123"); converter.setJwtClaimsSetVerifier(jwtClaimsSetVerifier()); // final Resource resource = new ClassPathResource("public.txt"); // String publicKey = null; // try { // publicKey = IOUtils.toString(resource.getInputStream(), Charset.defaultCharset()); // } catch (final IOException e) { // throw new RuntimeException(e); // } // converter.setVerifierKey(publicKey); return converter; }
Example 2
Source File: TokenStoreConfig.java From paascloud-master with Apache License 2.0 | 5 votes |
/** * Jwt access token converter jwt access token converter. * * @return the jwt access token converter */ @Bean public JwtAccessTokenConverter jwtAccessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey(securityProperties.getOauth2().getJwtSigningKey()); return converter; }
Example 3
Source File: AuthorizationServerConfig.java From SpringCloud with Apache License 2.0 | 5 votes |
/** * jwt token的生成配置 * * @return */ @Bean public JwtAccessTokenConverter accessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey(signingKey); return converter; }
Example 4
Source File: OAuthTokenConfiguration.java From Spring-5.0-By-Example with MIT License | 5 votes |
@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: Oauth2TokenStoreConfiguration.java From onetwo with Apache License 2.0 | 5 votes |
@Bean public JwtAccessTokenConverter jwtAccessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey(jfishOauth2Properties.getJwt().getSigningKey()); /*if (keyValue != null) { converter.setVerifierKey(keyValue); }*/ return converter; }
Example 6
Source File: AuthenticationServerConfig.java From JetfireCloud with Apache License 2.0 | 5 votes |
/** * jwt token的生成配置 * * @return */ @Bean public JwtAccessTokenConverter accessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey(signingKey); return converter; }
Example 7
Source File: AuthorizationServerConfig.java From resource-server-testing with MIT License | 5 votes |
@Bean public JwtAccessTokenConverter accessTokenConverter() throws Exception { JwtAccessTokenConverter jwt = new JwtAccessTokenConverter(); jwt.setSigningKey(signing); jwt.setVerifierKey(verifier); jwt.afterPropertiesSet(); return jwt; }
Example 8
Source File: OAuthTokenConfiguration.java From Learning-Path-Spring-5-End-to-End-Programming with MIT License | 5 votes |
@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: ResourceServerConfig.java From spring-cloud-study with Apache License 2.0 | 5 votes |
@Bean public JwtAccessTokenConverter jwtAccessTokenConverter() { JwtAccessTokenConverter accessTokenConverter = new JwtAccessTokenConverter(); accessTokenConverter.setSigningKey("dev"); accessTokenConverter.setVerifierKey("dev"); return accessTokenConverter; }
Example 10
Source File: OAuthTokenConfiguration.java From Spring-5.0-By-Example with MIT License | 5 votes |
@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 Spring-5.0-By-Example with MIT License | 5 votes |
@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: OAuth2Configuration.java From microservices-oauth with Apache License 2.0 | 4 votes |
@Bean public JwtAccessTokenConverter jwtAccessTokenConverter() { JwtAccessTokenConverter converter = new CustomTokenEnhancer(); converter.setSigningKey("password"); return converter; }
Example 13
Source File: OAuth2ResourceServer.java From OAuth-2.0-Cookbook with MIT License | 4 votes |
@Bean public JwtAccessTokenConverter jwtTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey(getSignKey()); return converter; }
Example 14
Source File: ResourceServerConfig.java From JetfireCloud with Apache License 2.0 | 4 votes |
@Bean public JwtAccessTokenConverter accessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey(signingKey); return converter; }
Example 15
Source File: AuthorizationServerConfiguration.java From fw-spring-cloud with Apache License 2.0 | 4 votes |
@Bean public JwtAccessTokenConverter jwtAccessTokenConverter() { JwtAccessTokenConverter accessTokenConverter = new JwtAccessTokenConverter(); accessTokenConverter.setSigningKey(securityProperties.getOauth().getJwtSigningKey()); return accessTokenConverter; }
Example 16
Source File: OAuth2AuthorizationServer.java From OAuth-2.0-Cookbook with MIT License | 4 votes |
@Bean public JwtAccessTokenConverter accessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey("non-prod-signature"); return converter; }
Example 17
Source File: OAuth2AuthorizationServer.java From OAuth-2.0-Cookbook with MIT License | 4 votes |
@Bean public JwtAccessTokenConverter accessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey("non-prod"); return converter; }
Example 18
Source File: JwtTokenConfig.java From spring-cloud-study with Apache License 2.0 | 4 votes |
@Bean public JwtAccessTokenConverter jwtAccessTokenConverter() { JwtAccessTokenConverter accessTokenConverter = new JwtAccessTokenConverter(); accessTokenConverter.setSigningKey("dev"); return accessTokenConverter; }
Example 19
Source File: OAuth2AuthorizationServerConfiguration.java From OAuth-2.0-Cookbook with MIT License | 4 votes |
@Bean public JwtAccessTokenConverter accessTokenConverter() { JwtAccessTokenConverter conv = new JwtAccessTokenConverter(); conv.setSigningKey("non-prod-signature"); return conv; }
Example 20
Source File: OAuth2AuthorizationServerConfig.java From gemini with Apache License 2.0 | 4 votes |
@Bean public JwtAccessTokenConverter accessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey("secret"); // symmetric key return converter; }