org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy Java Examples

The following examples show how to use org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy. 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 File: SessionConfig.java    From Spring-Security-Third-Edition with 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 #2
Source File: WebSessionConfiguration.java    From cola with MIT License 4 votes vote down vote up
@Bean
public SessionAuthenticationStrategy sessionAuthenticationStrategy(SessionRegistry sessionRegistry) {
	return new ConcurrentSessionControlAuthenticationStrategy(sessionRegistry);
}
 
Example #3
Source File: SessionConfig.java    From Spring-Security-Third-Edition with 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);
    }};
}