public class OAuth2UserAuthority
extends java.lang.Object
implements org.springframework.security.core.GrantedAuthority
GrantedAuthority that may be associated to an OAuth2User.OAuth2User,
Serialized Form| Constructor and Description |
|---|
OAuth2UserAuthority(java.util.Map<java.lang.String,java.lang.Object> attributes)
Constructs a
OAuth2UserAuthority using the provided parameters
and defaults getAuthority() to ROLE_USER. |
OAuth2UserAuthority(java.lang.String authority,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Constructs a
OAuth2UserAuthority using the provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Returns the attributes about the user.
|
java.lang.String |
getAuthority() |
int |
hashCode() |
java.lang.String |
toString() |
public OAuth2UserAuthority(java.util.Map<java.lang.String,java.lang.Object> attributes)
OAuth2UserAuthority using the provided parameters
and defaults getAuthority() to ROLE_USER.attributes - the attributes about the userpublic OAuth2UserAuthority(java.lang.String authority,
java.util.Map<java.lang.String,java.lang.Object> attributes)
OAuth2UserAuthority using the provided parameters.authority - the authority granted to the userattributes - the attributes about the userpublic java.lang.String getAuthority()
getAuthority in interface org.springframework.security.core.GrantedAuthoritypublic java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Map of attributes about the userpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object