SAWSessionService Service

Use the SAWSessionService service to provide authentication methods such as logon and logoff, and other session-related methods.

Method Name Description

getCurUser() Method

Retrieves the current user ID for the session.

GetSessionEnvironment() Method

Retrieves the environment object for the current session.

getSessionVariable() Method

Retrieves a list of session variables.

impersonate() Method

Logs on and then impersonates the user.

impersonateex() Method

Logs on and then impersonates the user. Similar to the impersonate method, but impersonateex can specify optional session parameters.

keepAlive() Method

Instructs Oracle Analytics Presentation Services not to end particular sessions due to inactivity.

logoff() Method

Logs the user off Oracle Analytics Presentation Services.

logon() Method

Authenticates the user.

logonex() Method

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.

Returns

Returns a string indicating the current user name for the session.

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.

Returns

This method returns a session environment object.

See SessionEnvironment Structure.

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.

Returns

This method returns values of the Oracle BI EE variables associated with the current session.

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.

Returns

This method returns the session ID and sets an HTTP session cookie.

The session ID is used in other methods to identify the Oracle Analytics web services session.

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.

Signature

void keepAlive(String[] sessionID);

Argument Description

String[] sessionID

Specifies the session IDs to remain logged on.

logoff() Method

Use the logoff() method to log off the user from Oracle Analytics.

Signature

void logoff(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.

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.

Returns

This method returns the session ID and sets an HTTP session cookie.

The session ID is used in other methods to identify the Oracle Analytics session.

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.

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.