Class AuthorizationServerConfiguration

java.lang.Object
org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
com.broadleafcommerce.auth.user.autoconfigure.AuthorizationServerConfiguration
All Implemented Interfaces:
org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer

@Configuration @EnableAuthorizationServer public class AuthorizationServerConfiguration extends org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
Set up OAuth specific items. Specifically, register known oauth clients and their explicit redirect url(s). Also, configure conversion of standard OAuth access tokens into JWT tokens.
Author:
Jeff Fischer, Samarth Dhruva (samarthd)
  • Constructor Details

  • Method Details

    • configure

      public void configure(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints)
      Specified by:
      configure in interface org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
      Overrides:
      configure in class org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
    • getTokenGranter

      protected org.springframework.security.oauth2.provider.TokenGranter getTokenGranter(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints, org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, SecurityServiceOAuth2RequestFactory factory)
      Create a CompositeTokenGranter with an EmbeddedLoginTokenGranter followed by AuthorizationCodeWithPkceTokenGranter and the default token granters from the AuthorizationServerEndpointsConfigurer.
    • getEmbeddedLoginTokenGranter

      protected EmbeddedLoginTokenGranter getEmbeddedLoginTokenGranter(SecurityServiceOAuth2RequestFactory factory, org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices)
    • getPkceTokenGranter

      protected AuthorizationCodeWithPkceTokenGranter getPkceTokenGranter(org.springframework.security.oauth2.provider.code.AuthorizationCodeServices authorizationCodeServices, org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.OAuth2RequestFactory requestFactory)
    • embeddedLoginTokenGranter

      @Deprecated(forRemoval=true, since="1.8.2-GA") 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.
    • tokenServices

      @Bean @ConditionalOnMissingBean public DefaultRotatingTokenServices tokenServices(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints, org.springframework.security.oauth2.provider.token.TokenEnhancerChain enhancerChain)
    • configure

      public void configure(org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer clients) throws Exception
      Specified by:
      configure in interface org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
      Overrides:
      configure in class org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
      Throws:
      Exception
    • configure

      public void configure(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer security)
      Specified by:
      configure in interface org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
      Overrides:
      configure in class org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter