Class Jsr250Voter
- java.lang.Object
-
- org.springframework.security.access.annotation.Jsr250Voter
-
- All Implemented Interfaces:
AccessDecisionVoter<java.lang.Object>
public class Jsr250Voter extends java.lang.Object implements AccessDecisionVoter<java.lang.Object>
Voter on JSR-250 configuration attributes.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from interface org.springframework.security.access.AccessDecisionVoter
ACCESS_ABSTAIN, ACCESS_DENIED, ACCESS_GRANTED
-
-
Constructor Summary
Constructors Constructor Description Jsr250Voter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
supports(java.lang.Class<?> clazz)
All classes are supported.boolean
supports(ConfigAttribute configAttribute)
The specified config attribute is supported if its an instance of aJsr250SecurityConfig
.int
vote(Authentication authentication, java.lang.Object object, java.util.Collection<ConfigAttribute> definition)
Votes according to JSR 250.
-
-
-
Method Detail
-
supports
public boolean supports(ConfigAttribute configAttribute)
The specified config attribute is supported if its an instance of aJsr250SecurityConfig
.- Specified by:
supports
in interfaceAccessDecisionVoter<java.lang.Object>
- Parameters:
configAttribute
- The config attribute.- Returns:
- whether the config attribute is supported.
-
supports
public boolean supports(java.lang.Class<?> clazz)
All classes are supported.- Specified by:
supports
in interfaceAccessDecisionVoter<java.lang.Object>
- Parameters:
clazz
- the class.- Returns:
- true
-
vote
public int vote(Authentication authentication, java.lang.Object object, java.util.Collection<ConfigAttribute> definition)
Votes according to JSR 250.If no JSR-250 attributes are found, it will abstain, otherwise it will grant or deny access based on the attributes that are found.
- Specified by:
vote
in interfaceAccessDecisionVoter<java.lang.Object>
- Parameters:
authentication
- The authentication object.object
- The access object.definition
- The configuration definition.- Returns:
- The vote.
-
-