toolbox.opensso.idm
Class TokenHelper

java.lang.Object
  extended by toolbox.opensso.idm.TokenHelper

public class TokenHelper
extends java.lang.Object

Helper class to create and manage a SSOToken.

Author:
Hannes Holtzhausen.

Constructor Summary
TokenHelper(java.lang.String user, java.lang.String passwd, java.lang.String realm, java.lang.String module)
          Create a new TokenHelper instance.
 
Method Summary
 void destroyToken()
          Destroy the token managed by this helper.
 com.iplanet.sso.SSOToken getToken()
          Return the SSOToken managed by this helper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenHelper

public TokenHelper(java.lang.String user,
                   java.lang.String passwd,
                   java.lang.String realm,
                   java.lang.String module)
            throws IdmException
Create a new TokenHelper instance.

Parameters:
user - String containing the user name.
passwd - String containing the password.
realm - String containing the realm name or DN.
module - String containing the name of login module.
Throws:
IdmException - if the helper cannot be initialised.
Method Detail

getToken

public com.iplanet.sso.SSOToken getToken()
                                  throws IdmException
Return the SSOToken managed by this helper.

Returns:
SSOToken instance.
Throws:
IdmException - if the token cannot be returned.

destroyToken

public void destroyToken()
Destroy the token managed by this helper.