Class OAuth2ResourceOwnerPasswordAuthenticationToken

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

    public class OAuth2ResourceOwnerPasswordAuthenticationToken
    extends org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken
    An Authentication implementation used for the OAuth 2.0 Resource Owner Password Credentials Grant.
    See Also:
    OAuth2ResourceOwnerPasswordAuthenticationProvider, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      OAuth2ResourceOwnerPasswordAuthenticationToken​(org.springframework.security.oauth2.core.AuthorizationGrantType authorizationGrantType, org.springframework.security.core.Authentication clientPrincipal, java.util.Set<java.lang.String> scopes, java.util.Map<java.lang.String,​java.lang.Object> additionalParameters)
      Constructs an OAuth2ResourceOwnerPasswordAuthenticationToken using the provider parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getScopes()
      Returns the requested scope(s).
      • Methods inherited from class org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken

        getAdditionalParameters, getCredentials, getGrantType, getPrincipal
      • Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

        equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        implies
    • Constructor Detail

      • OAuth2ResourceOwnerPasswordAuthenticationToken

        public OAuth2ResourceOwnerPasswordAuthenticationToken​(org.springframework.security.oauth2.core.AuthorizationGrantType authorizationGrantType,
                                                              org.springframework.security.core.Authentication clientPrincipal,
                                                              @Nullable
                                                              java.util.Set<java.lang.String> scopes,
                                                              @Nullable
                                                              java.util.Map<java.lang.String,​java.lang.Object> additionalParameters)
        Constructs an OAuth2ResourceOwnerPasswordAuthenticationToken using the provider parameters.
        Parameters:
        authorizationGrantType - the authorization grant type
        clientPrincipal - the authenticated client principal
        scopes - the requested scope(s)
        additionalParameters - the additional parameters
    • Method Detail

      • getScopes

        public java.util.Set<java.lang.String> getScopes()
        Returns the requested scope(s).
        Returns:
        the requested scope(s), or an empty Set if not available