GigaSpaces XAP 9.7.2 API

com.gigaspaces.security.authorities
Class GrantedAuthorities

java.lang.Object
  extended by com.gigaspaces.security.authorities.GrantedAuthorities
All Implemented Interfaces:
Serializable

public final class GrantedAuthorities
extends Object
implements Serializable

Encapsulates the authorities granted to a specific user, to ease access control and authorization decisions.

Since:
7.0.1
Author:
Moran Avigdor
See Also:
Serialized Form

Constructor Summary
GrantedAuthorities(Authority[] authorities)
           
 
Method Summary
 boolean isGranted(Privilege privilege)
          Evaluates to true if has been granted the required privilege, disregarding any classname filters of a SpaceAuthority.
 boolean isGranted(Privilege privilege, Object object)
          Evaluates to true if has been granted the required privileges to access the specified object.
 boolean isUserInRole(String role)
          Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrantedAuthorities

public GrantedAuthorities(Authority[] authorities)
Method Detail

isGranted

public boolean isGranted(Privilege privilege)
Evaluates to true if has been granted the required privilege, disregarding any classname filters of a SpaceAuthority.

Parameters:
privilege - the required privilege.
Returns:
true if the required privilege was granted; false otherwise.

isGranted

public boolean isGranted(Privilege privilege,
                         Object object)
Evaluates to true if has been granted the required privileges to access the specified object. The data object parameter is used against one of the SpaceAuthority.Filters; if null will return false. Currently all implemented filters accept an object of type String.

Parameters:
privilege - the required privilege
object - the data object (can be null)
Returns:
true if the required privilege to access the object was granted; false otherwise.

isUserInRole

public boolean isUserInRole(String role)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role".

Parameters:
role - a String specifying the name of the role
Returns:
a boolean indicating whether the user making this request belongs to a given role; false if the user has not been authenticated

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.