IBM WebSphere Application ServerTM
Release 7

com.ibm.wsspi.security.ltpa
Interface TokenFactory


public interface TokenFactory

This interface is implemented by a provider to create LTPA tokens. The class is loaded via the security property "com.ibm.wsspi.security.ltpa.tokenFactory". One can put multiple token factories in this property using the | delimiter. The order determines which token will be used for a specific purpose, to be defined.


Method Summary
 Token createToken(java.util.Map tokenData)
          Returns a Token based on the type of configured token
 void initialize(java.util.Map tokenFactoryMap)
          Initializes the token factories with a Map of configuration info.
 Token validateTokenBytes(byte[] encryptedData)
          Returns a Token based on the type of configured token
 

Method Detail

initialize

void initialize(java.util.Map tokenFactoryMap)
Initializes the token factories with a Map of configuration info. This method will be called any time the configuration data changes including the encryption keys.

Parameters:
java.util.Map - tokenFactoryMap

validateTokenBytes

Token validateTokenBytes(byte[] encryptedData)
                         throws com.ibm.websphere.security.auth.InvalidTokenException,
                                com.ibm.websphere.security.auth.TokenExpiredException
Returns a Token based on the type of configured token

Parameters:
byte[] - token data
Returns:
com.ibm.wsspi.security.ltpa.Token
Throws:
com.ibm.websphere.security.auth.InvalidTokenException
com.ibm.websphere.security.auth.TokenExpiredException

createToken

Token createToken(java.util.Map tokenData)
                  throws com.ibm.websphere.security.auth.TokenCreationFailedException
Returns a Token based on the type of configured token

Parameters:
java.util.Map - a hashmap containing configuration info for the Token impl. The tokenData Map should contain a userUniqueId: "com.ibm.wsspi.security.ltpa.userUniqueId"
Returns:
com.ibm.wsspi.security.ltpa.Token
Throws:
com.ibm.websphere.security.auth.TokenCreationFailedException

IBM WebSphere Application ServerTM
Release 7