Class ApiKeyGrantAuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken
com.broadleafcommerce.auth.authorization.security.apikey.ApiKeyGrantAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class ApiKeyGrantAuthenticationToken extends org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken
Represents the Phase 2 grant request for an API Key client, encapsulating the requested scopes and the authenticated client principal from Phase 1.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>

    Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication

    org.springframework.security.core.Authentication.Builder<B extends org.springframework.security.core.Authentication.Builder<B>>
  • Constructor Summary

    Constructors
    Constructor
    Description
    ApiKeyGrantAuthenticationToken(org.springframework.security.core.Authentication clientPrincipal, Set<String> scopes, Map<String,Object> additionalParameters)
    Constructs an ApiKeyGrantAuthenticationToken using the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    The requested scopes.

    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 org.springframework.security.core.Authentication

    toBuilder

    Methods inherited from interface java.security.Principal

    implies
  • Constructor Details

    • ApiKeyGrantAuthenticationToken

      public ApiKeyGrantAuthenticationToken(org.springframework.security.core.Authentication clientPrincipal, @Nullable Set<String> scopes, @Nullable Map<String,Object> additionalParameters)
      Constructs an ApiKeyGrantAuthenticationToken using the provided parameters.
      Parameters:
      clientPrincipal - the authenticated client principal. Almost always an ApiKeyClientAuthenticationToken
      scopes - the requested scopes
      additionalParameters - additional parameters
  • Method Details

    • getScopes

      public Set<String> getScopes()
      The requested scopes.