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

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

public class UserTokenPolicy
extends java.lang.Object
implements UserTokenPolicyInterface


Field Summary
protected  WcmBootstrapPrefs bootstrap
           
protected  WcmController controller
           
protected  WcmDataStore dataStore
           
 
Constructor Summary
UserTokenPolicy(WcmController controller)
           
UserTokenPolicy(WcmController controller, WcmDataStore dataStore)
           
UserTokenPolicy(WcmController controller, WcmDataStore dataStore, WcmBootstrapPrefs bootstrap)
           
 
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

bootstrap

protected WcmBootstrapPrefs bootstrap
Constructor Detail

UserTokenPolicy

public UserTokenPolicy(WcmController controller)

UserTokenPolicy

public UserTokenPolicy(WcmController controller,
                       WcmDataStore dataStore)

UserTokenPolicy

public UserTokenPolicy(WcmController controller,
                       WcmDataStore dataStore,
                       WcmBootstrapPrefs bootstrap)
Method Detail

isTokenEnabled

public boolean isTokenEnabled(boolean silent)
                       throws java.lang.Exception
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.
Throws:
java.lang.Exception

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)
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. In this implementation useAll indicates whether or not to use the appId encoded within the token during signin.

Specified by:
setCredentials in interface UserTokenPolicyInterface
Parameters:
userToken - The user token retrieved via the getToken method in this interface.
useAll - When true, the appId parameter found in the user token is used for signin. Otherwise, the default Workplace appId is used.
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.