org.springframework.security.core.session.SessionRegistry Java Examples

The following examples show how to use org.springframework.security.core.session.SessionRegistry. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: inception   Author: inception-project   File: RecommendationServiceImpl.java    License: Apache License 2.0 6 votes vote down vote up
@Autowired
public RecommendationServiceImpl(SessionRegistry aSessionRegistry, UserDao aUserRepository,
        RecommenderFactoryRegistry aRecommenderFactoryRegistry,
        SchedulingService aSchedulingService, AnnotationSchemaService aAnnoService,
        DocumentService aDocumentService, LearningRecordService aLearningRecordService,
        ProjectService aProjectService, EntityManager aEntityManager,
        ApplicationEventPublisher aApplicationEventPublisher)
{
    sessionRegistry = aSessionRegistry;
    userRepository = aUserRepository;
    recommenderFactoryRegistry = aRecommenderFactoryRegistry;
    schedulingService = aSchedulingService;
    annoService = aAnnoService;
    documentService = aDocumentService;
    learningRecordService = aLearningRecordService;
    projectService = aProjectService;
    entityManager = aEntityManager;
    applicationEventPublisher = aApplicationEventPublisher;
    
    trainingTaskCounter = new ConcurrentHashMap<>();
    states = new ConcurrentHashMap<>();
}
 
Example #2
Source Project: dhis2-core   Author: dhis2   File: DefaultUserService.java    License: BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public DefaultUserService( UserStore userStore, UserGroupService userGroupService,
    UserCredentialsStore userCredentialsStore, UserAuthorityGroupStore userAuthorityGroupStore,
    CurrentUserService currentUserService, SystemSettingManager systemSettingManager,
    @Lazy PasswordManager passwordManager, @Lazy SessionRegistry sessionRegistry )
{
    checkNotNull( userStore );
    checkNotNull( userGroupService );
    checkNotNull( userCredentialsStore );
    checkNotNull( userAuthorityGroupStore );
    checkNotNull( systemSettingManager );
    checkNotNull( passwordManager );
    checkNotNull( sessionRegistry );

    this.userStore = userStore;
    this.userGroupService = userGroupService;
    this.userCredentialsStore = userCredentialsStore;
    this.userAuthorityGroupStore = userAuthorityGroupStore;
    this.currentUserService = currentUserService;
    this.systemSettingManager = systemSettingManager;
    this.passwordManager = passwordManager;
    this.sessionRegistry = sessionRegistry;
}
 
Example #3
Source Project: inception   Author: inception-project   File: RecommendationServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
public RecommendationServiceImpl(SessionRegistry aSessionRegistry, UserDao aUserRepository,
        RecommenderFactoryRegistry aRecommenderFactoryRegistry,
        SchedulingService aSchedulingService, AnnotationSchemaService aAnnoService,
        DocumentService aDocumentService, LearningRecordService aLearningRecordService,
        EntityManager aEntityManager)
{
    this(aSessionRegistry, aUserRepository, aRecommenderFactoryRegistry, aSchedulingService,
            aAnnoService, aDocumentService, aLearningRecordService, (ProjectService) null,
            aEntityManager, null);
}
 
Example #4
Source Project: inception   Author: inception-project   File: RecommenderServiceAutoConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
@Autowired
public RecommendationService recommendationService(SessionRegistry aSessionRegistry,
        UserDao aUserRepository, RecommenderFactoryRegistry aRecommenderFactoryRegistry,
        SchedulingService aSchedulingService, AnnotationSchemaService aAnnoService,
        DocumentService aDocumentService, LearningRecordService aLearningRecordService,
        ProjectService aProjectService, ApplicationEventPublisher aApplicationEventPublisher)
{
    return new RecommendationServiceImpl(aSessionRegistry, aUserRepository,
            aRecommenderFactoryRegistry, aSchedulingService, aAnnoService, aDocumentService,
            aLearningRecordService, aProjectService, entityManager, aApplicationEventPublisher);
}
 
