Class SocialUser
- java.lang.Object
-
- org.springframework.security.core.userdetails.User
-
- org.springframework.social.security.SocialUser
-
- All Implemented Interfaces:
Serializable,org.springframework.security.core.CredentialsContainer,org.springframework.security.core.userdetails.UserDetails,SocialUserDetails
public class SocialUser extends org.springframework.security.core.userdetails.User implements SocialUserDetails
simple utility class that usesUser.getUsername()asSocialUserDetails.getUserId()for SocialUserDetails- Author:
- Stefan Fussennegger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SocialUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)SocialUser(String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetUserId()The user's identity at the provider.-
Methods inherited from class org.springframework.security.core.userdetails.User
builder, equals, eraseCredentials, getAuthorities, getPassword, getUsername, hashCode, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled, toString, withDefaultPasswordEncoder, withUserDetails, withUsername
-
-
-
-
Constructor Detail
-
SocialUser
public SocialUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
-
SocialUser
public SocialUser(String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
-
-
Method Detail
-
getUserId
public String getUserId()
Description copied from interface:SocialUserDetailsThe user's identity at the provider. Might be same asUserDetails.getUsername()if users are identified by username- Specified by:
getUserIdin interfaceSocialUserDetails- Returns:
- user's id used to assign connections
-
-