Interface SessionService
-
- All Known Implementing Classes:
CacheSessionService
,CrestSessionService
public interface SessionService
TheSessionService
is responsible to perform interactions with AM sessions endpoint, such as session info or logout, etc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Promise<Optional<SessionInfo>,SessionException>
getSessionInfo(Context context, String ssoToken)
Returns a promise that will be completed with an optionalSessionInfo
or with anSessionException
in case of errors.Promise<Void,SessionException>
logout(Context context, String ssoToken)
Returns a promise that will be completed with aVoid
or with anSessionException
in case of errors.
-
-
-
Method Detail
-
getSessionInfo
Promise<Optional<SessionInfo>,SessionException> getSessionInfo(Context context, String ssoToken)
Returns a promise that will be completed with an optionalSessionInfo
or with anSessionException
in case of errors. The optionalSessionInfo
will be empty only when the givenssoToken
is invalid or expired.- Parameters:
context
- The request context.ssoToken
- The ssoToken used to retrieve the session information about.- Returns:
- a promise that will be completed with
SessionInfo
or with anSessionException
in case of errors.
-
logout
Promise<Void,SessionException> logout(Context context, String ssoToken)
Returns a promise that will be completed with aVoid
or with anSessionException
in case of errors.- Parameters:
context
- The request context.ssoToken
- The ssoToken to logout.- Returns:
- a promise that will be completed with a
Void
or with anSessionException
in case of errors.
-
-