java.lang.Object
org.mule.runtime.extension.api.connectivity.oauth.ClientCredentialsGrantType
All Implemented Interfaces:
org.mule.runtime.api.meta.NamedObject, OAuthGrantType

public final class ClientCredentialsGrantType extends Object implements OAuthGrantType
Implementation of OAuthGrantType which contains information about how to use the Client Credentials grant type against a particular OAuth provider
Since:
1.2.1
  • Field Details

  • Constructor Details

    • ClientCredentialsGrantType

      public ClientCredentialsGrantType(String tokenUrl, String accessTokenExpr, String expirationRegex, String defaultScopes, CredentialsPlacement credentialsPlacement)
      Creates a new instance
      Parameters:
      tokenUrl - The url of the access token endpoint
      accessTokenExpr - Expression used to extract the access token from the accessTokenUrl response
      expirationRegex - Expression used to extract the expiration from the accessTokenUrl response
      defaultScopes - The default scopes to be request
  • Method Details

    • accept

      public void accept(OAuthGrantTypeVisitor visitor)
      Description copied from interface: OAuthGrantType
      Accepts a visitor
      Specified by:
      accept in interface OAuthGrantType
      Parameters:
      visitor - an OAuthGrantTypeVisitor
    • getName

      public String getName()
      Specified by:
      getName in interface org.mule.runtime.api.meta.NamedObject
    • getTokenUrl

      public String getTokenUrl()
      Returns:
      The url of the access token endpoint
    • getAccessTokenExpr

      public String getAccessTokenExpr()
      Specified by:
      getAccessTokenExpr in interface OAuthGrantType
      Returns:
      Expression used to extract the access token from the accessTokenUrl response
    • getExpirationRegex

      public String getExpirationRegex()
      Specified by:
      getExpirationRegex in interface OAuthGrantType
      Returns:
      Expression used to extract the expiration from the accessTokenUrl response
    • getDefaultScopes

      public Optional<String> getDefaultScopes()
      Returns:
      The default scopes to be requested
    • getCredentialsPlacement

      public CredentialsPlacement getCredentialsPlacement()