当前位置: 首页>>代码示例>>Java>>正文


Java SessionAuthenticationStrategy类代码示例

本文整理汇总了Java中org.springframework.security.web.authentication.session.SessionAuthenticationStrategy的典型用法代码示例。如果您正苦于以下问题:Java SessionAuthenticationStrategy类的具体用法?Java SessionAuthenticationStrategy怎么用?Java SessionAuthenticationStrategy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SessionAuthenticationStrategy类属于org.springframework.security.web.authentication.session包,在下文中一共展示了SessionAuthenticationStrategy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configure

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
@Override
public void configure(HttpSecurity builder) throws Exception {
	OAuth2ClientAuthenticationProcessingFilter ssoFilter = this.filter;
	ssoFilter.setSessionAuthenticationStrategy(
			builder.getSharedObject(SessionAuthenticationStrategy.class));
	builder.addFilterAfter(ssoFilter,
			AbstractPreAuthenticatedProcessingFilter.class);
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:9,代码来源:SsoSecurityConfigurer.java

示例2: sessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
/**
 * sessionAuthenticationStrategy does not work in JavaConfig
 * @param sessionRegistry
 * @return
 */
@Bean
public SessionAuthenticationStrategy sessionAuthenticationStrategy(SessionRegistry sessionRegistry){
    return new ConcurrentSessionControlAuthenticationStrategy(sessionRegistry){{
        setMaximumSessions(-1);
    }};
}
 
开发者ID:PacktPublishing,项目名称:Spring-Security-Third-Edition,代码行数:12,代码来源:SessionConfig.java

示例3: configure

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
@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);
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:18,代码来源:TokenAuthFilterConfigurer.java

示例4: sessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
/**
     * sessionAuthenticationStrategy does not work in JavaConfig
     * @param sessionRegistry
     * @return
     */
//    @Bean
    public SessionAuthenticationStrategy sessionAuthenticationStrategy(SessionRegistry sessionRegistry){
        return new ConcurrentSessionControlAuthenticationStrategy(sessionRegistry){{
            setMaximumSessions(-1);
        }};
    }
 
开发者ID:PacktPublishing,项目名称:Spring-Security-Third-Edition,代码行数:12,代码来源:SessionConfig.java

示例5: configure

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
@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);
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:15,代码来源:OneTimePasswordFilterConfigurer.java

示例6: sessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
/**
 * 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();
}
 
开发者ID:MaritimeConnectivityPlatform,项目名称:IdentityRegistry,代码行数:12,代码来源:MultiSecurityConfig.java

示例7: configure

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
@Override
public void configure(HttpSecurity builder) throws Exception {
    OAuth2ClientAuthenticationProcessingFilter ssoFilter = this.filter;
    ssoFilter.setSessionAuthenticationStrategy(
            builder.getSharedObject(SessionAuthenticationStrategy.class));
    builder.addFilterAfter(ssoFilter,
            AbstractPreAuthenticatedProcessingFilter.class);
}
 
开发者ID:dick-the-deployer,项目名称:dick,代码行数:9,代码来源:SsoSecurityAutoConfiguration.java

示例8:

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
@Override
public void setSessionAuthenticationStrategy
        (SessionAuthenticationStrategy
                 sessionStrategy) {
    log.debug("Invoking setSessionAuthenticationStrategy");
    super.setSessionAuthenticationStrategy(sessionStrategy);
}
 
开发者ID:jaschenk,项目名称:jeffaschenk-commons,代码行数:8,代码来源:AuthenticationFilter.java

示例9: sessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
@Bean
@Override
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:6,代码来源:SecurityConfig.java

示例10: sessionManagementFilter

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
@Bean
public SessionManagementFilter sessionManagementFilter(SecurityContextRepository securityContextRepository,
                                                       SessionAuthenticationStrategy sessionAuthenticationStrategy){
    return new SessionManagementFilter(securityContextRepository, sessionAuthenticationStrategy);
}
 
开发者ID:PacktPublishing,项目名称:Spring-Security-Third-Edition,代码行数:6,代码来源:SessionConfig.java

示例11: sessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
/**
 * The {@link SessionAuthenticationStrategy} must be available as a Spring
 * bean for Vaadin4Spring.
 */
@Bean
public SessionAuthenticationStrategy sessionAuthenticationStrategy() {
	return new SessionFixationProtectionStrategy();
}
 
开发者ID:Horuss,项目名称:bbplay,代码行数:9,代码来源:SecurityConfiguration.java

示例12: sessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
/**
 * Defines the session authentication strategy.
 */
@Bean
@Override
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
    return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
}
 
开发者ID:jugsaar,项目名称:visit-yajug-20161023-keycloak,代码行数:9,代码来源:SpringBootBearerApp.java

示例13: sessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
@Bean
@ConditionalOnProperty(name="shiny.proxy.authentication", havingValue="keycloak")
protected SessionAuthenticationStrategy sessionAuthenticationStrategy() {
	return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl());
}
 
开发者ID:openanalytics,项目名称:shinyproxy,代码行数:6,代码来源:KeycloakAuthenticationType.java

示例14: getSessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
public SessionAuthenticationStrategy getSessionAuthenticationStrategy() {
	return sessionAuthenticationStrategy;
}
 
开发者ID:skarpushin,项目名称:summerb,代码行数:4,代码来源:RestLoginFilter.java

示例15: setSessionAuthenticationStrategy

import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; //导入依赖的package包/类
public void setSessionAuthenticationStrategy(SessionAuthenticationStrategy sessionStrategy) {
	this.sessionAuthenticationStrategy = sessionStrategy;
}
 
开发者ID:skarpushin,项目名称:summerb,代码行数:4,代码来源:RestLoginFilter.java


注:本文中的org.springframework.security.web.authentication.session.SessionAuthenticationStrategy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。