IBM WebSphere Application ServerTM
Release 7

com.ibm.wsspi.security.ltpa
Interface Token

All Superinterfaces:
java.lang.Cloneable

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.


Method Summary
 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.
 

Method Detail

isValid

boolean isValid()
                throws com.ibm.websphere.security.auth.InvalidTokenException,
                       com.ibm.websphere.security.auth.TokenExpiredException
Validates the token including expiration, signature, etc.

Parameters:
com.ibm.ws.security.ltpa.Token - token
Returns:
boolean
Throws:
com.ibm.websphere.security.auth.InvalidTokenException
com.ibm.websphere.security.auth.TokenExpiredException

getBytes

byte[] getBytes()
                throws com.ibm.websphere.security.auth.InvalidTokenException,
                       com.ibm.websphere.security.auth.TokenExpiredException
Gets the encrypted bytes for inclusion in the WSCredential or SSO cookie.

Returns:
byte[]
Throws:
com.ibm.websphere.security.auth.InvalidTokenException
com.ibm.websphere.security.auth.TokenExpiredException

getExpiration

long getExpiration()
Gets the expiration as a long.

Returns:
long

getVersion

short getVersion()
Gets the version of the token as an short.

Returns:
short

getAttributes

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.

Parameters:
String - key
Returns:
String[]

addAttribute

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. 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.

Parameters:
String - key
String - value
Returns:
String[]

getAttributeNames

java.util.Enumeration getAttributeNames()
Gets the attribute names

Returns:
java.lang.Enumeration

clone

java.lang.Object clone()
Makes a deep copy of this token when necessary

Returns:
Object

IBM WebSphere Application ServerTM
Release 7