Class ClientCredentialsTokenRequestContext

java.lang.Object
io.micronaut.security.oauth2.endpoint.token.request.context.AbstractTokenRequestContext<Map<String,String>,TokenResponse>
io.micronaut.security.oauth2.endpoint.token.request.context.ClientCredentialsTokenRequestContext
All Implemented Interfaces:
TokenRequestContext<Map<String,String>,TokenResponse>

public class ClientCredentialsTokenRequestContext extends AbstractTokenRequestContext<Map<String,String>,TokenResponse>
A token request context for sending a client credentials request to an OAuth 2.0 provider.
Author:
Sergio del Amo
  • Constructor Details

    • ClientCredentialsTokenRequestContext

      public ClientCredentialsTokenRequestContext(String scope, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration)
      Parameters:
      scope - requested scopes
      tokenEndpoint - The token endpoint
      clientConfiguration - The client configuration
    • ClientCredentialsTokenRequestContext

      public ClientCredentialsTokenRequestContext(OauthClientConfiguration clientConfiguration)
      Parameters:
      clientConfiguration - The client configuration
    • ClientCredentialsTokenRequestContext

      public ClientCredentialsTokenRequestContext(String scope, OauthClientConfiguration clientConfiguration)
      Parameters:
      scope - requested scopes
      clientConfiguration - The client configuration
  • Method Details

    • getGrant

      public Map<String,String> getGrant()
      Returns:
      The grant or body of the request
    • getResponseType

      public io.micronaut.core.type.Argument<TokenResponse> getResponseType()
      Returns:
      The response argument
    • getErrorResponseType

      public io.micronaut.core.type.Argument<?> getErrorResponseType()
      Returns:
      The error response argument