public class OAuth2UserDetails<T extends org.springframework.security.oauth2.core.user.OAuth2User>
extends java.lang.Object
implements org.springframework.security.oauth2.core.user.OAuth2User, org.springframework.security.core.userdetails.UserDetails
OAuth2User implementation that also implements methods of UserDetails interface.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> |
authorities |
protected T |
user |
| Constructor and Description |
|---|
OAuth2UserDetails(T user,
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes() |
java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> |
getAuthorities() |
java.lang.String |
getName() |
java.lang.String |
getPassword() |
java.lang.String |
getUsername() |
boolean |
isAccountNonExpired() |
boolean |
isAccountNonLocked() |
boolean |
isCredentialsNonExpired() |
boolean |
isEnabled() |
protected final T extends org.springframework.security.oauth2.core.user.OAuth2User user
protected final java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities
public OAuth2UserDetails(T user, java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
public java.lang.String getName()
getName in interface org.springframework.security.core.AuthenticatedPrincipalpublic java.util.Map<java.lang.String,java.lang.Object> getAttributes()
getAttributes in interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipalpublic java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
getAuthorities in interface org.springframework.security.core.userdetails.UserDetailsgetAuthorities in interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipalpublic java.lang.String getPassword()
getPassword in interface org.springframework.security.core.userdetails.UserDetailspublic java.lang.String getUsername()
getUsername in interface org.springframework.security.core.userdetails.UserDetailspublic boolean isAccountNonExpired()
isAccountNonExpired in interface org.springframework.security.core.userdetails.UserDetailspublic boolean isAccountNonLocked()
isAccountNonLocked in interface org.springframework.security.core.userdetails.UserDetailspublic boolean isCredentialsNonExpired()
isCredentialsNonExpired in interface org.springframework.security.core.userdetails.UserDetailspublic boolean isEnabled()
isEnabled in interface org.springframework.security.core.userdetails.UserDetails