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 SummaryModifier and TypeMethodDescriptionaddFilter(jakarta.servlet.Filter filter) Adds aFilterthat must be an instance of or extend one of the Filters provided within the Security framework.addFilterAfter(jakarta.servlet.Filter filter, Class<? extends jakarta.servlet.Filter> afterFilter) Allows adding aFilterafter one of the knownFilterclasses.addFilterBefore(jakarta.servlet.Filter filter, Class<? extends jakarta.servlet.Filter> beforeFilter) Allows adding aFilterbefore one of the knownFilterclasses.authenticationProvider(AuthenticationProvider authenticationProvider) Allows adding an additionalAuthenticationProviderto be used<C extends SecurityConfigurer<DefaultSecurityFilterChain,H>> 
 CgetConfigurer(Class<C> clazz) Gets theSecurityConfigurerby its class name ornullif not found.<C> CgetSharedObject(Class<C> sharedType) Gets a shared Object.<C extends SecurityConfigurer<DefaultSecurityFilterChain,H>> 
 CremoveConfigurer(Class<C> clazz) Removes theSecurityConfigurerby its class name ornullif not found.<C> voidsetSharedObject(Class<C> sharedType, C object) Sets an object that is shared by multipleSecurityConfigurer.userDetailsService(UserDetailsService userDetailsService) Allows adding an additionalUserDetailsServiceto be usedMethods inherited from interface org.springframework.security.config.annotation.SecurityBuilderbuild
- 
Method Details- 
getConfigurerGets theSecurityConfigurerby its class name ornullif not found. Note that object hierarchies are not considered.- Parameters:
- clazz- the Class of the- SecurityConfigurerto attempt to get.
 
- 
removeConfigurerRemoves theSecurityConfigurerby its class name ornullif not found. Note that object hierarchies are not considered.- Parameters:
- clazz- the Class of the- SecurityConfigurerto attempt to remove.
- Returns:
- the SecurityConfigurerthat was removed or null if not found
 
- 
authenticationProviderAllows adding an additionalAuthenticationProviderto be used- Parameters:
- authenticationProvider- the- AuthenticationProviderto be added
- Returns:
- the HttpSecurityfor further customizations
 
- 
userDetailsServiceAllows adding an additionalUserDetailsServiceto be used- Parameters:
- userDetailsService- the- UserDetailsServiceto be added
- Returns:
- the HttpSecurityfor further customizations
- Throws:
- Exception
 
- 
addFilterAfterH addFilterAfter(jakarta.servlet.Filter filter, Class<? extends jakarta.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- the- Filterto register after the type- afterFilter
- afterFilter- the Class of the known- Filter.
- Returns:
- the HttpSecurityfor further customizations
 
- 
addFilterBeforeH addFilterBefore(jakarta.servlet.Filter filter, Class<? extends jakarta.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- the- Filterto register before the type- beforeFilter
- beforeFilter- the Class of the known- Filter.
- Returns:
- the HttpSecurityfor further customizations
 
- 
addFilterAdds 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:- DisableEncodeUrlFilter
- ForceEagerSessionCreationFilter
- ChannelProcessingFilter
- HttpsRedirectFilter
- WebAsyncManagerIntegrationFilter
- SecurityContextHolderFilter
- SecurityContextPersistenceFilter
- HeaderWriterFilter
- CorsFilter
- CsrfFilter
- LogoutFilter
- OAuth2AuthorizationRequestRedirectFilter
- Saml2WebSsoAuthenticationRequestFilter
- X509AuthenticationFilter
- AbstractPreAuthenticatedProcessingFilter
- CasAuthenticationFilter
- OAuth2LoginAuthenticationFilter
- Saml2WebSsoAuthenticationFilter
- UsernamePasswordAuthenticationFilter
- DefaultLoginPageGeneratingFilter
- DefaultLogoutPageGeneratingFilter
- ConcurrentSessionFilter
- DigestAuthenticationFilter
- BearerTokenAuthenticationFilter
- BasicAuthenticationFilter
- AuthenticationFilter
- RequestCacheAwareFilter
- SecurityContextHolderAwareRequestFilter
- JaasApiIntegrationFilter
- RememberMeAuthenticationFilter
- AnonymousAuthenticationFilter
- OAuth2AuthorizationCodeGrantFilter
- SessionManagementFilter
- ExceptionTranslationFilter
- FilterSecurityInterceptor
- AuthorizationFilter
- SwitchUserFilter
 - Parameters:
- filter- the- Filterto add
- Returns:
- the HttpSecurityfor further customizations
 
 
-