|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.api.security.authentication.token.TokenCredentials
public final class TokenCredentials
TokenCredentials implements the Credentials
interface and represents single token credentials. Similar to
SimpleCredentials this credentials implementation allows
to set additional attributes.
| Constructor Summary | |
|---|---|
TokenCredentials(String token)
Create a new instance. |
|
| Method Summary | |
|---|---|
String |
getAttribute(String name)
Returns the value of the named attribute as an Object, or
null if no attribute of the given name exists. |
String[] |
getAttributeNames()
Returns the names of the attributes available to this credentials instance. |
String |
getToken()
Returns the token this credentials are built from. |
void |
removeAttribute(String name)
Removes an attribute from this credentials instance. |
void |
setAttribute(String name,
String value)
Stores an attribute in this credentials instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TokenCredentials(String token)
throws IllegalArgumentException
token - A token string used to create this credentials instance.
IllegalArgumentException - If the specified token is null
or empty string.| Method Detail |
|---|
public String getToken()
public void setAttribute(String name,
String value)
name - a String specifying the name of the attributevalue - the Object to be storedpublic String getAttribute(String name)
Object, or
null if no attribute of the given name exists.
name - a String specifying the name of the attribute
Object containing the value of the attribute, or
null if the attribute does not existpublic void removeAttribute(String name)
name - a String specifying the name of the attribute to
removepublic String[] getAttributeNames()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||