Interface HttpSecurityBuilder<H extends HttpSecurityBuilder<H>>
-
- Type Parameters:
H-
- All Superinterfaces:
SecurityBuilder<DefaultSecurityFilterChain>
- All Known Implementing Classes:
HttpSecurity
public interface HttpSecurityBuilder<H extends HttpSecurityBuilder<H>> extends SecurityBuilder<DefaultSecurityFilterChain>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HaddFilter(javax.servlet.Filter filter)Adds aFilterthat must be an instance of or extend one of the Filters provided within the Security framework.HaddFilterAfter(javax.servlet.Filter filter, java.lang.Class<? extends javax.servlet.Filter> afterFilter)Allows adding aFilterafter one of the knownFilterclasses.HaddFilterBefore(javax.servlet.Filter filter, java.lang.Class<? extends javax.servlet.Filter> beforeFilter)Allows adding aFilterbefore one of the knownFilterclasses.HauthenticationProvider(AuthenticationProvider authenticationProvider)Allows adding an additionalAuthenticationProviderto be used<C extends SecurityConfigurer<DefaultSecurityFilterChain,H>>
CgetConfigurer(java.lang.Class<C> clazz)Gets theSecurityConfigurerby its class name ornullif not found.<C> CgetSharedObject(java.lang.Class<C> sharedType)Gets a shared Object.<C extends SecurityConfigurer<DefaultSecurityFilterChain,H>>
CremoveConfigurer(java.lang.Class<C> clazz)Removes theSecurityConfigurerby its class name ornullif not found.<C> voidsetSharedObject(java.lang.Class<C> sharedType, C object)Sets an object that is shared by multipleSecurityConfigurer.HuserDetailsService(UserDetailsService userDetailsService)Allows adding an additionalUserDetailsServiceto be used-
Methods inherited from interface org.springframework.security.config.annotation.SecurityBuilder
build
-
-
-
-
Method Detail
-
getConfigurer
<C extends SecurityConfigurer<DefaultSecurityFilterChain,H>> C getConfigurer(java.lang.Class<C> clazz)
Gets theSecurityConfigurerby its class name ornullif not found. Note that object hierarchies are not considered.- Parameters:
clazz- the Class of theSecurityConfigurerto attempt to get.
-
removeConfigurer
<C extends SecurityConfigurer<DefaultSecurityFilterChain,H>> C removeConfigurer(java.lang.Class<C> clazz)
Removes theSecurityConfigurerby its class name ornullif not found. Note that object hierarchies are not considered.- Parameters:
clazz- the Class of theSecurityConfigurerto attempt to remove.- Returns:
- the
SecurityConfigurerthat was removed or null if not found
-
setSharedObject
<C> void setSharedObject(java.lang.Class<C> sharedType, C object)Sets an object that is shared by multipleSecurityConfigurer.- Parameters:
sharedType- the Class to key the shared object by.object- the Object to store
-
getSharedObject
<C> C getSharedObject(java.lang.Class<C> sharedType)
Gets a shared Object. Note that object heirarchies are not considered.- Parameters:
sharedType- the type of the shared Object- Returns:
- the shared Object or null if it is not found
-
authenticationProvider
H authenticationProvider(AuthenticationProvider authenticationProvider)
Allows adding an additionalAuthenticationProviderto be used- Parameters:
authenticationProvider- theAuthenticationProviderto be added- Returns:
- the
HttpSecurityfor further customizations
-
userDetailsService
H userDetailsService(UserDetailsService userDetailsService) throws java.lang.Exception
Allows adding an additionalUserDetailsServiceto be used- Parameters:
userDetailsService- theUserDetailsServiceto be added- Returns:
- the
HttpSecurityfor further customizations - Throws:
java.lang.Exception
-
addFilterAfter
H addFilterAfter(javax.servlet.Filter filter, java.lang.Class<? extends javax.servlet.Filter> afterFilter)
Allows adding aFilterafter one of the knownFilterclasses. The knownFilterinstances are either aFilterlisted inaddFilter(Filter)or aFilterthat has already been added usingaddFilterAfter(Filter, Class)oraddFilterBefore(Filter, Class).- Parameters:
filter- theFilterto register after the typeafterFilterafterFilter- the Class of the knownFilter.- Returns:
- the
HttpSecurityfor further customizations
-
addFilterBefore
H addFilterBefore(javax.servlet.Filter filter, java.lang.Class<? extends javax.servlet.Filter> beforeFilter)
Allows adding aFilterbefore one of the knownFilterclasses. The knownFilterinstances are either aFilterlisted inaddFilter(Filter)or aFilterthat has already been added usingaddFilterAfter(Filter, Class)oraddFilterBefore(Filter, Class).- Parameters:
filter- theFilterto register before the typebeforeFilterbeforeFilter- the Class of the knownFilter.- Returns:
- the
HttpSecurityfor further customizations
-
addFilter
H addFilter(javax.servlet.Filter filter)
Adds aFilterthat must be an instance of or extend one of the Filters provided within the Security framework. The method ensures that the ordering of the Filters is automatically taken care of. The ordering of the Filters is:DisableEncodeUrlFilterForceEagerSessionCreationFilterChannelProcessingFilterWebAsyncManagerIntegrationFilterSecurityContextHolderFilterSecurityContextPersistenceFilterHeaderWriterFilterCorsFilterCsrfFilterLogoutFilterOAuth2AuthorizationRequestRedirectFilterSaml2WebSsoAuthenticationRequestFilterX509AuthenticationFilterAbstractPreAuthenticatedProcessingFilter- CasAuthenticationFilter
OAuth2LoginAuthenticationFilterSaml2WebSsoAuthenticationFilterUsernamePasswordAuthenticationFilterOpenIDAuthenticationFilterDefaultLoginPageGeneratingFilterDefaultLogoutPageGeneratingFilterConcurrentSessionFilterDigestAuthenticationFilterBearerTokenAuthenticationFilterBasicAuthenticationFilterRequestCacheAwareFilterSecurityContextHolderAwareRequestFilterJaasApiIntegrationFilterRememberMeAuthenticationFilterAnonymousAuthenticationFilterOAuth2AuthorizationCodeGrantFilterSessionManagementFilterExceptionTranslationFilterFilterSecurityInterceptorAuthorizationFilterSwitchUserFilter
- Parameters:
filter- theFilterto add- Returns:
- the
HttpSecurityfor further customizations
-
-