@Configuration
@EnableAuthorizationServer
public class AuthorizationServerConfiguration
extends org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
Constructor and Description |
---|
AuthorizationServerConfiguration(OAuth2SessionAuthenticationFilter sessionAuthenticationFilter,
OAuth2TokenEndpointAuthenticationFilter tokenEndpointAuthenticationFilter,
Optional<EmbeddedLoginTokenEndpointAuthenticationFilter> embeddedLoginTokenEndpointAuthenticationFilter,
AuthorizedClientService<AuthorizedClient> authorizedClientService,
SecurityService securityService,
org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter tokenConverter,
List<org.springframework.security.oauth2.provider.token.TokenEnhancer> tokenEnhancers,
org.springframework.security.oauth2.provider.token.store.JwtTokenStore tokenStore,
org.springframework.security.oauth2.provider.endpoint.RedirectResolver redirectResolver,
TokenProperties properties,
org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService,
org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration authenticationConfiguration) |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints) |
void |
configure(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer security) |
void |
configure(org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer clients) |
protected org.springframework.security.oauth2.provider.CompositeTokenGranter |
embeddedLoginTokenGranter(SecurityServiceOAuth2RequestFactory factory,
DefaultRotatingTokenServices tokenServices,
org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService,
org.springframework.security.oauth2.provider.TokenGranter defaultTokenGranters)
Create a
CompositeTokenGranter with an EmbeddedLoginTokenGranter followed by
the default token granters from the AuthorizationServerEndpointsConfigurer . |
DefaultRotatingTokenServices |
tokenServices(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints,
org.springframework.security.oauth2.provider.token.TokenEnhancerChain enhancerChain) |
public AuthorizationServerConfiguration(OAuth2SessionAuthenticationFilter sessionAuthenticationFilter, OAuth2TokenEndpointAuthenticationFilter tokenEndpointAuthenticationFilter, Optional<EmbeddedLoginTokenEndpointAuthenticationFilter> embeddedLoginTokenEndpointAuthenticationFilter, AuthorizedClientService<AuthorizedClient> authorizedClientService, SecurityService securityService, org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter tokenConverter, @Nullable List<org.springframework.security.oauth2.provider.token.TokenEnhancer> tokenEnhancers, org.springframework.security.oauth2.provider.token.store.JwtTokenStore tokenStore, org.springframework.security.oauth2.provider.endpoint.RedirectResolver redirectResolver, TokenProperties properties, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration authenticationConfiguration) throws Exception
Exception
public void configure(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints)
configure
in interface org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
configure
in class org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
protected org.springframework.security.oauth2.provider.CompositeTokenGranter embeddedLoginTokenGranter(SecurityServiceOAuth2RequestFactory factory, DefaultRotatingTokenServices tokenServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.TokenGranter defaultTokenGranters)
CompositeTokenGranter
with an EmbeddedLoginTokenGranter
followed by
the default token granters from the AuthorizationServerEndpointsConfigurer
.factory
- tokenServices
- clientDetailsService
- defaultTokenGranters
- CompositeTokenGranter
with an EmbeddedLoginTokenGranter
followed by
the default token granters@Bean @ConditionalOnMissingBean public DefaultRotatingTokenServices tokenServices(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints, org.springframework.security.oauth2.provider.token.TokenEnhancerChain enhancerChain)
public void configure(org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer clients) throws Exception
configure
in interface org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
configure
in class org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
Exception
public void configure(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer security)
configure
in interface org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
configure
in class org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
Copyright © 2021. All rights reserved.