public interface Session extends Service, SessionTypes
Session
interface allows API clients to manage session tokens
including creating, deleting and obtaining information about sessions.
create()
method creates session
token in exchange for another authentication token.delete()
method invalidates a session token.get()
retrieves information about a session
token. The call to the create()
method is part of the overall authentication process for API clients. For
example, the sequence of steps for establishing a session with SAML token is:
create()
method. The
create()
call must include the SAML token.See the programming guide and samples for additional information about establishing API sessions.
Execution Context and Security Context
To use session based authentication a client should supply
the session token obtained through the create()
method. The client should add the session token in the security context when
using SDK classes. Clients using the REST API should supply the session token as
a HTTP header.
Session Lifetime
A session begins with
call to the create()
method to exchange a SAML
token for a API session token. A session ends under the following circumstances:
delete()
method.When a session ends, the authentication logic will reject any subsequent client requests that specify that session. Any operations in progress will continue to completion.
Error Handling
The Session
returns the following exceptions:
Unauthenticated
exception for any exceptions related
to the request.ServiceUnavailable
exception for all exceptions caused by internal service failure.SessionTypes.Info
_VAPI_SERVICE_ID
Modifier and Type | Method and Description |
---|---|
char[] |
create()
Creates a session with the API.
|
void |
create(AsyncCallback<char[]> asyncCallback)
Creates a session with the API.
|
void |
create(AsyncCallback<char[]> asyncCallback,
InvocationConfig invocationConfig)
Creates a session with the API.
|
char[] |
create(InvocationConfig invocationConfig)
Creates a session with the API.
|
void |
delete()
Terminates the validity of a session token.
|
void |
delete(AsyncCallback<java.lang.Void> asyncCallback)
Terminates the validity of a session token.
|
void |
delete(AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Terminates the validity of a session token.
|
void |
delete(InvocationConfig invocationConfig)
Terminates the validity of a session token.
|
SessionTypes.Info |
get()
Returns information about the current session.
|
void |
get(AsyncCallback<SessionTypes.Info> asyncCallback)
Returns information about the current session.
|
void |
get(AsyncCallback<SessionTypes.Info> asyncCallback,
InvocationConfig invocationConfig)
Returns information about the current session.
|
SessionTypes.Info |
get(InvocationConfig invocationConfig)
Returns information about the current session.
|
char[] create()
Synchronous method overload. Result of the invocation will be reported as a method return value.
Unauthenticated
- if the session creation fails due to request specific issues. Due to the
security nature of the API the details of the error are not disclosed.
Please check the following preconditions if using a SAML token to authenticate:
ServiceUnavailable
- if session creation fails due to server specific issues, for example connection
to a back end component is failing. Due to the security nature of this API
further details will not be disclosed in the exception. Please refer to
component health information, administrative logs and product specific
documentation for possible causes.char[] create(InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
invocationConfig
- Configuration for the method invocation.Unauthenticated
- if the session creation fails due to request specific issues. Due to the
security nature of the API the details of the error are not disclosed.
Please check the following preconditions if using a SAML token to authenticate:
ServiceUnavailable
- if session creation fails due to server specific issues, for example connection
to a back end component is failing. Due to the security nature of this API
further details will not be disclosed in the exception. Please refer to
component health information, administrative logs and product specific
documentation for possible causes.void create(AsyncCallback<char[]> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation Result:
Newly created session identifier to be used for authenticating further requests.
Operation Errors:
Unauthenticated
- if the session creation fails due to request specific issues. Due to the
security nature of the API the details of the error are not disclosed.
Please check the following preconditions if using a SAML token to authenticate:
ServiceUnavailable
- if session creation fails due to server specific issues, for example connection
to a back end component is failing. Due to the security nature of this API
further details will not be disclosed in the exception. Please refer to
component health information, administrative logs and product specific
documentation for possible causes.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void create(AsyncCallback<char[]> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Invocation Result:
Newly created session identifier to be used for authenticating further requests.
Operation Errors:
Unauthenticated
- if the session creation fails due to request specific issues. Due to the
security nature of the API the details of the error are not disclosed.
Please check the following preconditions if using a SAML token to authenticate:
ServiceUnavailable
- if session creation fails due to server specific issues, for example connection
to a back end component is failing. Due to the security nature of this API
further details will not be disclosed in the exception. Please refer to
component health information, administrative logs and product specific
documentation for possible causes.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.void delete()
A session identifier is expected as part of the request.
Synchronous method overload. Result of the invocation will be reported as a method return value.
Unauthenticated
- if the session id is missing from the request or the corresponding session
object cannot be found.ServiceUnavailable
- if session deletion fails due to server specific issues, for example connection
to a back end component is failing. Due to the security nature of this API
further details will not be disclosed in the exception. Please refer to
component health information, administrative logs and product specific
documentation for possible causes.void delete(InvocationConfig invocationConfig)
A session identifier is expected as part of the request.
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
invocationConfig
- Configuration for the method invocation.Unauthenticated
- if the session id is missing from the request or the corresponding session
object cannot be found.ServiceUnavailable
- if session deletion fails due to server specific issues, for example connection
to a back end component is failing. Due to the security nature of this API
further details will not be disclosed in the exception. Please refer to
component health information, administrative logs and product specific
documentation for possible causes.void delete(AsyncCallback<java.lang.Void> asyncCallback)
A session identifier is expected as part of the request.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
Unauthenticated
- if the session id is missing from the request or the corresponding session
object cannot be found.
ServiceUnavailable
- if session deletion fails due to server specific issues, for example connection
to a back end component is failing. Due to the security nature of this API
further details will not be disclosed in the exception. Please refer to
component health information, administrative logs and product specific
documentation for possible causes.
asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void delete(AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
A session identifier is expected as part of the request.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Errors:
Unauthenticated
- if the session id is missing from the request or the corresponding session
object cannot be found.
ServiceUnavailable
- if session deletion fails due to server specific issues, for example connection
to a back end component is failing. Due to the security nature of this API
further details will not be disclosed in the exception. Please refer to
component health information, administrative logs and product specific
documentation for possible causes.
asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.SessionTypes.Info get()
A side effect of invoking this method may be a change to the session's last accessed time to the current time if this is supported by the session implementation. Invoking any other method in the API will also update the session's last accessed time.
This API is meant to serve the needs of various front end projects that may want to display the name of the user. Examples of this include various web based user interfaces and logging facilities.
Synchronous method overload. Result of the invocation will be reported as a method return value.
Unauthenticated
- if the session id is missing from the request or the corresponding session
object cannot be found.ServiceUnavailable
- if session retrieval fails due to server specific issues e.g. connection to back
end component is failing. Due to the security nature of this API further details
will not be disclosed in the error. Please refer to component health
information, administrative logs and product specific documentation for possible
causes.SessionTypes.Info get(InvocationConfig invocationConfig)
A side effect of invoking this method may be a change to the session's last accessed time to the current time if this is supported by the session implementation. Invoking any other method in the API will also update the session's last accessed time.
This API is meant to serve the needs of various front end projects that may want to display the name of the user. Examples of this include various web based user interfaces and logging facilities.
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
invocationConfig
- Configuration for the method invocation.Unauthenticated
- if the session id is missing from the request or the corresponding session
object cannot be found.ServiceUnavailable
- if session retrieval fails due to server specific issues e.g. connection to back
end component is failing. Due to the security nature of this API further details
will not be disclosed in the error. Please refer to component health
information, administrative logs and product specific documentation for possible
causes.void get(AsyncCallback<SessionTypes.Info> asyncCallback)
A side effect of invoking this method may be a change to the session's last accessed time to the current time if this is supported by the session implementation. Invoking any other method in the API will also update the session's last accessed time.
This API is meant to serve the needs of various front end projects that may want to display the name of the user. Examples of this include various web based user interfaces and logging facilities.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation Result:
Information about the session.
Operation Errors:
Unauthenticated
- if the session id is missing from the request or the corresponding session
object cannot be found.
ServiceUnavailable
- if session retrieval fails due to server specific issues e.g. connection to back
end component is failing. Due to the security nature of this API further details
will not be disclosed in the error. Please refer to component health
information, administrative logs and product specific documentation for possible
causes.
asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void get(AsyncCallback<SessionTypes.Info> asyncCallback, InvocationConfig invocationConfig)
A side effect of invoking this method may be a change to the session's last accessed time to the current time if this is supported by the session implementation. Invoking any other method in the API will also update the session's last accessed time.
This API is meant to serve the needs of various front end projects that may want to display the name of the user. Examples of this include various web based user interfaces and logging facilities.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Invocation Result:
Information about the session.
Operation Errors:
Unauthenticated
- if the session id is missing from the request or the corresponding session
object cannot be found.
ServiceUnavailable
- if session retrieval fails due to server specific issues e.g. connection to back
end component is failing. Due to the security nature of this API further details
will not be disclosed in the error. Please refer to component health
information, administrative logs and product specific documentation for possible
causes.
asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.