Class ResourceServerAutoConfiguration
- java.lang.Object
-
- org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
- org.bremersee.security.authentication.AbstractResourceServerAutoConfiguration
-
- org.bremersee.security.authentication.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,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
-
-
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<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.bremersee.security.authentication.AbstractResourceServerAutoConfiguration
configure, getOrder
-
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<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 environmentsecurityProperties
- the spring propertiesauthProperties
- the security propertiescorsProperties
- the cors propertiesjwtConverterProvider
- the jwt converter providerpasswordEncoderProvider
- the password encoder provider
-
-
Method Detail
-
init
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()
Description copied from class:AbstractResourceServerAutoConfiguration
Init.- Overrides:
init
in classAbstractResourceServerAutoConfiguration
-
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 classAbstractResourceServerAutoConfiguration
- 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 classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
-