com.filenet.wcm.toolkit.server.base
Class InternalTokenPolicy
- java.lang.Object
com.filenet.wcm.toolkit.server.base.InternalTokenPolicy
All implemented interfaces:
- public final class InternalTokenPolicy
- extends java.lang.Object
- implements UserTokenPolicyInterface
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
controller
|
|
dataStore
|
|
internalTokensEnabled
|
|
signedInIUT
|
Constructor Summary
| Constructor and Description |
|---|
InternalTokenPolicy(WcmController controller)
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
getTokenTimeoutInterval()
Timeout interval in seconds.
|
|
getUserToken(java.lang.String user,java.lang.String password,WcmRequestMap extraParameters,boolean verify)
|
|
isSignedIn(java.lang.String userToken)
|
|
isTokenEnabled(boolean silent)
|
|
isTokenEnabled(WcmController controller,boolean silent)
|
|
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
Throws:
java.lang.ExceptionMethod Detail
isTokenEnabled
- public static boolean isTokenEnabled( WcmController controller,
- boolean silent)
isTokenEnabled
- public boolean isTokenEnabled(boolean silent)
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
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.ExceptionisSignedIn
- 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
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.ExceptiongetTokenTimeoutInterval
- public int getTokenTimeoutInterval( )
Timeout interval in seconds.
Specified by:
getTokenTimeoutInterval in interface UserTokenPolicyInterface
Returns:
UserTokenPolicyInterface