Package io.dialob.boot.security
Class AbstractWebSecurityConfigurer
- java.lang.Object
-
- org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
- io.dialob.boot.security.AbstractWebSecurityConfigurer
-
- 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>
- Direct Known Subclasses:
AbstractApiSecurityConfigurer,WebUISecurityConfigurer
public abstract class AbstractWebSecurityConfigurer extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter implements org.springframework.core.Ordered
-
-
Constructor Summary
Constructors Constructor Description AbstractWebSecurityConfigurer(String contextPath, TenantAccessEvaluator tenantPermissionEvaluator, AuthenticationStrategy authenticationStrategy)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidconfigure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)protected voidconfigure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureAuthentication(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureAuthenticationManager(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureCors(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureCsrf(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureFrameOptions(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureLogout(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureMDCPrincipalFilter(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected abstract org.springframework.security.config.annotation.web.builders.HttpSecurityconfigurePermissions(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureRequestParameterTenantScopeFilter(org.springframework.security.config.annotation.web.builders.HttpSecurity http)protected StringgetContextPath()protected DefaultTenantGrantedAuthorityProvidergetDefaultTenantSupplier()intgetOrder()protected Optional<RequestParameterTenantScopeFilter>getRequestParameterTenantScopeFilter()protected TenantAccessEvaluatorgetTenantPermissionEvaluator()protected org.springframework.security.web.util.matcher.RequestMatchergetTenantRequiredMatcher()protected org.springframework.security.web.util.matcher.RequestMatcherrequestMatcher()<T extends AbstractWebSecurityConfigurer>
TwithOrder(int order)-
Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
authenticationManager, authenticationManagerBean, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
-
-
-
-
Constructor Detail
-
AbstractWebSecurityConfigurer
public AbstractWebSecurityConfigurer(String contextPath, TenantAccessEvaluator tenantPermissionEvaluator, AuthenticationStrategy authenticationStrategy)
-
-
Method Detail
-
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Overrides:
configurein classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- Throws:
Exception
-
configureAuthenticationManager
protected org.springframework.security.config.annotation.web.builders.HttpSecurity configureAuthenticationManager(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
-
configure
protected void configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) throws Exception- Overrides:
configurein classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- Throws:
Exception
-
configurePermissions
protected abstract org.springframework.security.config.annotation.web.builders.HttpSecurity configurePermissions(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Throws:
Exception
-
requestMatcher
protected org.springframework.security.web.util.matcher.RequestMatcher requestMatcher()
-
configureMDCPrincipalFilter
protected org.springframework.security.config.annotation.web.builders.HttpSecurity configureMDCPrincipalFilter(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Throws:
Exception
-
configureRequestParameterTenantScopeFilter
protected org.springframework.security.config.annotation.web.builders.HttpSecurity configureRequestParameterTenantScopeFilter(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
-
configureCsrf
protected org.springframework.security.config.annotation.web.builders.HttpSecurity configureCsrf(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Throws:
Exception
-
configureCors
protected org.springframework.security.config.annotation.web.builders.HttpSecurity configureCors(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Throws:
Exception
-
configureAuthentication
protected org.springframework.security.config.annotation.web.builders.HttpSecurity configureAuthentication(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Throws:
Exception
-
configureFrameOptions
protected org.springframework.security.config.annotation.web.builders.HttpSecurity configureFrameOptions(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Throws:
Exception
-
configureLogout
protected org.springframework.security.config.annotation.web.builders.HttpSecurity configureLogout(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Throws:
Exception
-
getContextPath
protected final String getContextPath()
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
withOrder
public <T extends AbstractWebSecurityConfigurer> T withOrder(int order)
-
getRequestParameterTenantScopeFilter
@NonNull protected Optional<RequestParameterTenantScopeFilter> getRequestParameterTenantScopeFilter()
-
getTenantRequiredMatcher
@NonNull protected org.springframework.security.web.util.matcher.RequestMatcher getTenantRequiredMatcher()
-
getTenantPermissionEvaluator
@NonNull protected TenantAccessEvaluator getTenantPermissionEvaluator()
-
getDefaultTenantSupplier
@NonNull protected DefaultTenantGrantedAuthorityProvider getDefaultTenantSupplier()
-
-