public class AuthorizationContext extends Object
Constructor and Description |
---|
AuthorizationContext()
Constructs a blank authorization context.
|
AuthorizationContext(Map<String,Object> attributes)
Creates a new authorization context using the given attribute map as a backing store.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object that) |
<T> T |
getAttribute(String key)
Gets an attribute from the authorization context, returning null if it does not exist.
|
Map<String,Object> |
getAttributes()
Gets a copy of all attributes set in this authorization context.
|
int |
hashCode() |
AuthorizationContext |
setAttribute(String key,
Object value)
Sets an attribute in the shared context.
|
public AuthorizationContext()
public <T> T getAttribute(String key)
T
- The result type.key
- The key of the attribute.NullPointerException
- If the key is null.ClassCastException
- If the attribute exists but is not of the expected type.public AuthorizationContext setAttribute(String key, Object value)
key
- The key to set.value
- The value to associate with the key.NullPointerException
- If the key or value is null.public Map<String,Object> getAttributes()
Copyright © 2010-2018, ForgeRock All Rights Reserved.