Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public class DefaultOAuth2User
- Object
- DefaultOAuth2User
ImplementsOAuth2User
Known subtypesDefaultOidcUser
An
OAuth2User that holds what it is given.Constructors
Methods
public Map<String, Object> getAttributes() | What the provider said of the user, by name. |
public Collection<? extends GrantedAuthority> getAuthorities() | |
public String getName() | What the user is called here: the value of the provider’s name attribute, or the local account an OAuth2UserService tied them to. |
public String toString() | Returns a string representation of the object. |
Inherited methods
Constructor details
DefaultOAuth2User
public DefaultOAuth2User(Collection<? extends GrantedAuthority> authorities, Map<String, Object> attributes, String nameAttributeKey)Parameters
authoritiesCollection<? extends GrantedAuthority>- Not documented.
attributesMap<String, Object>- Not documented.
nameAttributeKeyString- the attribute whose value names the user
DefaultOAuth2User
public DefaultOAuth2User(String name, Collection<? extends GrantedAuthority> authorities, Map<String, Object> attributes)A user called
name, whatever the attributes say: for a service that
ties the provider’s user to an account of the application’s.Method details
getAttributes
public Map<String, Object> getAttributes()What the provider said of the user, by name.
getAuthorities
public Collection<? extends GrantedAuthority> getAuthorities()getName
public String getName()What the user is called here: the value of the provider’s name
attribute, or the local account an
OAuth2UserService tied them to.toString
public String toString()Returns a string representation of the object. In general, the toString method returns a string that “textually represents” this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.
The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@’, and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
getClass().getName() + ‘@’ + Integer.toHexString(hashCode())