Class EventExpressionVoter<T>
java.lang.Object
org.springframework.statemachine.security.EventExpressionVoter<T>
- All Implemented Interfaces:
org.springframework.security.access.AccessDecisionVoter<org.springframework.messaging.Message<T>>
public class EventExpressionVoter<T>
extends Object
implements org.springframework.security.access.AccessDecisionVoter<org.springframework.messaging.Message<T>>
Voter which handles
Message
authorisation decisions. If a
EventExpressionConfigAttribute
is found, then its expression is evaluated. If
true, ACCESS_GRANTED
is returned. If false, ACCESS_DENIED
is returned.
If no MessageExpressionConfigAttribute
is found, then ACCESS_ABSTAIN
is
returned.- Author:
- Rob Winch, Janne Valkealahti
-
Field Summary
Fields inherited from interface org.springframework.security.access.AccessDecisionVoter
ACCESS_ABSTAIN, ACCESS_DENIED, ACCESS_GRANTED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setExpressionHandler
(org.springframework.security.access.expression.SecurityExpressionHandler<org.springframework.messaging.Message<T>> expressionHandler) boolean
boolean
supports
(org.springframework.security.access.ConfigAttribute attribute) int
vote
(org.springframework.security.core.Authentication authentication, org.springframework.messaging.Message<T> message, Collection<org.springframework.security.access.ConfigAttribute> attributes)
-
Constructor Details
-
EventExpressionVoter
public EventExpressionVoter()
-
-
Method Details
-
vote
public int vote(org.springframework.security.core.Authentication authentication, org.springframework.messaging.Message<T> message, Collection<org.springframework.security.access.ConfigAttribute> attributes) - Specified by:
vote
in interfaceorg.springframework.security.access.AccessDecisionVoter<T>
-
supports
public boolean supports(org.springframework.security.access.ConfigAttribute attribute) - Specified by:
supports
in interfaceorg.springframework.security.access.AccessDecisionVoter<T>
-
supports
- Specified by:
supports
in interfaceorg.springframework.security.access.AccessDecisionVoter<T>
-
setExpressionHandler
public void setExpressionHandler(org.springframework.security.access.expression.SecurityExpressionHandler<org.springframework.messaging.Message<T>> expressionHandler)
-