Class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
- java.lang.Object
-
- org.springframework.security.config.annotation.SecurityConfigurerAdapter<DefaultSecurityFilterChain,B>
-
- org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<ChannelSecurityConfigurer<H>,H>
-
- org.springframework.security.config.annotation.web.configurers.ChannelSecurityConfigurer<H>
-
- Type Parameters:
H
- the type ofHttpSecurityBuilder
that is being configured
- All Implemented Interfaces:
SecurityConfigurer<DefaultSecurityFilterChain,H>
public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHttpConfigurer<ChannelSecurityConfigurer<H>,H>
Adds channel security (i.e. requires HTTPS or HTTP) to an application. In order forChannelSecurityConfigurer
to be useful, at least oneRequestMatcher
should be mapped to HTTP or HTTPS.By default an
InsecureChannelProcessor
and aSecureChannelProcessor
will be registered.Security Filters
The following Filters are populatedShared Objects Created
No shared objects are created.Shared Objects Used
The following shared objects are used:PortMapper
is used to create the defaultChannelProcessor
instances
- Since:
- 3.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ChannelSecurityConfigurer.ChannelRequestMatcherRegistry
class
ChannelSecurityConfigurer.MvcMatchersRequiresChannelUrl
class
ChannelSecurityConfigurer.RequiresChannelUrl
-
Constructor Summary
Constructors Constructor Description ChannelSecurityConfigurer(org.springframework.context.ApplicationContext context)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(H http)
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.ChannelSecurityConfigurer.ChannelRequestMatcherRegistry
getRegistry()
-
Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, withObjectPostProcessor
-
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder
-
-
-
-
Constructor Detail
-
ChannelSecurityConfigurer
public ChannelSecurityConfigurer(org.springframework.context.ApplicationContext context)
Creates a new instance- See Also:
HttpSecurity.requiresChannel()
-
-
Method Detail
-
getRegistry
public ChannelSecurityConfigurer.ChannelRequestMatcherRegistry getRegistry()
-
configure
public void configure(H http)
Description copied from interface:SecurityConfigurer
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.- Specified by:
configure
in interfaceSecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
- Overrides:
configure
in classSecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
-
-