Example #5
Source Project: Spring-Security-Third-Edition   Author: PacktPublishing   File: UserSessionController.java    License: MIT License 5 votes vote down vote up
@Autowired
public UserSessionController(SessionRegistry sessionRegistry) {
    if (sessionRegistry == null) {
        throw new IllegalArgumentException("sessionRegistry cannot be null");
    }
    this.sessionRegistry = sessionRegistry;
}
 
Example #6
Source Project: Spring-Security-Third-Edition   Author: PacktPublishing   File: UserSessionController.java    License: MIT License 5 votes vote down vote up
@Autowired
public UserSessionController(SessionRegistry sessionRegistry) {
    if (sessionRegistry == null) {
        throw new IllegalArgumentException("sessionRegistry cannot be null");
    }
    this.sessionRegistry = sessionRegistry;
}
 
Example #7
Source Project: Spring-Security-Third-Edition   Author: PacktPublishing   File: SessionConfig.java    License: MIT License 5 votes vote down vote up
/**
     * sessionAuthenticationStrategy does not work in JavaConfig
     * @param sessionRegistry
     * @return
     */
//    @Bean
    public SessionAuthenticationStrategy sessionAuthenticationStrategy(SessionRegistry sessionRegistry){
        return new ConcurrentSessionControlAuthenticationStrategy(sessionRegistry){{
            setMaximumSessions(-1);
        }};
    }
 
Example #8
Source Project: dhis2-core   Author: dhis2   File: DefaultCurrentUserService.java    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public DefaultCurrentUserService( Environment env, CacheProvider cacheProvider,
    @Lazy SessionRegistry sessionRegistry, @Lazy UserStore userStore )
{
    checkNotNull( env );
    checkNotNull( cacheProvider );
    checkNotNull( sessionRegistry );
    checkNotNull( userStore );

    this.env = env;
    this.cacheProvider = cacheProvider;
    this.sessionRegistry = sessionRegistry;
    this.userStore = userStore;
}
 
Example #9
Source Project: spring-security   Author: hello-shf   File: WebSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
public SessionRegistry getSessionRegistry(){
    SessionRegistry sessionRegistry=new SessionRegistryImpl();
    return sessionRegistry;
}
 
Example #10
Source Project: cola   Author: leecho   File: WebSessionConfiguration.java    License: MIT License 4 votes vote down vote up
@Bean
@ConditionalOnMissingBean(SessionRegistry.class)
public SessionRegistry sessionRegistry() {
	return new SessionRegistryImpl();
}
 
Example #11
Source Project: cola   Author: leecho   File: WebSessionConfiguration.java    License: MIT License 4 votes vote down vote up
@Bean
public SessionAuthenticationStrategy sessionAuthenticationStrategy(SessionRegistry sessionRegistry) {
	return new ConcurrentSessionControlAuthenticationStrategy(sessionRegistry);
}
 
Example #12
Source Project: base-admin   Author: huanzi-qch   File: BaseAdminApplication.java    License: MIT License 4 votes vote down vote up
/**
 * 解决不能注入session注册表问题
 */
@Bean
SessionRegistry sessionRegistry() {
    return new SessionRegistryImpl();
}
 
Example #13
Source Project: blog-sample   Author: jitwxs   File: WebSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SessionRegistry sessionRegistry() {
    return new SessionRegistryImpl();
}
 
Example #14
Source Project: blog-sample   Author: jitwxs   File: WebSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SessionRegistry sessionRegistry() {
    return new SessionRegistryImpl();
}
 
Example #15
Source Project: blog-sample   Author: jitwxs   File: WebSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SessionRegistry sessionRegistry() {
    return new SessionRegistryImpl();
}
 
Example #16
Source Project: blog-sample   Author: jitwxs   File: WebSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SessionRegistry sessionRegistry() {
    return new SessionRegistryImpl();
}
 
