Class ChannelDecisionManagerImpl
- java.lang.Object
-
- org.springframework.security.web.access.channel.ChannelDecisionManagerImpl
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,ChannelDecisionManager
public class ChannelDecisionManagerImpl extends java.lang.Object implements ChannelDecisionManager, org.springframework.beans.factory.InitializingBean
Implementation ofChannelDecisionManager.Iterates through each configured
ChannelProcessor. If aChannelProcessorhas any issue with the security of the request, it should cause a redirect, exception or whatever other action is appropriate for theChannelProcessorimplementation.Once any response is committed (ie a redirect is written to the response object), the
ChannelDecisionManagerImplwill not iterate through any furtherChannelProcessors.The attribute "ANY_CHANNEL" if applied to a particular URL, the iteration through the channel processors will be skipped (see SEC-494, SEC-335).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANY_CHANNEL
-
Constructor Summary
Constructors Constructor Description ChannelDecisionManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voiddecide(FilterInvocation invocation, java.util.Collection<ConfigAttribute> config)Decided whether the presentedFilterInvocationprovides the appropriate level of channel security based on the requested list of ConfigAttributes.protected java.util.List<ChannelProcessor>getChannelProcessors()voidsetChannelProcessors(java.util.List<?> channelProcessors)booleansupports(ConfigAttribute attribute)Indicates whether thisChannelDecisionManageris able to process the passedConfigAttribute.
-
-
-
Field Detail
-
ANY_CHANNEL
public static final java.lang.String ANY_CHANNEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
decide
public void decide(FilterInvocation invocation, java.util.Collection<ConfigAttribute> config) throws java.io.IOException, javax.servlet.ServletException
Description copied from interface:ChannelDecisionManagerDecided whether the presentedFilterInvocationprovides the appropriate level of channel security based on the requested list of ConfigAttributes.- Specified by:
decidein interfaceChannelDecisionManager- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
getChannelProcessors
protected java.util.List<ChannelProcessor> getChannelProcessors()
-
setChannelProcessors
public void setChannelProcessors(java.util.List<?> channelProcessors)
-
supports
public boolean supports(ConfigAttribute attribute)
Description copied from interface:ChannelDecisionManagerIndicates whether thisChannelDecisionManageris able to process the passedConfigAttribute.This allows the
ChannelProcessingFilterto check every configuration attribute can be consumed by the configuredChannelDecisionManager.- Specified by:
supportsin interfaceChannelDecisionManager- Parameters:
attribute- a configuration attribute that has been configured against theChannelProcessingFilter- Returns:
- true if this
ChannelDecisionManagercan support the passed configuration attribute
-
-