Class AuthorizationConfigurer

  • All Implemented Interfaces:
    org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,​org.springframework.security.config.annotation.web.builders.WebSecurity>, org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>

    @Configuration
    @EnableOAuth2Client
    @AutoConfigureBefore(org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration.class)
    @EnableConfigurationProperties(org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2SsoProperties.class)
    @Import({org.springframework.security.oauth2.config.annotation.web.configuration.OAuth2ClientConfiguration.class,org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration.class})
    public class AuthorizationConfigurer
    extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AuthenticationTokenFilter authenticationTokenFilterBean()  
      protected void configure​(org.springframework.security.config.annotation.web.builders.HttpSecurity http)  
      org.springframework.boot.autoconfigure.security.oauth2.resource.PrincipalExtractor customPrincipalExtractor()  
      org.springframework.security.oauth2.client.OAuth2RestTemplate oauth2RestTemplate​(org.springframework.security.oauth2.client.OAuth2ClientContext oauth2ClientContext, org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails details)  
      • Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter

        authenticationManager, authenticationManagerBean, configure, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
    • Constructor Detail

      • AuthorizationConfigurer

        public AuthorizationConfigurer()
    • Method Detail

      • configure

        protected void configure​(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
                          throws Exception
        Overrides:
        configure in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
        Throws:
        Exception
      • oauth2RestTemplate

        @Bean
        public org.springframework.security.oauth2.client.OAuth2RestTemplate oauth2RestTemplate​(org.springframework.security.oauth2.client.OAuth2ClientContext oauth2ClientContext,
                                                                                                org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails details)
      • customPrincipalExtractor

        @Bean
        public org.springframework.boot.autoconfigure.security.oauth2.resource.PrincipalExtractor customPrincipalExtractor()