@Singleton
public class UserSessionTerminationService
extends com.google.common.util.concurrent.AbstractIdleService
TERMINATION_REVISION number.
The service also listens for UserChangedEvent events and terminates all sessions for disabled users.| Modifier and Type | Class and Description |
|---|---|
static class |
UserSessionTerminationService.GlobalTerminationRevisionConfig |
| Constructor and Description |
|---|
UserSessionTerminationService(MongoDbSessionDAO sessionDao,
MongoDBSessionService sessionService,
org.apache.shiro.mgt.DefaultSecurityManager securityManager,
ClusterConfigService clusterConfigService,
UserService userService,
com.google.common.eventbus.EventBus eventBus) |
| Modifier and Type | Method and Description |
|---|---|
void |
handleUserChanged(UserChangedEvent event) |
void |
runGlobalSessionTermination()
Terminate all user sessions, if the revision is outdated.
|
protected void |
shutDown() |
protected void |
startUp() |
@Inject public UserSessionTerminationService(MongoDbSessionDAO sessionDao, MongoDBSessionService sessionService, org.apache.shiro.mgt.DefaultSecurityManager securityManager, ClusterConfigService clusterConfigService, UserService userService, com.google.common.eventbus.EventBus eventBus)
public void handleUserChanged(UserChangedEvent event)
protected void startUp()
throws Exception
startUp in class com.google.common.util.concurrent.AbstractIdleServiceExceptionprotected void shutDown()
throws Exception
shutDown in class com.google.common.util.concurrent.AbstractIdleServiceExceptionpublic void runGlobalSessionTermination()
To make sure that we don't terminate user sessions concurrently, this method should be called on the primary node only.
Copyright © 2012–2022 Graylog, Inc.. All rights reserved.