Class DefaultOAuth2AuthenticatedPrincipal

    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultOAuth2AuthenticatedPrincipal​(java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> attributes, java.util.Collection<GrantedAuthority> authorities)
      Constructs an DefaultOAuth2AuthenticatedPrincipal using the provided parameters.
      DefaultOAuth2AuthenticatedPrincipal​(java.util.Map<java.lang.String,​java.lang.Object> attributes, java.util.Collection<GrantedAuthority> authorities)
      Constructs an DefaultOAuth2AuthenticatedPrincipal using the provided parameters.
    • Constructor Detail

      • DefaultOAuth2AuthenticatedPrincipal

        public DefaultOAuth2AuthenticatedPrincipal​(java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                   java.util.Collection<GrantedAuthority> authorities)
        Constructs an DefaultOAuth2AuthenticatedPrincipal using the provided parameters.
        Parameters:
        attributes - the attributes of the OAuth 2.0 token
        authorities - the authorities of the OAuth 2.0 token
      • DefaultOAuth2AuthenticatedPrincipal

        public DefaultOAuth2AuthenticatedPrincipal​(java.lang.String name,
                                                   java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                   java.util.Collection<GrantedAuthority> authorities)
        Constructs an DefaultOAuth2AuthenticatedPrincipal using the provided parameters.
        Parameters:
        name - the name attached to the OAuth 2.0 token
        attributes - the attributes of the OAuth 2.0 token
        authorities - the authorities of the OAuth 2.0 token
    • Method Detail

      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Gets the attributes of the OAuth 2.0 token in map form.
        Specified by:
        getAttributes in interface OAuth2AuthenticatedPrincipal
        Returns:
        a Map of the attribute's objects keyed by the attribute's names
      • getName

        public java.lang.String getName()
        Returns the name of the authenticated Principal. Never null.
        Specified by:
        getName in interface AuthenticatedPrincipal
        Returns:
        the name of the authenticated Principal