use of org.springframework.security.oauth2.provider.token.DefaultTokenServices in project irida by phac-nml.
the class IridaWebSecurityConfig method tokenServices.
@Bean
@Primary
public ResourceServerTokenServices tokenServices(@Qualifier("clientDetails") ClientDetailsService clientDetails, @Qualifier("iridaTokenStore") TokenStore tokenStore) {
DefaultTokenServices services = new DefaultTokenServices();
services.setTokenStore(tokenStore);
services.setSupportRefreshToken(true);
services.setClientDetailsService(clientDetails);
return services;
}
use of org.springframework.security.oauth2.provider.token.DefaultTokenServices in project credhub by cloudfoundry-incubator.
the class OAuth2Configuration method resourceServerTokenServices.
@Bean
public ResourceServerTokenServices resourceServerTokenServices(JwkTokenStore tokenStore) {
DefaultTokenServices defaultTokenServices = new DefaultTokenServices();
defaultTokenServices.setTokenStore(tokenStore);
return defaultTokenServices;
}
use of org.springframework.security.oauth2.provider.token.DefaultTokenServices in project credhub by cloudfoundry-incubator.
the class Oauth2TestConfiguration method resourceServerTokenServices.
@Bean
public ResourceServerTokenServices resourceServerTokenServices(TokenStore tokenStore) {
DefaultTokenServices defaultTokenServices = new DefaultTokenServices();
defaultTokenServices.setTokenStore(tokenStore);
return defaultTokenServices;
}
use of org.springframework.security.oauth2.provider.token.DefaultTokenServices in project cloud-sea-towerman by huadahuang1983.
the class OAuthServerConfig method tokenServices.
@Primary
@Bean
public AuthorizationServerTokenServices tokenServices() {
DefaultTokenServices defaultTokenServices = new DefaultTokenServices();
defaultTokenServices.setTokenStore(tokenStore());
defaultTokenServices.setSupportRefreshToken(true);
defaultTokenServices.setClientDetailsService(clientDetailsService());
// 有效期设置
defaultTokenServices.setAccessTokenValiditySeconds((int) TimeUnit.HOURS.toSeconds(2));
return defaultTokenServices;
}
use of org.springframework.security.oauth2.provider.token.DefaultTokenServices in project new-cloud by xie-summer.
the class ResourceServerConfiguration method tokenServices.
@Bean
@Primary
public DefaultTokenServices tokenServices() {
final DefaultTokenServices defaultTokenServices = new DefaultTokenServices();
defaultTokenServices.setTokenStore(tokenStore());
defaultTokenServices.setTokenEnhancer(accessTokenConverter());
return defaultTokenServices;
}
Aggregations