org.springframework.social.security.SocialUser Java Examples

The following examples show how to use org.springframework.social.security.SocialUser. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SimpleSocialUserDetailsService.java    From pazuzu-registry with MIT License 4 votes vote down vote up
@Override
public SocialUserDetails loadUserByUserId(String username) throws UsernameNotFoundException {
    UserDetails details = userDetailsManager.loadUserByUsername(username);
    return new SocialUser(details.getUsername(), "", AuthorityUtils.createAuthorityList("USER"));
}
 
Example #2
Source File: SimpleSocialUsersDetailService.java    From blog-social-login-with-spring-social with Apache License 2.0 4 votes vote down vote up
@Override
public SocialUserDetails loadUserByUserId(String userId) throws UsernameNotFoundException, DataAccessException {
    UserDetails userDetails = userDetailsService.loadUserByUsername(userId);
    return new SocialUser(userDetails.getUsername(), userDetails.getPassword(), userDetails.getAuthorities());
}