Class HttpsRedirectConfigurer<H extends HttpSecurityBuilder<H>>
java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,B>
org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<HeadersConfigurer<H>,H>
org.springframework.security.config.annotation.web.configurers.HttpsRedirectConfigurer<H>
- Type Parameters:
H- the type ofHttpSecurityBuilderthat is being configured
- All Implemented Interfaces:
SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H>
public final class HttpsRedirectConfigurer<H extends HttpSecurityBuilder<H>>
extends AbstractHttpConfigurer<HeadersConfigurer<H>,H>
Specifies for what requests the application should redirect to HTTPS. When this
configurer is added, it redirects all HTTP requests by default to HTTPS.
Security Filters
The following Filters are populatedHttpsRedirectFilter
Shared Objects Created
No shared objects are created.Shared Objects Used
The following shared objects are used:PortMapperis used to configureHttpsRedirectFilter
- Since:
- 6.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.requestMatchers(org.springframework.security.web.util.matcher.RequestMatcher... matchers) Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, getSecurityContextHolderStrategy, withObjectPostProcessor, withObjectPostProcessorMethods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder
-
Constructor Details
-
HttpsRedirectConfigurer
public HttpsRedirectConfigurer()
-
-
Method Details
-
requestMatchers
public HttpsRedirectConfigurer<H> requestMatchers(org.springframework.security.web.util.matcher.RequestMatcher... matchers) -
configure
Description copied from interface:SecurityConfigurerConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.- Specified by:
configurein interfaceSecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Overrides:
configurein classSecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Throws:
Exception
-