|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ILogonTokenMgr
This object manages the creation and release of logon tokens for logged on users. You can pass the
logon token to other applications and use it to create a new user session without prompting the user for
credentials. The lifetime of the new user session is independent of the original user session; that is,
one session can be logged off and the other session will remain valid.
Use with IEnterpriseSession sess = CrystalEnterprise.getSessionMgr().logonWithToken(token);
As a best practice, it is recommended that you combine the use of logon tokens with SSL encryption. Due to the fact
that logon tokens are simple strings that can potentially be reused from any machine, you should take necessary precautions
to protect your session from malicious users. For an alternate method of session management, consider storing the
IEnterpriseSession object in a session variable instead, or using IEnterpriseSession.getSerializedSession().
| Method Summary | |
|---|---|
java.lang.String |
createLogonToken(java.lang.String clientComputerName,
int validMinutes,
int validNumOfLogons)
Creates a logon token that can be used to create a new user session without prompting the user for credentials. |
java.lang.String |
createWCAToken(java.lang.String clientComputerName,
int validMinutes,
int validNumOfLogons)
Deprecated. should use IEnterpriseSession.getSerializedSession() instead. |
java.lang.String |
getDefaultToken()
Returns a logon token that can be used to create a new user session without prompting the user for credentials. |
void |
releaseToken(java.lang.String InToken)
Releases and invalidates the token when it will no longer be used. |
| Method Detail |
|---|
java.lang.String createLogonToken(java.lang.String clientComputerName,
int validMinutes,
int validNumOfLogons)
throws SDKException
Creates a logon token that can be used to create a new user session without prompting the user for credentials. Specify the client computer name where you want to use the token, the number of minutes it will be valid, and the maximum number of logons. Tokens created with this method should be released with releaseToken if possible.
clientComputerName - The machine name of the client computer that will use the token. Include the fully qualified domain name. For example, MACHINE.DOMAIN.COM.
An empty string means that the token can be used from any client computer.validMinutes - The number of minutes that the token will be valid for. Maximum value is 1440, or 24 hours.validNumOfLogons - The number of logons that the token can be used for.
String containing the newly created token.
SDKException - This is thrown if the process is unsuccessful.
java.lang.String createWCAToken(java.lang.String clientComputerName,
int validMinutes,
int validNumOfLogons)
throws SDKException
SDKException
java.lang.String getDefaultToken()
throws SDKException
Returns a logon token that can be used to create a new user session without prompting the user for credentials. The token can be used from any client computer and can be used for unlimited logons. This token is valid for the lifetime of the session from which it was created. That is, the logon token becomes invalid when the user logs off the original session. Do not use releaseToken with this token.
String containing the default logon token.
SDKException - This is thrown if the process is unsuccessful.
void releaseToken(java.lang.String InToken)
throws SDKException
Releases and invalidates the token when it will no longer be used.
This method should only be called for a token created from createLogonToken or createWCAToken.
InToken - The token to be released.
SDKException - This is thrown if the process is unsuccessful.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||