public class SecureChannelProcessor extends java.lang.Object implements org.springframework.beans.factory.InitializingBean, ChannelProcessor
HttpServletRequest.isSecure() responses.
The class responds to one case-sensitive keyword, getSecureKeyword(). If this
keyword is detected, HttpServletRequest.isSecure() is used to determine
the channel security offered. If channel security is not present, the configured
ChannelEntryPoint is called. By default the entry point is
RetryWithHttpsEntryPoint.
The default secureKeyword is REQUIRES_SECURE_CHANNEL.
| Constructor and Description |
|---|
SecureChannelProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
decide(FilterInvocation invocation,
java.util.Collection<ConfigAttribute> config)
Decided whether the presented
FilterInvocation provides the appropriate
level of channel security based on the requested list of ConfigAttributes. |
ChannelEntryPoint |
getEntryPoint() |
java.lang.String |
getSecureKeyword() |
void |
setEntryPoint(ChannelEntryPoint entryPoint) |
void |
setSecureKeyword(java.lang.String secureKeyword) |
boolean |
supports(ConfigAttribute attribute)
Indicates whether this
ChannelProcessor is able to process the passed
ConfigAttribute. |
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic void decide(FilterInvocation invocation, java.util.Collection<ConfigAttribute> config) throws java.io.IOException, javax.servlet.ServletException
ChannelProcessorFilterInvocation provides the appropriate
level of channel security based on the requested list of ConfigAttributes.decide in interface ChannelProcessorjava.io.IOExceptionjavax.servlet.ServletExceptionpublic ChannelEntryPoint getEntryPoint()
public java.lang.String getSecureKeyword()
public void setEntryPoint(ChannelEntryPoint entryPoint)
public void setSecureKeyword(java.lang.String secureKeyword)
public boolean supports(ConfigAttribute attribute)
ChannelProcessorChannelProcessor is able to process the passed
ConfigAttribute.
This allows the ChannelProcessingFilter to check every configuration
attribute can be consumed by the configured ChannelDecisionManager.
supports in interface ChannelProcessorattribute - a configuration attribute that has been configured against the
ChannelProcessingFilter.ChannelProcessor can support the passed
configuration attribute