Example #17
Source Project: blog-sample   Author: jitwxs   File: WebSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SessionRegistry sessionRegistry() {
    return new SessionRegistryImpl();
}
 
Example #18
Source Project: inception   Author: inception-project   File: InceptionSecurity.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SessionRegistry sessionRegistry()
{
    return new SessionRegistryImpl();
}
 
Example #19
Source Project: FEBS-Security   Author: febsteam   File: SmsCodeFilter.java    License: Apache License 2.0 4 votes vote down vote up
public SessionRegistry getSessionRegistry() {
    return sessionRegistry;
}
 
Example #20
Source Project: FEBS-Security   Author: febsteam   File: SmsCodeFilter.java    License: Apache License 2.0 4 votes vote down vote up
public void setSessionRegistry(SessionRegistry sessionRegistry) {
    this.sessionRegistry = sessionRegistry;
}
 
Example #21
Source Project: FEBS-Security   Author: febsteam   File: FebsLogoutHandler.java    License: Apache License 2.0 4 votes vote down vote up
public SessionRegistry getSessionRegistry() {
    return sessionRegistry;
}
 
Example #22
Source Project: FEBS-Security   Author: febsteam   File: FebsLogoutHandler.java    License: Apache License 2.0 4 votes vote down vote up
public void setSessionRegistry(SessionRegistry sessionRegistry) {
    this.sessionRegistry = sessionRegistry;
}
 
Example #23
Source Project: FEBS-Security   Author: febsteam   File: FebsAuthenticationSucessHandler.java    License: Apache License 2.0 4 votes vote down vote up
public SessionRegistry getSessionRegistry() {
    return sessionRegistry;
}
 
Example #24
Source Project: FEBS-Security   Author: febsteam   File: FebsAuthenticationSucessHandler.java    License: Apache License 2.0 4 votes vote down vote up
public void setSessionRegistry(SessionRegistry sessionRegistry) {
    this.sessionRegistry = sessionRegistry;
}
 
Example #25
Source Project: FEBS-Security   Author: febsteam   File: FebsSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public SessionRegistry sessionRegistry() {
    return new SessionRegistryImpl();
}
 
Example #26
Source Project: zhcet-web   Author: zhcet-amu   File: SecurityBeans.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
SessionRegistry sessionRegistry() {
    return new SessionRegistryImpl();
}
 
Example #27
Source Project: zhcet-web   Author: zhcet-amu   File: SessionConfig.java    License: Apache License 2.0 4 votes vote down vote up
public SessionConfig(SessionRegistry sessionRegistry) {
    this.sessionRegistry = sessionRegistry;
}
 
Example #28
Source Project: zhcet-web   Author: zhcet-amu   File: AuthService.java    License: Apache License 2.0 4 votes vote down vote up
public AuthService(SessionRegistry sessionRegistry, PermissionManager permissionManager) {
    this.sessionRegistry = sessionRegistry;
    this.permissionManager = permissionManager;
}
 
Example #29
Source Project: Spring-Security-Third-Edition   Author: PacktPublishing   File: UserSessionController.java    License: MIT License 4 votes vote down vote up
public UserSessionController(SessionRegistry sessionRegistry) {
    if (sessionRegistry == null) {
        throw new IllegalArgumentException("sessionRegistry cannot be null");
    }
    this.sessionRegistry = sessionRegistry;
}
 
Example #30
Source Project: Spring-Security-Third-Edition   Author: PacktPublishing   File: SessionConfig.java    License: MIT License 4 votes vote down vote up
/**
 * sessionAuthenticationStrategy does not work in JavaConfig
 * @param sessionRegistry
 * @return
 */
@Bean
public SessionAuthenticationStrategy sessionAuthenticationStrategy(SessionRegistry sessionRegistry){
    return new ConcurrentSessionControlAuthenticationStrategy(sessionRegistry){{
        setMaximumSessions(-1);
    }};
}