com.filenet.wcm.toolkit.server.base
Class InternalTokenPolicy

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.base.InternalTokenPolicy
All Implemented Interfaces:
UserTokenPolicyInterface

public final class InternalTokenPolicy
extends java.lang.Object
implements UserTokenPolicyInterface


Field Summary
protected  WcmController controller
           
protected  WcmDataStore dataStore
           
protected  boolean internalTokensEnabled
           
protected  java.lang.String signedInIUT
           
 
Constructor Summary
InternalTokenPolicy(WcmController controller)
           
 
Method Summary
 int getTokenTimeoutInterval()
          Timeout interval in seconds.
 java.lang.String getUserToken(java.lang.String user, java.lang.String password, WcmRequestMap extraParameters, boolean verify)
          Get an expirable user token.
 boolean isSignedIn(java.lang.String userToken)
          If the specified token represents a current signed in user, and is within the timeout, return true.
 boolean isTokenEnabled(boolean silent)
          Verify that any configuration required for dealing with user tokens has been done.
 java.lang.String setCredentials(java.lang.String userToken, boolean useAll)
          Set credentials via token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controller

protected WcmController controller

dataStore

protected WcmDataStore dataStore

internalTokensEnabled

protected boolean internalTokensEnabled

signedInIUT

protected java.lang.String signedInIUT
Constructor Detail

InternalTokenPolicy

public InternalTokenPolicy(WcmController controller)
                    throws java.lang.Exception
Method Detail

isTokenEnabled

public boolean isTokenEnabled(boolean silent)
Description copied from interface: UserTokenPolicyInterface
Verify that any configuration required for dealing with user tokens has been done. If silent is true, and configuration is incomplete, false will be returned. Exceptions are caught and discarded in this case as well. If silent is false, and configuration is incomplete, an exception will be thrown in order to report details on any configuration issues.

Specified by:
isTokenEnabled in interface UserTokenPolicyInterface
Parameters:
silent -
Returns:
boolean true or false.

getUserToken

public java.lang.String getUserToken(java.lang.String user,
                                     java.lang.String password,
                                     WcmRequestMap extraParameters,
                                     boolean verify)
                              throws java.lang.Exception
Description copied from interface: UserTokenPolicyInterface
Get an expirable user token.

Specified by:
getUserToken in interface UserTokenPolicyInterface
Parameters:
user - - The user name.
password - - The user's password.
extraParameters - - Any additional parameters such as appId or domain, or others.
Returns:
A token that can be passed into the setCredentials signature in this interface to authenticate.
Throws:
java.lang.Exception

isSignedIn

public boolean isSignedIn(java.lang.String userToken)
Description copied from interface: UserTokenPolicyInterface
If the specified token represents a current signed in user, and is within the timeout, return true.

Specified by:
isSignedIn in interface UserTokenPolicyInterface
Parameters:
userToken -
Returns:

setCredentials

public java.lang.String setCredentials(java.lang.String userToken,
                                       boolean useAll)
                                throws java.lang.Exception
Set credentials via token. The useAll parameter is ignored in this implementation.

Specified by:
setCredentials in interface UserTokenPolicyInterface
Parameters:
userToken - The user token retrieved via the getToken method in this interface.
useAll - When true, use all of the parameters contained in the token when signing in. If false, some parameters may be ignored and/or hard coded.
Returns:
String value of the page to redirect to, if successful.
Throws:
java.lang.Exception

getTokenTimeoutInterval

public int getTokenTimeoutInterval()
Timeout interval in seconds.

Specified by:
getTokenTimeoutInterval in interface UserTokenPolicyInterface
Returns:


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.