Java 类org.springframework.security.web.authentication.session.SessionAuthenticationStrategy 实例源码

项目:spring-security-oauth2-boot    文件:SsoSecurityConfigurer.java   
@Override
public void configure(HttpSecurity builder) throws Exception {
    OAuth2ClientAuthenticationProcessingFilter ssoFilter = this.filter;
    ssoFilter.setSessionAuthenticationStrategy(
            builder.getSharedObject(SessionAuthenticationStrategy.class));
    builder.addFilterAfter(ssoFilter,
            AbstractPreAuthenticatedProcessingFilter.class);
}
项目:haven-platform    文件:TokenAuthFilterConfigurer.java   
@Override
public void configure(H http) throws Exception {

    AuthenticationTokenFilter af = getAuthenticationFilter();
    if(authenticationDetailsSource != null) {
        af.setAuthenticationDetailsSource(authenticationDetailsSource);
    }
    af.setAuthenticationManager(http.getSharedObject(AuthenticationManager.class));
    af.setAuthenticationSuccessHandler(new AuthenticationStubSuccessHandler());
    SessionAuthenticationStrategy sessionAuthenticationStrategy = http.getSharedObject(SessionAuthenticationStrategy.class);
    if(sessionAuthenticationStrategy != null) {
        af.setSessionAuthenticationStrategy(sessionAuthenticationStrategy);
    }
    AuthenticationTokenFilter filter = postProcess(af);
    filter.setContinueChainAfterSuccessfulAuthentication(true);
    http.addFilterBefore(filter, BasicAuthenticationFilter.class);
}
项目:Spring-Security-Third-Edition    文件:SessionConfig.java   
/**
 * sessionAuthenticationStrategy does not work in JavaConfig
 * @param sessionRegistry
 * @return
 */
@Bean
public SessionAuthenticationStrategy sessionAuthenticationStrategy(SessionRegistry sessionRegistry){
    return new ConcurrentSessionControlAuthenticationStrategy(sessionRegistry){{
        setMaximumSessions(-1);
    }};
}
项目:Spring-Security-Third-Edition    文件:SessionConfig.java   
/**
     * sessionAuthenticationStrategy does not work in JavaConfig
     * @param sessionRegistry
     * @return
     */
//    @Bean
    public SessionAuthenticationStrategy sessionAuthenticationStrategy(SessionRegistry sessionRegistry){
        return new ConcurrentSessionControlAuthenticationStrategy(sessionRegistry){{
            setMaximumSessions(-1);
        }};
    }
