com.filenet.wcm.toolkit.server.base

Class InternalTokenPolicy

  1. java.lang.Object
  2. extended bycom.filenet.wcm.toolkit.server.base.InternalTokenPolicy
All implemented interfaces:
UserTokenPolicyInterface

  1. public final class InternalTokenPolicy
  2. extends java.lang.Object
  3. implements UserTokenPolicyInterface

Field Summary

Modifier and Type Field and Description
  1. protected
  2. WcmController
controller
  1. protected
  2. WcmDataStore
dataStore
  1. protected
  2. boolean
internalTokensEnabled
  1. protected
  2. java.lang.String
signedInIUT

Constructor Summary

Constructor and Description
InternalTokenPolicy(WcmController controller)

Method Summary

Modifier and Type Method and Description
  1. int
getTokenTimeoutInterval()
Timeout interval in seconds.
  1. java.lang.String
getUserToken(java.lang.String user,java.lang.String password,WcmRequestMap extraParameters,boolean verify)
  1. boolean
isSignedIn(java.lang.String userToken)
  1. boolean
isTokenEnabled(boolean silent)
  1. static
  2. boolean
isTokenEnabled(WcmController controller,boolean silent)
  1. 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

  1. protected WcmController controller

dataStore

  1. protected WcmDataStore dataStore

internalTokensEnabled

  1. protected boolean internalTokensEnabled

signedInIUT

  1. protected java.lang.String signedInIUT

Constructor Detail

InternalTokenPolicy

  1. public InternalTokenPolicy(WcmController controller)
  2. throws java.lang.Exception
Throws:
java.lang.Exception

Method Detail

isTokenEnabled

  1. public static boolean isTokenEnabled( WcmController controller,
  2. boolean silent)

isTokenEnabled

  1. 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:
Returns:
boolean true or false.

getUserToken

  1. public java.lang.String getUserToken( java.lang.String user,
  2. java.lang.String password,
  3. WcmRequestMap extraParameters,
  4. boolean verify)
  5. throws java.lang.Exception
Description copied from interface: UserTokenPolicyInterface
Get an expirable user token.
Specified by:
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

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

setCredentials

  1. public java.lang.String setCredentials( java.lang.String userToken,
  2. boolean useAll)
  3. throws java.lang.Exception
Set credentials via token. The useAll parameter is ignored in this implementation.
Specified by:
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

  1. public int getTokenTimeoutInterval( )
Timeout interval in seconds.
Specified by:
Returns: