Class ResourceServerAutoConfiguration

  • All Implemented Interfaces:
    org.springframework.core.Ordered, 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>

    @ConditionalOnWebApplication(type=SERVLET)
    @Conditional(ResourceServerAutoSecurityCondition.class)
    @ConditionalOnClass({org.springframework.security.config.annotation.web.builders.HttpSecurity.class,org.bremersee.security.authentication.PasswordFlowProperties.class})
    @ConditionalOnMissingBean(type="org.bremersee.actuator.security.authentication.ResourceServerWithActuatorAutoConfiguration")
    @EnableConfigurationProperties({CorsProperties.class,org.springframework.boot.autoconfigure.security.SecurityProperties.class,AuthProperties.class})
    @Configuration
    public class ResourceServerAutoConfiguration
    extends AbstractResourceServerAutoConfiguration
    The resource server security auto configuration.
    Author:
    Christian Bremer
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceServerAutoConfiguration​(org.springframework.core.env.Environment environment, org.springframework.boot.autoconfigure.security.SecurityProperties securityProperties, AuthProperties authProperties, CorsProperties corsProperties, org.springframework.beans.factory.ObjectProvider<org.bremersee.security.authentication.JsonPathJwtConverter> jwtConverterProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.security.crypto.password.PasswordEncoder> passwordEncoderProvider)
      Instantiates a new resource server security auto configuration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init()
      Init.
      protected org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry init​(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
      Init expression url authorization configurer . expression intercept url registry.
      org.springframework.security.core.userdetails.UserDetailsService userDetailsServiceBean()  
      • 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
    • Constructor Detail

      • ResourceServerAutoConfiguration

        public ResourceServerAutoConfiguration​(org.springframework.core.env.Environment environment,
                                               org.springframework.boot.autoconfigure.security.SecurityProperties securityProperties,
                                               AuthProperties authProperties,
                                               CorsProperties corsProperties,
                                               org.springframework.beans.factory.ObjectProvider<org.bremersee.security.authentication.JsonPathJwtConverter> jwtConverterProvider,
                                               org.springframework.beans.factory.ObjectProvider<org.springframework.security.crypto.password.PasswordEncoder> passwordEncoderProvider)
        Instantiates a new resource server security auto configuration.
        Parameters:
        environment - the environment
        securityProperties - the spring properties
        authProperties - the security properties
        corsProperties - the cors properties
        jwtConverterProvider - the jwt converter provider
        passwordEncoderProvider - the password encoder provider
    • Method Detail

      • init

        protected org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry init​(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
                                                                                                                                                   throws Exception
        Description copied from class: AbstractResourceServerAutoConfiguration
        Init expression url authorization configurer . expression intercept url registry.
        Specified by:
        init in class AbstractResourceServerAutoConfiguration
        Parameters:
        httpSecurity - the http security
        Returns:
        the expression url authorization configurer . expression intercept url registry
        Throws:
        Exception - the exception
      • userDetailsServiceBean

        @ConditionalOnExpression("\'${spring.security.oauth2.resourceserver.jwt.jwk-set-uri:}\'.empty")
        @ConditionalOnMissingBean
        @Bean
        public org.springframework.security.core.userdetails.UserDetailsService userDetailsServiceBean()
        Overrides:
        userDetailsServiceBean in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter