Class SessionService
java.lang.Object
sk.iway.iwcm.components.users.sessions.SessionService
Authorizes session operations and builds safe administrator summaries from local and cluster data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloggedAdministrators(Identity actor) Lists administrators visible in the active domain, with distinct sessions across cluster nodes.logoutAdministrator(Identity actor, int userId) Ends all sessions of another administrator visible in the active domain and audits the acting account.logoutSession(Identity actor, String currentSessionId, String sessionId) Ends only an owned session other than the one making this request.
-
Constructor Details
-
SessionService
public SessionService()
-
-
Method Details
-
loggedAdministrators
Lists administrators visible in the active domain, with distinct sessions across cluster nodes. The caller's list permission is independent of the permission to end another administrator's sessions.- Parameters:
actor- authenticated administrator requesting the list- Returns:
- alphabetically ordered administrator summaries without session IDs
-
logoutSession
public SessionLogoutResultDto logoutSession(Identity actor, String currentSessionId, String sessionId) Ends only an owned session other than the one making this request. Remote invalidation is queued only after the cluster snapshot confirms both the ID and owner.- Parameters:
actor- authenticated administratorcurrentSessionId- session making the request, which must remain activesessionId- owned session to end- Returns:
- rejected, completed or accepted with cluster propagation pending
-
logoutAdministrator
Ends all sessions of another administrator visible in the active domain and audits the acting account.- Parameters:
actor- administrator with users.edit_admins permission; list permission is not requireduserId- other administrator whose sessions should end- Returns:
- accepted logout and whether remote invalidation remains pending
-