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


Java RememberMeServices类代码示例

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


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

示例1: updateRememberMeService

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
/**
 * update spring remember me service with login status
 * @param artifactoryContext - artifactory web context
 * @param isUpdateSucceeded - if true authentication has been updated successfully
 * @param artifactoryRestRequest - encapsulate data related to request
 * @param artifactoryRestResponse - encapsulate data needed for response
 */
private void updateRememberMeService(ArtifactoryContext artifactoryContext,
        boolean isUpdateSucceeded,ArtifactoryRestRequest artifactoryRestRequest,
        RestResponse artifactoryRestResponse) {
    HttpServletRequest servletRequest = artifactoryRestRequest.getServletRequest();
    HttpServletResponse servletResponse = artifactoryRestResponse.getServletResponse();
    if (isUpdateSucceeded) {
        RememberMeServices rememberMeServices = (RememberMeServices) artifactoryContext.getBean(
                "rememberMeServices");
        if (!ConstantValues.securityDisableRememberMe.getBoolean()) {
            try {
                rememberMeServices.loginSuccess(servletRequest, servletResponse,
                        AuthenticationHelper.getAuthentication());
            } catch (UsernameNotFoundException e) {
                log.warn("Remember Me service is not supported for transient external users.");
            }
        } else {
            if (!ConstantValues.securityDisableRememberMe.getBoolean()) {
                rememberMeServices.loginFail(servletRequest, servletResponse);
            }
        }
    }
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:30,代码来源:LoginService.java

示例2: setRememberMeServices

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void setRememberMeServices(RememberMeServices rememberMeServices) {
    this.rememberMeServices = rememberMeServices;
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:8,代码来源:CommunoteRememberMeProcessingFilter.java

示例3: SecurityConfiguration

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
public SecurityConfiguration(AuthenticationManagerBuilder authenticationManagerBuilder, UserDetailsService userDetailsService,
    JHipsterProperties jHipsterProperties, RememberMeServices rememberMeServices,
    CorsFilter corsFilter) {

    this.authenticationManagerBuilder = authenticationManagerBuilder;
    this.userDetailsService = userDetailsService;
    this.jHipsterProperties = jHipsterProperties;
    this.rememberMeServices = rememberMeServices;
    this.corsFilter = corsFilter;
}
 
开发者ID:Microsoft,项目名称:MTC_Labrat,代码行数:11,代码来源:SecurityConfiguration.java

示例4: WebSecurityConfig

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
public WebSecurityConfig(UserService userService, PasswordEncoder passwordEncoder,
						 RememberMeServices rememberMeServices, SessionRegistry sessionRegistry) {
	this.userService = userService;
	this.passwordEncoder = passwordEncoder;
	this.rememberMeServices = rememberMeServices;
	this.sessionRegistry = sessionRegistry;
}
 
开发者ID:codenergic,项目名称:theskeleton,代码行数:8,代码来源:WebSecurityConfig.java

示例5: rememberMeServices

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices rememberMeServices(
    UserDetailsService userDetailsService, PersistentTokenRepository persistentTokenRepository) {

  String secretKey = getRememberMeTokenSecretKey().orElseThrow(IllegalStateException::new);

  return new PersistentJwtTokenBasedRememberMeServices(
      secretKey, userDetailsService, persistentTokenRepository);
}
 
开发者ID:springuni,项目名称:springuni-particles,代码行数:10,代码来源:AuthSecurityConfiguration.java

示例6: SecurityConfiguration

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
public SecurityConfiguration(AuthenticationManagerBuilder authenticationManagerBuilder, UserDetailsService userDetailsService,
    JHipsterProperties jHipsterProperties, RememberMeServices rememberMeServices,CorsFilter corsFilter, SecurityProblemSupport problemSupport) {
    this.authenticationManagerBuilder = authenticationManagerBuilder;
    this.userDetailsService = userDetailsService;
    this.jHipsterProperties = jHipsterProperties;
    this.rememberMeServices = rememberMeServices;
    this.corsFilter = corsFilter;
    this.problemSupport = problemSupport;
}
 
开发者ID:pascalgrimaud,项目名称:qualitoast,代码行数:10,代码来源:SecurityConfiguration.java

示例7: configure

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的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

示例8: rememberMeServices

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices rememberMeServices() {
    // TODO Is there some way of exposing the RememberMeServices instance that the remember me configurer creates by default?
    TokenBasedRememberMeServices services = new TokenBasedRememberMeServices("myAppKey", userDetailsService());
    services.setAlwaysRemember(true);
    return services;
}
 
开发者ID:xyfreemind,项目名称:trader,代码行数:8,代码来源:TraderApplication.java

示例9: rememberMeServices

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices rememberMeServices() {
    PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices(
            environment.getProperty("RM_KEY", "grassrootremembers"),
            userDetailsService, persistentTokenRepository());
    services.setTokenValiditySeconds(1209600); // two weeks
    return services;
}
 
开发者ID:grassrootza,项目名称:grassroot-platform,代码行数:9,代码来源:SecurityConfig.java

示例10: rememberMeServices

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices rememberMeServices(String rememberBeKey) {
    return new PersistentTokenBasedRememberMeServices(
            rememberBeKey,
            basicRememberMeUserDetailsService(),
            new InMemoryTokenRepositoryImpl()
    );
}
 
开发者ID:nemerosa,项目名称:ontrack,代码行数:9,代码来源:WebSecurityConfig.java

示例11: persistentTokenBasedRememberMeServices

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices persistentTokenBasedRememberMeServices() {
	VaadinPersistentTokenBasedRememberMeServices services = new VaadinPersistentTokenBasedRememberMeServices(
			"vaadin4spring", 
			userDetailsService, 
			jdbcTokenRepository());
	services.setCookieName("REMEMBERME");
	return services;
}
 
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecurity,代码行数:10,代码来源:SecurityConfig.java

示例12: getRememberMeServices

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices getRememberMeServices() {
	PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices(
			rememberMeToken, new BasicRememberMeUserDetailsService(), new InMemoryTokenRepositoryImpl());
	services.setParameter(rememberMeParameter);
	return services;
}
 
开发者ID:arnaldop,项目名称:enhanced-pet-clinic,代码行数:8,代码来源:MultiHttpSecurityConfig.java

示例13: rememberMeServices

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices rememberMeServices() {
	return new SpringSessionRememberMeServices();
}
 
开发者ID:codenergic,项目名称:theskeleton,代码行数:5,代码来源:WebSessionConfig.java

示例14: ProceedingRememberMeAuthenticationFilter

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
public ProceedingRememberMeAuthenticationFilter(
    AuthenticationManager authenticationManager, RememberMeServices rememberMeServices) {

  super(authenticationManager, rememberMeServices);
}
 
开发者ID:springuni,项目名称:springuni-particles,代码行数:6,代码来源:ProceedingRememberMeAuthenticationFilter.java

示例15: RememberMeLoginFilter

import org.springframework.security.web.authentication.RememberMeServices; //导入依赖的package包/类
public RememberMeLoginFilter(AuthenticationManager authenticationManager,
		RememberMeServices rememberMeServices) {
	super(authenticationManager, rememberMeServices);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:5,代码来源:RememberMeLoginFilter.java


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