Class SecurityFlowExecutionListener
java.lang.Object
org.springframework.webflow.security.SecurityFlowExecutionListener
- All Implemented Interfaces:
FlowExecutionListener
Flow security integration with Spring Security
- Author:
- Scott Andrews, Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.access.AccessDecisionManagerDeprecated, for removal: This API element is subject to removal in a future version.protected voiddecide(SecurityRule rule, Object object) Performs a Spring Security authorization decision.org.springframework.security.access.AccessDecisionManagerDeprecated, for removal: This API element is subject to removal in a future version.in favor of using anAuthorizationManagerby settingsetAuthorizationManagerInitializer(Function)insteadprotected Collection<org.springframework.security.access.ConfigAttribute>Deprecated, for removal: This API element is subject to removal in a future version.in favor of using anAuthorizationManagerby settingsetAuthorizationManagerInitializer(Function)insteadvoidsessionCreating(RequestContext context, FlowDefinition definition) Called to indicate a new flow definition session is about to be created.voidsetAccessDecisionManager(org.springframework.security.access.AccessDecisionManager accessDecisionManager) Deprecated, for removal: This API element is subject to removal in a future version.in favor of using anAuthorizationManagerby settingsetAuthorizationManagerInitializer(Function)insteadvoidsetAuthorizationManagerInitializer(Function<SecurityRule, org.springframework.security.authorization.AuthorizationManager<Object>> initializer) Provide a function that determines theAuthorizationManagerto use for a givenSecurityRule.voidstateEntering(RequestContext context, StateDefinition state) Called when a state transitions, after the transition is matched but before the transition occurs.voidtransitionExecuting(RequestContext context, TransitionDefinition transition) Called when a transition is matched but before the transition occurs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.webflow.execution.FlowExecutionListener
eventSignaled, exceptionThrown, paused, requestProcessed, requestSubmitted, resuming, sessionEnded, sessionEnding, sessionStarted, sessionStarting, stateEntered, viewRendered, viewRendering
-
Constructor Details
-
SecurityFlowExecutionListener
public SecurityFlowExecutionListener()
-
-
Method Details
-
setAuthorizationManagerInitializer
public void setAuthorizationManagerInitializer(Function<SecurityRule, org.springframework.security.authorization.AuthorizationManager<Object>> initializer) Provide a function that determines theAuthorizationManagerto use for a givenSecurityRule.By default,
SecurityRule.getAuthorizationManager()is used.- Parameters:
initializer- the function to use- Since:
- 3.0.1
-
getAccessDecisionManager
@Deprecated(since="3.0.1", forRemoval=true) public org.springframework.security.access.AccessDecisionManager getAccessDecisionManager()Deprecated, for removal: This API element is subject to removal in a future version.in favor of using anAuthorizationManagerby settingsetAuthorizationManagerInitializer(Function)insteadGet the access decision manager that makes flow authorization decisions.- Returns:
- the decision manager
-
setAccessDecisionManager
@Deprecated(since="3.0.1", forRemoval=true) public void setAccessDecisionManager(org.springframework.security.access.AccessDecisionManager accessDecisionManager) Deprecated, for removal: This API element is subject to removal in a future version.in favor of using anAuthorizationManagerby settingsetAuthorizationManagerInitializer(Function)insteadSet the access decision manager that makes flow authorization decisions.- Parameters:
accessDecisionManager- the decision manager to user
-
sessionCreating
Description copied from interface:FlowExecutionListenerCalled to indicate a new flow definition session is about to be created. Called before the session is created. An exception may be thrown from this method to veto the start operation. Any type of runtime exception can be used for this purpose.- Specified by:
sessionCreatingin interfaceFlowExecutionListener- Parameters:
context- the current flow request contextdefinition- the flow for which a new session is starting
-
stateEntering
public void stateEntering(RequestContext context, StateDefinition state) throws EnterStateVetoException Description copied from interface:FlowExecutionListenerCalled when a state transitions, after the transition is matched but before the transition occurs.- Specified by:
stateEnteringin interfaceFlowExecutionListener- Parameters:
context- the current flow request contextstate- the proposed state to transition to- Throws:
EnterStateVetoException- when entering the state is not allowed
-
transitionExecuting
Description copied from interface:FlowExecutionListenerCalled when a transition is matched but before the transition occurs.- Specified by:
transitionExecutingin interfaceFlowExecutionListener- Parameters:
context- the current flow request contexttransition- the proposed transition
-
decide
Performs a Spring Security authorization decision. Decision will use the provided AccessDecisionManager. If no AccessDecisionManager is provided a role based manager will be selected according to the comparison type of the rule.- Parameters:
rule- the rule to base the decisionobject- the execution listener phase
-
createAccessDecisionManager
@Deprecated(since="3.0.1", forRemoval=true) protected org.springframework.security.access.AccessDecisionManager createAccessDecisionManager(SecurityRule rule) Deprecated, for removal: This API element is subject to removal in a future version.in favor of using anAuthorizationManagerby settingsetAuthorizationManagerInitializer(Function)insteadReturn anAccessDecisionManagerfor the SecurityRule.By default, returns
nullin which case anAuthorizationManageris used instead ofAccessDecisionManager.- Parameters:
rule- the rule to check- Returns:
- the manager to use, or
null
-
getConfigAttributes
@Deprecated(since="3.0.1", forRemoval=true) protected Collection<org.springframework.security.access.ConfigAttribute> getConfigAttributes(SecurityRule rule) Deprecated, for removal: This API element is subject to removal in a future version.in favor of using anAuthorizationManagerby settingsetAuthorizationManagerInitializer(Function)insteadConvert SecurityRule into a form understood by Spring Security- Parameters:
rule- the rule to convert- Returns:
- list of ConfigAttributes for Spring Security
-
AuthorizationManagerby settingsetAuthorizationManagerInitializer(Function)instead