public interface Token
extends java.lang.Cloneable
This interface is implemented by a provider to define the behavior of the LTPA token. The TokenFactory implementation should handle loading the Token implementation.
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
addAttribute(java.lang.String key,
java.lang.String value)
Adds the attribute name/value pair to a String[] list of values for
the specified key.
|
java.lang.Object |
clone()
Makes a deep copy of this token when necessary
|
java.util.Enumeration |
getAttributeNames()
Gets the attribute names
|
java.lang.String[] |
getAttributes(java.lang.String key)
Gets the attribute value based on the named value.
|
byte[] |
getBytes()
Gets the encrypted bytes for inclusion in the WSCredential or SSO cookie.
|
long |
getExpiration()
Gets the expiration as a long.
|
short |
getVersion()
Gets the version of the token as an short.
|
boolean |
isValid()
Validates the token including expiration, signature, etc.
|
boolean isValid() throws com.ibm.websphere.security.auth.InvalidTokenException, com.ibm.websphere.security.auth.TokenExpiredException
com.ibm.ws.security.ltpa.Token
- tokencom.ibm.websphere.security.auth.InvalidTokenException
com.ibm.websphere.security.auth.TokenExpiredException
byte[] getBytes() throws com.ibm.websphere.security.auth.InvalidTokenException, com.ibm.websphere.security.auth.TokenExpiredException
com.ibm.websphere.security.auth.InvalidTokenException
com.ibm.websphere.security.auth.TokenExpiredException
long getExpiration()
short getVersion()
java.lang.String[] getAttributes(java.lang.String key)
Gets the attribute value based on the named value. A string array is returned containing all values of the attribute previously set.
String
- keyjava.lang.String[] addAttribute(java.lang.String key, java.lang.String value)
Adds the attribute name/value pair to a String[] list of values for the specified key. Once an attribute is set, it cannot only be appended to but not overwritten. Returns the previous value(s) set for key, not including the current value being set, or null if not previously set.
String
- keyString
- valuejava.util.Enumeration getAttributeNames()
java.lang.Object clone()