本文整理汇总了Java中org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices类的典型用法代码示例。如果您正苦于以下问题:Java PersistentTokenBasedRememberMeServices类的具体用法?Java PersistentTokenBasedRememberMeServices怎么用?Java PersistentTokenBasedRememberMeServices使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PersistentTokenBasedRememberMeServices类属于org.springframework.security.web.authentication.rememberme包,在下文中一共展示了PersistentTokenBasedRememberMeServices类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: persistentTokenBasedRememberMeServices
import org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices; //导入依赖的package包/类
@Bean// browser remember me
PersistentTokenBasedRememberMeServices persistentTokenBasedRememberMeServices(){
PersistentTokenBasedRememberMeServices p =
new PersistentTokenBasedRememberMeServices("SpringRocks",myUserDetailService,new JdbcTokenRepositoryImpl());
p.setCookieName("JSESSIONID");
return p;
}
示例2: rememberMeServices
import org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices rememberMeServices() {
PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices(
environment.getProperty("RM_KEY", "grassrootremembers"),
userDetailsService, persistentTokenRepository());
services.setTokenValiditySeconds(1209600); // two weeks
return services;
}
示例3: rememberMeServices
import org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices rememberMeServices(String rememberBeKey) {
return new PersistentTokenBasedRememberMeServices(
rememberBeKey,
basicRememberMeUserDetailsService(),
new InMemoryTokenRepositoryImpl()
);
}
示例4: getRememberMeServices
import org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices; //导入依赖的package包/类
@Bean
public RememberMeServices getRememberMeServices() {
PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices(
rememberMeToken, new BasicRememberMeUserDetailsService(), new InMemoryTokenRepositoryImpl());
services.setParameter(rememberMeParameter);
return services;
}
示例5: getPersistentTokenBasedRememberMeServices
import org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices; //导入依赖的package包/类
@Bean
public PersistentTokenBasedRememberMeServices getPersistentTokenBasedRememberMeServices() {
PersistentTokenBasedRememberMeServices tokenBasedservice = new PersistentTokenBasedRememberMeServices(
"remember-me", userDetailsService, tokenRepository);
return tokenBasedservice;
}