|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.filenet.wcm.toolkit.server.util.WcmServerCredentials
WcmServerCredentials maintains credentials required for access to the Content Java API and and the Process Java API.
Field Summary | |
protected static WcmString |
classpathWillBeUsed
|
protected static WcmString |
configUnknown
|
protected java.util.Map |
threadMap
|
static java.lang.String |
USER_CREDENTIALS_KEY
A web session's user credentials that can be retrieved easily. |
Constructor Summary | |
protected |
WcmServerCredentials()
|
|
WcmServerCredentials(WcmDataStore ds,
java.lang.String user,
java.lang.String password)
Deprecated. Use constructors with verify argument. |
|
WcmServerCredentials(WcmDataStore ds,
java.lang.String user,
java.lang.String password,
boolean verify)
WcmServerCredentials constructor that does not specify the domain, and therefore uses the default domain. |
|
WcmServerCredentials(WcmDataStore ds,
java.lang.String appId,
java.lang.String user,
java.lang.String password)
Deprecated. Use constructors with verify argument. |
|
WcmServerCredentials(WcmDataStore ds,
java.lang.String appId,
java.lang.String user,
java.lang.String password,
boolean verify)
WcmServerCredentials constructor that does not specify the domain, and therefore uses the default domain. |
|
WcmServerCredentials(WcmDataStore ds,
java.lang.String appId,
java.lang.String user,
java.lang.String password,
boolean verify,
boolean containerJAASMode)
WcmServerCredentials constructor that does not specify the domain, and therefore uses the default domain. |
|
WcmServerCredentials(WcmDataStore ds,
java.lang.String appId,
java.lang.String user,
java.lang.String password,
java.lang.String domain)
Deprecated. |
Method Summary | |
void |
addRouter(java.lang.String routerInfo)
|
static java.util.HashMap |
decodeSessionToken(WcmDataStore ds,
java.lang.String token)
Static utility method that returns a hashmap containing credentials information found in the specified token. |
static java.util.HashMap |
decodeSessionToken(WcmDataStore ds,
java.lang.String decodeAppId,
java.lang.String token,
long timeout)
Static utility method that returns a hashmap containing credentials information found in the specified token. |
java.lang.String |
getAppId()
Gets the appId that was set for this object. |
java.lang.String |
getCEServerURI()
Gets the RemoteServerUrl value from WcmApiConfig.properties that is associated with this object. |
static WcmServerCredentials |
getCurrent(WcmDataStore ds)
Get the current server credentials object from the data store. |
protected java.util.Set |
getGroups()
Returns the Java API groups object when WcmServerCredentials is valid. |
java.lang.String |
getPassword()
|
java.lang.String |
getRawUserId()
Get the user ID as it was originally passed into the constructor of this object. |
com.filenet.wcm.api.Session |
getSession()
Get an instance of Session corresponding to this WcmServerCredentials instance. |
static java.lang.String |
getSessionToken(WcmDataStore ds,
java.lang.String appId,
java.lang.String user,
java.lang.String password)
Static utility method that gets a credentials token based on the specified parameters. |
static java.lang.String |
getSessionToken(WcmDataStore ds,
java.lang.String appId,
java.lang.String user,
java.lang.String password,
boolean withPrecompensation)
Static utility method that gets a credentials token based on the specified parameters. |
static java.lang.String |
getSessionToken(WcmDataStore ds,
java.lang.String appId,
java.lang.String user,
java.lang.String password,
java.lang.String domain)
Deprecated. |
static java.lang.String |
getTokenEncryptionMode(WcmDataStore ds,
java.lang.String appId)
Return the encryption scheme being used for the specified appId. |
java.lang.String |
getUser()
Returns full user name (same as UserObject.getName()) |
com.filenet.api.util.UserContext |
getUserContext()
Returns the userContext basic property value. |
com.filenet.api.util.UserContext |
getUserContext(java.lang.String configurationName)
Get CE JavaAPI UserContext object based on the credentials in this object. |
java.lang.String |
getUserDisplayName()
|
java.lang.String |
getUserDistinguishedName()
|
java.lang.String |
getUserDomain()
Deprecated. Use getUserRealm() |
java.util.Map |
getUserExtraInformation()
getUserExtraInformation is available for backward compatibility in this release. |
java.util.Set |
getUserGroups()
|
java.lang.String |
getUserGuid()
|
java.lang.String |
getUserId()
Return the user ID for this instance of WcmServerCredentials. |
com.filenet.wcm.api.User |
getUserObject()
Returns user Object |
com.filenet.wcm.api.Realm |
getUserRealm()
Returns Realm object for the current user, cached for the session. |
java.lang.String |
getUserShortName()
|
java.lang.String |
getValidationError()
Get information when the credentials are invalid. |
java.lang.Exception |
getValidationException()
Get the validation Exception when the credentials are invalid. |
filenet.vw.api.VWSession |
getVWSession()
Get VWSession from WcmServerCredential |
filenet.vw.api.VWSession |
getVWSession(java.lang.String routerURL)
Get an instance of VWSession corresponding to this WcmServerCredentials instance. |
java.lang.String |
getVWSessionError()
Get information when the VWSession.logon() fails. |
java.lang.Exception |
getVWSessionException()
Get the VWException when the VWSession.logon() fails. |
protected void |
initialize(WcmDataStore ds)
Called from all constructors to initialize storage. |
boolean |
isContainerJAASMode()
Returns true when container based authentication is configured and being used. |
boolean |
isGuest()
Return true if the user is a guest. |
boolean |
isMemberOf(java.lang.String groupName)
Returns true if a user is a member of the group groupName |
boolean |
isMemberOf(java.lang.String[] groupNames)
Returns true if a user is a member of any of the groups in the groupNames array |
boolean |
isUsingLDAP()
|
boolean |
isValid()
Verify that this instance of WcmServerCredentials is valid. |
static void |
setCurrent(WcmDataStore ds,
WcmServerCredentials sc)
Set the current server credentials object in the data store. |
void |
setGuestUser(java.lang.String guestUserNameValue)
|
boolean |
setIsGuest(boolean value)
Mark these credentials as "guest" or not. |
boolean |
setIsSSOConfigured(boolean value)
Deprecated. - Use setIsSSOServerPluginMode |
boolean |
setIsSSOServerPluginMode(boolean serverSSOPluginMode)
Indicates that the credentials are dependent on a compatible CE/PE server plugin. |
void |
setLocale(java.util.Locale pLocale)
Specify the locale for these credentials. |
void |
valueBound(WcmDataStore ds,
java.lang.String key)
Method called when an object is bound to WcmDataStore. |
void |
valueUnbound(WcmDataStore ds,
java.lang.String key)
Method called when an object is un-bound from WcmDataStore. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final WcmString classpathWillBeUsed
protected static final WcmString configUnknown
protected java.util.Map threadMap
public static final java.lang.String USER_CREDENTIALS_KEY
WcmServerCredentials
,
Constant Field ValuesConstructor Detail |
public WcmServerCredentials(WcmDataStore ds, java.lang.String appId, java.lang.String user, java.lang.String password, java.lang.String domain) throws java.lang.Exception
public WcmServerCredentials(WcmDataStore ds, java.lang.String appId, java.lang.String user, java.lang.String password) throws java.lang.Exception
public WcmServerCredentials(WcmDataStore ds, java.lang.String user, java.lang.String password) throws java.lang.Exception
public WcmServerCredentials(WcmDataStore ds, java.lang.String appId, java.lang.String user, java.lang.String password, boolean verify) throws java.lang.Exception
ds
- A reference to WcmDataStore.appId
- An application ID key.user
- The user's user ID.password
- Ths user's password.
java.lang.Exception
public WcmServerCredentials(WcmDataStore ds, java.lang.String appId, java.lang.String user, java.lang.String password, boolean verify, boolean containerJAASMode) throws java.lang.Exception
ds
- A reference to WcmDataStore.appId
- An application ID key.user
- The user's user ID.password
- Ths user's password.
java.lang.Exception
public WcmServerCredentials(WcmDataStore ds, java.lang.String user, java.lang.String password, boolean verify) throws java.lang.Exception
ds
- A reference to WcmDataStore.user
- The user's user ID.password
- Ths user's password.
java.lang.Exception
protected WcmServerCredentials() throws java.lang.Exception
Method Detail |
public static WcmServerCredentials getCurrent(WcmDataStore ds)
ds
- The current WcmDataSore instance for this session.
public static void setCurrent(WcmDataStore ds, WcmServerCredentials sc) throws java.lang.Exception
ds
- The current WcmDataSore instance for this session.sc
- The new validated server credentials to save.
java.lang.Exception
protected void initialize(WcmDataStore ds) throws java.lang.Exception
ds
- - The current WcmDataStore object.
java.lang.Exception
public void setLocale(java.util.Locale pLocale)
pLocale
- A reference to the Locale to set.public boolean isUsingLDAP()
public boolean isContainerJAASMode()
public filenet.vw.api.VWSession getVWSession(java.lang.String routerURL)
routerURL
- The router URL to use.
public void addRouter(java.lang.String routerInfo)
public filenet.vw.api.VWSession getVWSession() throws java.lang.Exception
java.lang.Exception
- If there are problems retrieving data.public com.filenet.wcm.api.Session getSession()
public com.filenet.api.util.UserContext getUserContext(java.lang.String configurationName) throws javax.security.auth.login.LoginException, java.io.IOException
configurationName
- - optional JAAS login configuration name.
javax.security.auth.login.LoginException
java.io.IOException
public com.filenet.api.util.UserContext getUserContext()
public java.lang.String getCEServerURI()
public com.filenet.wcm.api.Realm getUserRealm()
public java.lang.String getPassword()
public java.lang.String getUserId()
getUserId
in interface WcmUserInformationInterface
public java.lang.String getRawUserId()
public com.filenet.wcm.api.User getUserObject()
public java.lang.String getUser()
public java.lang.String getUserGuid()
public java.lang.String getUserShortName()
public java.lang.String getUserDistinguishedName() throws com.filenet.wcm.api.PropertyNotFoundException
com.filenet.wcm.api.PropertyNotFoundException
public java.lang.String getUserDisplayName()
public java.lang.String getUserDomain()
public java.util.Map getUserExtraInformation()
getUserExtraInformation
in interface WcmUserInformationInterface
public java.util.Set getUserGroups()
public static java.lang.String getSessionToken(WcmDataStore ds, java.lang.String appId, java.lang.String user, java.lang.String password, java.lang.String domain) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getSessionToken(WcmDataStore ds, java.lang.String appId, java.lang.String user, java.lang.String password) throws java.lang.Exception
ds
- A reference to WcmDataStore.appId
- An application ID key.user
- The user's user ID.password
- Ths user's password.
java.lang.Exception
public static java.lang.String getSessionToken(WcmDataStore ds, java.lang.String appId, java.lang.String user, java.lang.String password, boolean withPrecompensation) throws java.lang.Exception
ds
- A reference to WcmDataStore.appId
- An application ID key.user
- The user's user ID.password
- Ths user's password.withPrecompensation
- When true, a time delta between CE and the web application is factored into the timestamp in the returned token.
java.lang.Exception
public static java.lang.String getTokenEncryptionMode(WcmDataStore ds, java.lang.String appId) throws java.lang.Exception
ds
- appId
-
java.lang.Exception
public java.lang.String getAppId() throws java.lang.Exception
java.lang.Exception
public static java.util.HashMap decodeSessionToken(WcmDataStore ds, java.lang.String token) throws java.lang.Exception
ds
- A reference to WcmDataStore.token
- A JavaAPI Session token containing encoded credentials.
java.lang.Exception
public static java.util.HashMap decodeSessionToken(WcmDataStore ds, java.lang.String decodeAppId, java.lang.String token, long timeout) throws java.lang.Exception
ds
- A reference to WcmDataStore.token
- A JavaAPI Session token containing encoded credentials.
java.lang.Exception
public boolean isValid()
public java.lang.String getValidationError()
public java.lang.Exception getValidationException()
public java.lang.String getVWSessionError()
public java.lang.Exception getVWSessionException()
protected java.util.Set getGroups()
public boolean isMemberOf(java.lang.String groupName)
isMemberOf
in interface WcmUserInformationInterface
groupName
-
public boolean isMemberOf(java.lang.String[] groupNames)
isMemberOf
in interface WcmUserInformationInterface
groupNames
-
public boolean setIsGuest(boolean value)
value
-
public boolean setIsSSOServerPluginMode(boolean serverSSOPluginMode)
serverSSOPluginMode
-
public boolean setIsSSOConfigured(boolean value)
public boolean isGuest()
isGuest
in interface WcmUserInformationInterface
public void setGuestUser(java.lang.String guestUserNameValue)
public void valueBound(WcmDataStore ds, java.lang.String key)
WcmDataStoreBindingListener
valueBound
in interface WcmDataStoreBindingListener
ds
- A reference to the datastore that the key is being added to.key
- The key being bound.public void valueUnbound(WcmDataStore ds, java.lang.String key)
WcmDataStoreBindingListener
valueUnbound
in interface WcmDataStoreBindingListener
ds
- A reference to the datastore that the key is being removed from.key
- The key being unbound.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |