@Singleton public class SessionService extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SESSION_SERVICE
Service name for NotificationSets.
|
Modifier and Type | Method and Description |
---|---|
void |
addSessionListener(Session session,
String url)
Adds listener to a Internal Sessions.
|
boolean |
checkSessionExists(SessionID sessionId)
Check whether a session identified by {code sessionId} can be retrieved.
|
void |
destroyAuthenticationSession(SessionID sessionID)
Destroy a Internal Session, whose session id has been specified.
|
void |
destroySession(Session requester,
SessionID sessionToDestroy)
Destroy a Internal Session, depending on the value of the user's permissions.
|
static String |
getAMServerID()
Gets the AM Server ID.
|
Collection<PartialSession> |
getMatchingSessions(Session caller,
CrestQuery crestQuery)
Returns partial (stateful) sessions matching the provided CREST query.
|
String |
getRestrictedTokenId(String masterSid,
TokenRestriction restriction)
Returns the restricted token
|
SessionInfo |
getSessionInfo(SessionID sid,
boolean reset)
Returns the Session information.
|
SearchResults<SessionInfo> |
getValidSessions(Session s,
String pattern)
Gets all valid Internal Sessions, depending on the value of the user's
preferences.
|
boolean |
isSuperUser(String uuid)
Returns true if the user is super user
|
void |
logout(Session session)
Logout the user.
|
InternalSession |
newInternalSession(String domain,
boolean stateless) |
InternalSession |
newInternalSession(String domain,
boolean stateless,
boolean checkCts) |
void |
setExternalProperty(SSOToken clientToken,
SessionID sessionId,
String name,
String value)
Sets external property in the Internal Session as long as it is not
protected
|
public static final String SESSION_SERVICE
public String getRestrictedTokenId(String masterSid, TokenRestriction restriction) throws SessionException
masterSid
- master session idrestriction
- TokenRestriction ObjectSessionException
public InternalSession newInternalSession(String domain, boolean stateless)
public InternalSession newInternalSession(String domain, boolean stateless, boolean checkCts)
public void destroySession(Session requester, SessionID sessionToDestroy) throws SessionException
requester
- The requesting Session.sessionToDestroy
- The session to destroy.SessionException
- If the user has insufficient permissions.public void destroyAuthenticationSession(SessionID sessionID)
sessionID
- public boolean checkSessionExists(SessionID sessionId) throws SessionException
sessionId
- the session ID to check.SessionException
- if the session could not be accessed.public SessionInfo getSessionInfo(SessionID sid, boolean reset) throws SessionException
sid
- reset
- SessionException
public SearchResults<SessionInfo> getValidSessions(Session s, String pattern) throws SessionException
s
- SessionException
public Collection<PartialSession> getMatchingSessions(Session caller, CrestQuery crestQuery) throws SessionException
caller
- The session that initiated the query request. May not be null.crestQuery
- The CREST query based on which we should look for matching sessions. May not be null.SessionException
- If the request fails.SessionOperations.getMatchingSessions(CrestQuery)
public void logout(Session session) throws SessionException
session
- SessionException
public void addSessionListener(Session session, String url) throws SessionException
session
- Sessionurl
- SessionException
- Session is null OR the Session is invalidpublic void setExternalProperty(SSOToken clientToken, SessionID sessionId, String name, String value) throws SessionException
clientToken
- - Token of the client setting external property.sessionId
- name
- value
- SessionException
public boolean isSuperUser(String uuid)
uuid
- the uuid of the login userpublic static String getAMServerID()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.