org.springframework.social.security
Class SocialUser
java.lang.Object
org.springframework.security.core.userdetails.User
org.springframework.social.security.SocialUser
- All Implemented Interfaces:
- java.io.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 uses User.getUsername()
as SocialUserDetails.getUserId()
for SocialUserDetails
- Author:
- Stefan Fussennegger
- See Also:
- Serialized Form
Constructor Summary |
SocialUser(java.lang.String username,
java.lang.String password,
boolean enabled,
boolean accountNonExpired,
boolean credentialsNonExpired,
boolean accountNonLocked,
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
|
SocialUser(java.lang.String username,
java.lang.String password,
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
|
Method Summary |
java.lang.String |
getUserId()
The user's identity at the provider. |
Methods inherited from class org.springframework.security.core.userdetails.User |
equals, eraseCredentials, getAuthorities, getPassword, getUsername, hashCode, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.security.core.userdetails.UserDetails |
getAuthorities, getPassword, getUsername, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled |
SocialUser
public SocialUser(java.lang.String username,
java.lang.String password,
boolean enabled,
boolean accountNonExpired,
boolean credentialsNonExpired,
boolean accountNonLocked,
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
SocialUser
public SocialUser(java.lang.String username,
java.lang.String password,
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
getUserId
public java.lang.String getUserId()
- Description copied from interface:
SocialUserDetails
- The user's identity at the provider.
Might be same as
UserDetails.getUsername()
if users are identified by username
- Specified by:
getUserId
in interface SocialUserDetails
- Returns:
- user's id used to assign connections