public final class PortMapperConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHttpConfigurer<PortMapperConfigurer<H>,H>
PortMapper instance used to determine the ports
when redirecting between HTTP and HTTPS. The PortMapper can be obtained from
AbstractConfiguredSecurityBuilder.getSharedObject(Class).| Modifier and Type | Class and Description |
|---|---|
class |
PortMapperConfigurer.HttpPortMapping
Allows specifying the HTTPS port for a given HTTP port when redirecting between
HTTP and HTTPS.
|
| Constructor and Description |
|---|
PortMapperConfigurer()
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
PortMapperConfigurer.HttpPortMapping |
http(int httpPort)
Adds a port mapping
|
void |
init(H http)
Initialize the
SecurityBuilder. |
PortMapperConfigurer<H> |
portMapper(org.springframework.security.web.PortMapper portMapper)
Allows specifying the
PortMapper instance. |
disable, withObjectPostProcessoraddObjectPostProcessor, and, configure, getBuilder, postProcess, setBuilderpublic PortMapperConfigurer<H> portMapper(org.springframework.security.web.PortMapper portMapper)
PortMapper instance.portMapper - PortMapperConfigurer for further customizationspublic PortMapperConfigurer.HttpPortMapping http(int httpPort)
httpPort - the HTTP port that maps to a specific HTTPS port.PortMapperConfigurer.HttpPortMapping to define the HTTPS portpublic void init(H http)
SecurityConfigurerSecurityBuilder. Here only shared state should be created
and modified, but not properties on the SecurityBuilder used for building
the object. This ensures that the SecurityConfigurer.configure(SecurityBuilder) method uses
the correct shared objects when building. Configurers should be applied here.init in interface SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>init in class SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>