SAWSessionService Service
Use the SAWSessionService service to provide authentication methods such as logon and logoff, and other session-related methods.
Method Name | Description |
---|---|
Retrieves the current user ID for the session. |
|
Retrieves the environment object for the current session. |
|
Retrieves a list of session variables. |
|
Logs on and then impersonates the user. |
|
Logs on and then impersonates the user. Similar to the impersonate method, but impersonateex can specify optional session parameters. |
|
Instructs Oracle Analytics Presentation Services not to end particular sessions due to inactivity. |
|
Logs the user off Oracle Analytics Presentation Services. |
|
Authenticates the user. |
|
Authenticates the user. Similar to the logon method, but logonex can specify optional session parameters. |
getCurUser() Method
Use the getCurUser() method to retrieve the current user name for the session.
Signature
String getCurUser(String sessionID);
Argument | Description |
---|---|
String sessionID |
Specifies the session ID, which is usually returned by the logon method. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null. |
GetSessionEnvironment() Method
Use the GetSessionEnvironment() method to retrieve the environment object for the current session.
Signature
SessionEnvironment getSessionEnvironment(String sessionID);
Arguments | Description |
---|---|
String sessionID |
Specifies the session ID, which is usually returned by the logon method. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null. |
getSessionVariable() Method
Use the getSessionVariable() method to retrieve a list of session variables.
Signature
List[] getSessionVariables(List[] names, String sessionID);
Arguments | Description |
---|---|
List[] names |
Specifies the names of the session variables. |
String sessionID |
Specifies the session ID, which is usually returned by the logon method. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null. |
impersonate() Method
Use the impersonate() method to log on and impersonate the user during the SAWSessionService service.
This method is useful when you need to create sessions for multiple users and have only the administrator's name and password. You do not need to use the (logon) method if you use the impersonate() method.
If user authentication or impersonation fails, an exception is thrown.
Signature
String impersonate(String name, String password, String impersonateID);
Arguments | Description |
---|---|
String name |
Specifies the user name to log on and authenticate. |
String password |
Specifies the password for the user. If there is no password for the user, leave this field empty (void). |
String impersonateID |
Specifies the user name to impersonate the authenticated user. |
impersonateex() Method
Use the impersonateex() method to log on and impersonate the user in the SAWSessionService service.
Similar to the impersonate method, but impersonateex can specify optional session parameters. This method is useful when you need to create sessions for multiple users and have only the administrator's name and password. You do not need to use the (logon) method if you use the impersonateex() method.
If user authentication or impersonation fails, then an exception is thrown.
Signature
AuthResults impersonateex(String name, String password, String impersonateID, SAWSessionParameters sessionparams);
Arguments | Description |
---|---|
String name |
Specifies the user name to log on and authenticate. |
String password |
Specifies the password for the user. If there is no password for the user, leave this field empty (void). |
String impersonateID |
Specifies the user name to impersonate the authenticated user. |
SAWSessionParameters sessionparams |
Optional. Specifies the session parameters to use, supplied in the SAWSessionParameters structure. For information about the SAWSessionParameters structure, see SAWSessionParameters Structure. |
Returns
This method returns the AuthResult structure containing the session ID, and also sets an HTTP session cookie.
The session ID is used in other methods to identify the Oracle Analytics Presentation Services session. For more information, see AuthResult Structure.
keepAlive() Method
Use the keepAlive() method to instruct Oracle Analytics Presentation Services not to end particular web user sessions due to inactivity.
The effect of this method on session lifetime is the same as if those users performed an activity in the browser such as clicking an analysis, or invoking a method.
logon() Method
Use the logon() method to authenticate the user. If authentication fails, an exception is thrown.
Signature
String logon(String name, String password);
Arguments | Description |
---|---|
String name |
Specifies the user name to authenticate. |
String password |
Specifies the password for the user. If there is no password, leave this field empty (void). |
If you have configured Oracle Analytics Server with an identity management system that supports OAuth2 tokens, you can alternatively pass an access token in an Authorization header instead of the username and password in order to obtain a session ID.
logonex() Method
Use the logonex() method to authenticate the user. The logonex() method is similar to the logon method, but logonex can specify optional session parameters.
If authentication fails, an exception is thrown.
Signature
AuthResult logonex(String name, String password, SAWSessionParameters sessionparams);
Arguments | Description |
---|---|
String name |
Specifies the user name to authenticate. |
String password |
Specifies the password for the user. If there is no password, leave this field empty (void). |
SAWSessionParameters sessionparams |
Optional. Specifies the sessionparams to use, supplied in the SAWSessionParameters structure. For information about the SAWSessionParameters structure, see SAWSessionParameters Structure. |