com.ibm.wsspi.security.ltpa

Interface Token

All Superinterfaces:
java.lang.Cloneable

  1. public interface Token
  2. 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

Modifier and Type Method and Description
  1. 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.
  1. java.lang.Object
clone()
Makes a deep copy of this token when necessary
  1. java.util.Enumeration
getAttributeNames()
Gets the attribute names
  1. java.lang.String[]
getAttributes(java.lang.String key)
Gets the attribute value based on the named value.
  1. byte[]
getBytes()
Gets the encrypted bytes for inclusion in the WSCredential or SSO cookie.
  1. long
getExpiration()
Gets the expiration as a long.
  1. short
getVersion()
Gets the version of the token as an short.
  1. boolean
isValid()
Validates the token including expiration, signature, etc.

Method Detail

isValid

  1. boolean isValid()
  2. throws com.ibm.websphere.security.auth.InvalidTokenException
  3. com.ibm.websphere.security.auth.TokenExpiredException
Validates the token including expiration, signature, etc.
Returns:
boolean
Throws:
com.ibm.websphere.security.auth.InvalidTokenException
com.ibm.websphere.security.auth.TokenExpiredException

getBytes

  1. byte[] getBytes()
  2. throws com.ibm.websphere.security.auth.InvalidTokenException
  3. 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

  1. long getExpiration()
Gets the expiration as a long.
Returns:
long

getVersion

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

getAttributes

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

Returns:
String[]

addAttribute

  1. java.lang.String[] addAttribute( java.lang.String key,
  2. 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.

Returns:
String[]

getAttributeNames

  1. java.util.Enumeration getAttributeNames( )
Gets the attribute names
Returns:
java.lang.Enumeration

clone

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