org.springframework.security.oauth.provider.attributes
Class ConsumerSecurityVoter

java.lang.Object
  extended by org.springframework.security.oauth.provider.attributes.ConsumerSecurityVoter
All Implemented Interfaces:
org.springframework.security.access.AccessDecisionVoter<Object>

public class ConsumerSecurityVoter
extends Object
implements org.springframework.security.access.AccessDecisionVoter<Object>

Author:
Ryan Heaton, Andrew McCall

Field Summary
 
Fields inherited from interface org.springframework.security.access.AccessDecisionVoter
ACCESS_ABSTAIN, ACCESS_DENIED, ACCESS_GRANTED
 
Constructor Summary
ConsumerSecurityVoter()
           
 
Method Summary
 boolean supports(Class<?> clazz)
          All classes are supported.
 boolean supports(org.springframework.security.access.ConfigAttribute attribute)
          The config attribute is supported if it's an instance of ConsumerSecurityConfig.
 int vote(org.springframework.security.core.Authentication authentication, Object object, Collection<org.springframework.security.access.ConfigAttribute> configAttributes)
          Votes on giving access to the specified authentication based on the security attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerSecurityVoter

public ConsumerSecurityVoter()
Method Detail

supports

public boolean supports(org.springframework.security.access.ConfigAttribute attribute)
The config attribute is supported if it's an instance of ConsumerSecurityConfig.

Specified by:
supports in interface org.springframework.security.access.AccessDecisionVoter<Object>
Parameters:
attribute - The attribute.
Returns:
Whether the attribute is an instance of ConsumerSecurityConfig.

supports

public boolean supports(Class<?> clazz)
All classes are supported.

Specified by:
supports in interface org.springframework.security.access.AccessDecisionVoter<Object>
Parameters:
clazz - The class.
Returns:
true.

vote

public int vote(org.springframework.security.core.Authentication authentication,
                Object object,
                Collection<org.springframework.security.access.ConfigAttribute> configAttributes)
Votes on giving access to the specified authentication based on the security attributes.

Specified by:
vote in interface org.springframework.security.access.AccessDecisionVoter<Object>
Parameters:
authentication - The authentication.
object - The object.
configAttributes - the ConfigAttributes.
Returns:
The vote.


Copyright © 2012. All Rights Reserved.