public class CrestSessionService extends Object implements SessionService
CrestSessionService
is responsible to perform interactions with AM sessions endpoint,
such as session info or logout, etc. using resource version 2.0.Constructor and Description |
---|
CrestSessionService(RequestHandler requestHandler)
Creates a new
CrestSessionService which is responsible for interactions with AM sessions endpoint. |
Modifier and Type | Method and Description |
---|---|
Promise<Optional<SessionInfo>,SessionException> |
getSessionInfo(Context context,
String ssoToken)
Returns a promise that will be completed with an optional
SessionInfo or with an SessionException
in case of errors. |
Promise<Void,SessionException> |
logout(Context context,
String ssoToken)
Returns a promise that will be completed with a
Void or with an SessionException in case
of errors. |
public CrestSessionService(RequestHandler requestHandler)
CrestSessionService
which is responsible for interactions with AM sessions endpoint.requestHandler
- The requestHandler used when interacting with AM sessions endpoint.public Promise<Optional<SessionInfo>,SessionException> getSessionInfo(Context context, String ssoToken)
SessionService
SessionInfo
or with an SessionException
in case of errors. The optional SessionInfo
will be empty only when the given ssoToken
is
invalid or expired.getSessionInfo
in interface SessionService
context
- The request context.ssoToken
- The ssoToken used to retrieve the session information about.SessionInfo
or with an SessionException
in case
of errors.public Promise<Void,SessionException> logout(Context context, String ssoToken)
SessionService
Void
or with an SessionException
in case
of errors.logout
in interface SessionService
context
- The request context.ssoToken
- The ssoToken to logout.Void
or with an SessionException
in case
of errors.Copyright 2011-2017 ForgeRock AS.