com.elasticpath.service.auth.impl
Class CustomerAuthorityGranterImpl

java.lang.Object
  extended by com.elasticpath.service.auth.impl.CustomerAuthorityGranterImpl
All Implemented Interfaces:
org.acegisecurity.providers.jaas.AuthorityGranter

public class CustomerAuthorityGranterImpl
extends java.lang.Object
implements org.acegisecurity.providers.jaas.AuthorityGranter

CustomerAuthorityGranterImpl inspects a JAAS principal (namely a Customer) and returns the role names that should be granted to this principal from the Customer object.


Constructor Summary
CustomerAuthorityGranterImpl()
           
 
Method Summary
 java.util.Set grant(java.security.Principal principal)
          Grants the Customer roles to the Customer principal returned by JAAS.
 void setCustomerService(CustomerService customerService)
          Set the Customer service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomerAuthorityGranterImpl

public CustomerAuthorityGranterImpl()
Method Detail

grant

public java.util.Set grant(java.security.Principal principal)
Grants the Customer roles to the Customer principal returned by JAAS.

Specified by:
grant in interface org.acegisecurity.providers.jaas.AuthorityGranter
Parameters:
principal - - The principal returned from the LoginContext subject
Returns:
a java.util.Set of role names to grant

setCustomerService

public void setCustomerService(CustomerService customerService)
Set the Customer service.

Parameters:
customerService - the customer service