Package jetbrains.buildServer.auth.impl
Class SecureSessionModelImpl
- java.lang.Object
-
- jetbrains.buildServer.auth.impl.SecureSessionModelImpl
-
- All Implemented Interfaces:
SessionModel
public class SecureSessionModelImpl extends Object implements SessionModel
- Author:
- Dmitrii Bogdanov
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.auth.SessionModel
KEY_ENABLE_LOGOUT_ALL_SESSIONS
-
-
Constructor Summary
Constructors Constructor Description SecureSessionModelImpl(SessionModel delegate, SecurityContextEx securityContext, UserModelEx userModel, AuditLogFactory auditLogFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLogoutListener(Consumer<javax.servlet.http.HttpSession> listener)
void
bindUserToSession(SUser user, javax.servlet.http.HttpServletRequest request)
void
bindUserToSession(SUser user, javax.servlet.http.HttpServletRequest request, AuthModule<? extends AuthModuleType> authModule)
Collection<javax.servlet.http.HttpSession>
getUserSessions(long userId)
void
onSessionDestroyed(javax.servlet.http.HttpSession session)
void
terminateAllSessions(javax.servlet.http.HttpServletRequest request, boolean includingSessionInRequest)
void
terminateSession(javax.servlet.http.HttpServletRequest request)
boolean
terminateSessionsByUserId(long userId)
Terminates all sessions of a given user.void
terminateSessionsOfCurrentUser(javax.servlet.http.HttpServletRequest request, boolean includingSessionInRequest)
-
-
-
Constructor Detail
-
SecureSessionModelImpl
public SecureSessionModelImpl(@NotNull SessionModel delegate, @NotNull SecurityContextEx securityContext, @NotNull UserModelEx userModel, @NotNull AuditLogFactory auditLogFactory)
-
-
Method Detail
-
terminateSession
public void terminateSession(@NotNull javax.servlet.http.HttpServletRequest request)
- Specified by:
terminateSession
in interfaceSessionModel
-
terminateSessionsByUserId
public boolean terminateSessionsByUserId(long userId)
Description copied from interface:SessionModel
Terminates all sessions of a given user. Other server nodes are notified via multi-node event.- Specified by:
terminateSessionsByUserId
in interfaceSessionModel
- Returns:
- true, if termination functionality is enabled, false otherwise.
-
terminateSessionsOfCurrentUser
public void terminateSessionsOfCurrentUser(@NotNull javax.servlet.http.HttpServletRequest request, boolean includingSessionInRequest)
- Specified by:
terminateSessionsOfCurrentUser
in interfaceSessionModel
-
terminateAllSessions
public void terminateAllSessions(@NotNull javax.servlet.http.HttpServletRequest request, boolean includingSessionInRequest)
- Specified by:
terminateAllSessions
in interfaceSessionModel
-
addLogoutListener
public void addLogoutListener(@NotNull Consumer<javax.servlet.http.HttpSession> listener)
- Specified by:
addLogoutListener
in interfaceSessionModel
-
bindUserToSession
public void bindUserToSession(@NotNull SUser user, @NotNull javax.servlet.http.HttpServletRequest request)
- Specified by:
bindUserToSession
in interfaceSessionModel
-
bindUserToSession
public void bindUserToSession(@NotNull SUser user, @NotNull javax.servlet.http.HttpServletRequest request, @Nullable AuthModule<? extends AuthModuleType> authModule)
- Specified by:
bindUserToSession
in interfaceSessionModel
-
onSessionDestroyed
public void onSessionDestroyed(@NotNull javax.servlet.http.HttpSession session)
- Specified by:
onSessionDestroyed
in interfaceSessionModel
-
getUserSessions
public Collection<javax.servlet.http.HttpSession> getUserSessions(long userId)
- Specified by:
getUserSessions
in interfaceSessionModel
-
-