Class DefaultOAuth2User
java.lang.Object
com.codename1.backend.security.oauth2.client.DefaultOAuth2User
- All Implemented Interfaces:
OAuth2User
- Direct Known Subclasses:
DefaultOidcUser
An
OAuth2User that holds what it is given.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOAuth2User(String name, Collection<? extends GrantedAuthority> authorities, Map<String, Object> attributes) A user calledname, whatever the attributes say: for a service that ties the provider's user to an account of the application's.DefaultOAuth2User(Collection<? extends GrantedAuthority> authorities, Map<String, Object> attributes, String nameAttributeKey) -
Method Summary
Modifier and TypeMethodDescriptionWhat the provider said of the user, by name.Collection<? extends GrantedAuthority> getName()What the user is called here: the value of the provider's name attribute, or the local account anOAuth2UserServicetied them to.toString()Returns a string representation of the object.
-
Constructor Details
-
DefaultOAuth2User
public DefaultOAuth2User(Collection<? extends GrantedAuthority> authorities, Map<String, Object> attributes, String nameAttributeKey) - Parameters:
nameAttributeKey- the attribute whose value names the user
-
DefaultOAuth2User
public DefaultOAuth2User(String name, Collection<? extends GrantedAuthority> authorities, Map<String, Object> attributes) A user calledname, whatever the attributes say: for a service that ties the provider's user to an account of the application's.
-
-
Method Details
-
getAttributes
Description copied from interface:OAuth2UserWhat the provider said of the user, by name.- Specified by:
getAttributesin interfaceOAuth2User
-
getAuthorities
- Specified by:
getAuthoritiesin interfaceOAuth2User
-
getName
Description copied from interface:OAuth2UserWhat the user is called here: the value of the provider's name attribute, or the local account anOAuth2UserServicetied them to.- Specified by:
getNamein interfaceOAuth2User
-
toString
Description copied from class:ObjectReturns 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())
-