项目:oma-riista-web    文件:OneTimePasswordFilterConfigurer.java   
@Override
public void configure(HttpSecurity http) {
    authFilter.setAuthenticationDetailsSource(new WebAuthenticationDetailsSource());
    authFilter.setApplicationEventPublisher(
            Objects.requireNonNull(http.getSharedObject(ApplicationContext.class)));
    authFilter.setAuthenticationManager(
            Objects.requireNonNull(http.getSharedObject(AuthenticationManager.class)));
    authFilter.setSessionAuthenticationStrategy(
            Objects.requireNonNull(http.getSharedObject(SessionAuthenticationStrategy.class)));
    authFilter.setRememberMeServices(
            Objects.requireNonNull(http.getSharedObject(RememberMeServices.class)));

    http.addFilterBefore(authFilter, UsernamePasswordAuthenticationFilter.class);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SsoSecurityConfigurer.java   
@Override
public void configure(HttpSecurity builder) throws Exception {
    OAuth2ClientAuthenticationProcessingFilter ssoFilter = this.filter;
    ssoFilter.setSessionAuthenticationStrategy(
            builder.getSharedObject(SessionAuthenticationStrategy.class));
    builder.addFilterAfter(ssoFilter,
            AbstractPreAuthenticatedProcessingFilter.class);
}
项目:IdentityRegistry    文件:MultiSecurityConfig.java   
/**
 * Defines the session authentication strategy.
 */
@Bean
@Override
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    // When using as confidential keycloak/OpenID Connect client:
    //return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
    // When using as bearer-only keycloak/OpenID Connect client:
    return new NullAuthenticatedSessionStrategy();
}
项目:spring-boot-concourse    文件:SsoSecurityConfigurer.java   
@Override
public void configure(HttpSecurity builder) throws Exception {
    OAuth2ClientAuthenticationProcessingFilter ssoFilter = this.filter;
    ssoFilter.setSessionAuthenticationStrategy(
            builder.getSharedObject(SessionAuthenticationStrategy.class));
    builder.addFilterAfter(ssoFilter,
            AbstractPreAuthenticatedProcessingFilter.class);
}
项目:dick    文件:SsoSecurityAutoConfiguration.java   
@Override
public void configure(HttpSecurity builder) throws Exception {
    OAuth2ClientAuthenticationProcessingFilter ssoFilter = this.filter;
    ssoFilter.setSessionAuthenticationStrategy(
            builder.getSharedObject(SessionAuthenticationStrategy.class));
    builder.addFilterAfter(ssoFilter,
            AbstractPreAuthenticatedProcessingFilter.class);
}
项目:contestparser    文件:SsoSecurityConfigurer.java   
@Override
public void configure(HttpSecurity builder) throws Exception {
    OAuth2ClientAuthenticationProcessingFilter ssoFilter = this.filter;
    ssoFilter.setSessionAuthenticationStrategy(
            builder.getSharedObject(SessionAuthenticationStrategy.class));
    builder.addFilterAfter(ssoFilter,
            AbstractPreAuthenticatedProcessingFilter.class);
}
项目:jeffaschenk-commons    文件:AuthenticationFilter.java   
@Override
public void setSessionAuthenticationStrategy
        (SessionAuthenticationStrategy
                 sessionStrategy) {
    log.debug("Invoking setSessionAuthenticationStrategy");
    super.setSessionAuthenticationStrategy(sessionStrategy);
}
项目:keycloak_training    文件:SecurityConfig.java   
@Bean
@Override
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
}
项目:Spring-Security-Third-Edition    文件:SessionConfig.java   
@Bean
public SessionManagementFilter sessionManagementFilter(SecurityContextRepository securityContextRepository,
                                                       SessionAuthenticationStrategy sessionAuthenticationStrategy){
    return new SessionManagementFilter(securityContextRepository, sessionAuthenticationStrategy);
}
项目:bbplay    文件:SecurityConfiguration.java   
/**
 * The {@link SessionAuthenticationStrategy} must be available as a Spring
 * bean for Vaadin4Spring.
 */
@Bean
public SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new SessionFixationProtectionStrategy();
}
项目:visit-yajug-20161023-keycloak    文件:SpringBootBearerApp.java   
/**
 * Defines the session authentication strategy.
 */
@Bean
@Override
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
}
项目:generator-spring-spa    文件:SecurityConfig.java   
/**
 * Defines the session authentication strategy.
 */
@Bean
@Override
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
}
项目:shinyproxy    文件:KeycloakAuthenticationType.java   
@Bean
@ConditionalOnProperty(name="shiny.proxy.authentication", havingValue="keycloak")
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
}
项目:keycloak-user-migration-provider    文件:SecurityConfig.java   
@Bean
@Override
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
}
项目:summerb    文件:RestLoginFilter.java   
public SessionAuthenticationStrategy getSessionAuthenticationStrategy() {
    return sessionAuthenticationStrategy;
}
项目:summerb    文件:RestLoginFilter.java   
public void setSessionAuthenticationStrategy(SessionAuthenticationStrategy sessionStrategy) {
    this.sessionAuthenticationStrategy = sessionStrategy;
}
项目:vaadin4spring    文件:DefaultVaadinSharedSecurity.java   
protected SessionAuthenticationStrategy getSessionAuthenticationStrategy() {
    return sessionAuthenticationStrategy;
}
项目:vaadin4spring    文件:Application.java   
/**
 * The {@link SessionAuthenticationStrategy} must be available as a Spring bean for Vaadin4Spring.
 */
@Bean
public SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new SessionFixationProtectionStrategy();
}
项目:jdal    文件:SpringAuthManager.java   
/**
 * @return the sessionStrategy
 */
public SessionAuthenticationStrategy getSessionStrategy() {
    return sessionStrategy;
}
项目:jdal    文件:SpringAuthManager.java   
/**
 * @param sessionStrategy the sessionStrategy to set
 */
public void setSessionStrategy(SessionAuthenticationStrategy sessionStrategy) {
    this.sessionStrategy = sessionStrategy;
}
项目:vaadin4spring    文件:DefaultVaadinSharedSecurity.java   
/**
 * Makes it possible to replace the
 * {@link org.springframework.security.web.authentication.session.SessionAuthenticationStrategy} after
 * the bean has been configured.
 */
public void setSessionAuthenticationStrategy(SessionAuthenticationStrategy sessionAuthenticationStrategy) {
    this.sessionAuthenticationStrategy = sessionAuthenticationStrategy;
}