Class SecureChannelProcessor
- java.lang.Object
-
- org.springframework.security.web.access.channel.SecureChannelProcessor
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,ChannelProcessor
public class SecureChannelProcessor extends java.lang.Object implements org.springframework.beans.factory.InitializingBean, ChannelProcessor
Ensures channel security is active by review ofHttpServletRequest.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 configuredChannelEntryPointis called. By default the entry point isRetryWithHttpsEntryPoint.The default
secureKeywordisREQUIRES_SECURE_CHANNEL.
-
-
Constructor Summary
Constructors Constructor Description SecureChannelProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voiddecide(FilterInvocation invocation, java.util.Collection<org.springframework.security.access.ConfigAttribute> config)Decided whether the presentedFilterInvocationprovides the appropriate level of channel security based on the requested list of ConfigAttributes.ChannelEntryPointgetEntryPoint()java.lang.StringgetSecureKeyword()voidsetEntryPoint(ChannelEntryPoint entryPoint)voidsetSecureKeyword(java.lang.String secureKeyword)booleansupports(org.springframework.security.access.ConfigAttribute attribute)Indicates whether thisChannelProcessoris able to process the passedConfigAttribute.
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
decide
public void decide(FilterInvocation invocation, java.util.Collection<org.springframework.security.access.ConfigAttribute> config) throws java.io.IOException, javax.servlet.ServletException
Description copied from interface:ChannelProcessorDecided whether the presentedFilterInvocationprovides the appropriate level of channel security based on the requested list of ConfigAttributes.- Specified by:
decidein interfaceChannelProcessor- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
getEntryPoint
public ChannelEntryPoint getEntryPoint()
-
getSecureKeyword
public java.lang.String getSecureKeyword()
-
setEntryPoint
public void setEntryPoint(ChannelEntryPoint entryPoint)
-
setSecureKeyword
public void setSecureKeyword(java.lang.String secureKeyword)
-
supports
public boolean supports(org.springframework.security.access.ConfigAttribute attribute)
Description copied from interface:ChannelProcessorIndicates whether thisChannelProcessoris able to process the passedConfigAttribute.This allows the
ChannelProcessingFilterto check every configuration attribute can be consumed by the configuredChannelDecisionManager.- Specified by:
supportsin interfaceChannelProcessor- Parameters:
attribute- a configuration attribute that has been configured against the ChannelProcessingFilter.- Returns:
- true if this
ChannelProcessorcan support the passed configuration attribute
-
-