Class DefaultOauth2AuthenticatedPrincipal
java.lang.Object
com.power4j.fist.boot.security.oauth2.DefaultOauth2AuthenticatedPrincipal
- All Implemented Interfaces:
AuthenticatedObject,Oauth2AuthenticatedPrincipal
public class DefaultOauth2AuthenticatedPrincipal
extends Object
implements Oauth2AuthenticatedPrincipal
- Since:
- 1.0
- Author:
- CJ (power4j@outlook.com)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOauth2AuthenticatedPrincipal(String name, Map<String, Object> attributes, Collection<GrantedPermission> authorities) Constructs anDefaultOAuth2AuthenticatedPrincipalusing the provided parameters.DefaultOauth2AuthenticatedPrincipal(Map<String, Object> attributes, Collection<GrantedPermission> authorities) Constructs anDefaultOAuth2AuthenticatedPrincipalusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionGets the attributes of the OAuth 2.0 token in map form.Collection<? extends GrantedPermission>Get theCollectionofGrantedPermissions associated with this OAuth 2.0 tokengetName()Returns the name of the authenticatedPrincipal.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.power4j.fist.boot.security.oauth2.Oauth2AuthenticatedPrincipal
getAttribute
-
Constructor Details
-
DefaultOauth2AuthenticatedPrincipal
public DefaultOauth2AuthenticatedPrincipal(Map<String, Object> attributes, Collection<GrantedPermission> authorities) Constructs anDefaultOAuth2AuthenticatedPrincipalusing the provided parameters.- Parameters:
attributes- the attributes of the OAuth 2.0 tokenauthorities- the authorities of the OAuth 2.0 token
-
DefaultOauth2AuthenticatedPrincipal
public DefaultOauth2AuthenticatedPrincipal(String name, Map<String, Object> attributes, Collection<GrantedPermission> authorities) Constructs anDefaultOAuth2AuthenticatedPrincipalusing the provided parameters.- Parameters:
name- the name attached to the OAuth 2.0 tokenattributes- the attributes of the OAuth 2.0 tokenauthorities- the authorities of the OAuth 2.0 token
-
-
Method Details
-
getAttributes
Gets the attributes of the OAuth 2.0 token in map form.- Specified by:
getAttributesin interfaceOauth2AuthenticatedPrincipal- Returns:
- a
Mapof the attribute's objects keyed by the attribute's names
-
getAuthorities
Description copied from interface:Oauth2AuthenticatedPrincipalGet theCollectionofGrantedPermissions associated with this OAuth 2.0 token- Specified by:
getAuthoritiesin interfaceOauth2AuthenticatedPrincipal- Returns:
- the OAuth 2.0 token authorities
-
getName
Description copied from interface:AuthenticatedObjectReturns the name of the authenticatedPrincipal. Nevernull.- Specified by:
getNamein interfaceAuthenticatedObject- Returns:
- the name of the authenticated
Principal
-