本文整理汇总了Java中org.springframework.social.security.AuthenticationNameUserIdSource类的典型用法代码示例。如果您正苦于以下问题:Java AuthenticationNameUserIdSource类的具体用法?Java AuthenticationNameUserIdSource怎么用?Java AuthenticationNameUserIdSource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AuthenticationNameUserIdSource类属于org.springframework.social.security包,在下文中一共展示了AuthenticationNameUserIdSource类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: userIdSource
import org.springframework.social.security.AuthenticationNameUserIdSource; //导入依赖的package包/类
@Bean
public UserIdSource userIdSource() {
return new AuthenticationNameUserIdSource();
}
示例2: getUserIdSource
import org.springframework.social.security.AuthenticationNameUserIdSource; //导入依赖的package包/类
@Override
public UserIdSource getUserIdSource() {
return new AuthenticationNameUserIdSource();
}
示例3: getUserIdSource
import org.springframework.social.security.AuthenticationNameUserIdSource; //导入依赖的package包/类
@Override
public UserIdSource getUserIdSource() {
return new AuthenticationNameUserIdSource();
}
示例4: getUserIdSource
import org.springframework.social.security.AuthenticationNameUserIdSource; //导入依赖的package包/类
/**
* The UserIdSource determines the account ID of the user. The example application
* uses the username as the account ID.
*/
@Override
public UserIdSource getUserIdSource() {
return new AuthenticationNameUserIdSource();
}
示例5: getUserIdSource
import org.springframework.social.security.AuthenticationNameUserIdSource; //导入依赖的package包/类
@Override
public UserIdSource getUserIdSource() {
return new AuthenticationNameUserIdSource();
}
示例6: getUserIdSource
import org.springframework.social.security.AuthenticationNameUserIdSource; //导入依赖的package包/类
public UserIdSource getUserIdSource() {
log.debug("New instance of " + AuthenticationNameUserIdSource.class);
return new AuthenticationNameUserIdSource();
}
示例7: userIdSource
import org.springframework.social.security.AuthenticationNameUserIdSource; //导入依赖的package包/类
@Bean
public UserIdSource userIdSource() {
return new AuthenticationNameUserIdSource();
}
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecuritySocial,代码行数:5,代码来源:SecurityConfig.java
示例8: configure
import org.springframework.social.security.AuthenticationNameUserIdSource; //导入依赖的package包/类
@Override
public void configure(HttpSecurity http) throws Exception {
ApplicationContext applicationContext = http.getSharedObject(ApplicationContext.class);
UsersConnectionRepository usersConnectionRepository = getDependency(applicationContext, UsersConnectionRepository.class);
SocialAuthenticationServiceLocator authServiceLocator = getDependency(applicationContext, SocialAuthenticationServiceLocator.class);
SocialUserDetailsService socialUsersDetailsService = getDependency(applicationContext, SocialUserDetailsService.class);
SocialAuthenticationFilter filter = new SocialAuthenticationFilter(
http.getSharedObject(AuthenticationManager.class),
userIdSource != null ? userIdSource : new AuthenticationNameUserIdSource(),
usersConnectionRepository,
authServiceLocator);
RememberMeServices rememberMe = http.getSharedObject(RememberMeServices.class);
if (rememberMe != null) {
filter.setRememberMeServices(rememberMe);
}
if (postLoginUrl != null) {
filter.setPostLoginUrl(postLoginUrl);
filter.setAlwaysUsePostLoginUrl(alwaysUsePostLoginUrl);
}
if (postFailureUrl != null) {
/*
* This is throwing
* java.lang.IllegalStateException:
* can't set postFailureUrl on unknown failureHandler, type is org.springframework.social.security.SocialAuthenticationFailureHandler
*/
// filter.setPostFailureUrl(postFailureUrl);
filter.setDefaultFailureUrl(postFailureUrl);
}
if (signupUrl != null) {
filter.setSignupUrl(signupUrl);
}
http.authenticationProvider(
new SocialAuthenticationProvider(usersConnectionRepository, socialUsersDetailsService))
.addFilterBefore(postProcess(filter), AbstractPreAuthenticatedProcessingFilter.class);
}
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecuritySocial,代码行数:42,代码来源:VaadinSpringSocialConfigurer.java