{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "https://www.krakend.io/schema/v2.13/auth/client-credentials.json",
  "title": "OAuth2 client-credentials",
  "description": "2-legged OAuth2 flow: Request to your authorization server an access token to reach protected resources.\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/",
  "type": "object",
  "required": [ "client_id", "client_secret", "token_url" ],
  "properties": {
    "client_id": {
      "title": "Client ID",
      "description": "The Client ID provided to the Auth server\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/",
      "type": "string"
    },
    "client_secret": {
      "title": "Client secret",
      "description": "The secret string provided to the Auth server.\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/",
      "examples": [ "mys3cr3t" ],
      "type": "string"
    },
    "endpoint_params": {
      "title": "Endpoint parameters",
      "description": "Any additional parameters you want to include **in the payload** when requesting the token. For instance, adding the `audience` request parameter may denote the target API for which the token should be issued.\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/",
      "examples": [
        {
          "audience": [ "YOUR-AUDIENCE" ]
        }
      ],
      "type": "object"
    },
    "scopes": {
      "title": "Scopes",
      "description": "A comma-separated list of scopes needed, e.g.: `scopeA,scopeB`\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/",
      "examples": [ "scopeA,scopeB" ],
      "type": "string"
    },
    "token_url": {
      "title": "Token URL",
      "description": "The endpoint URL where the negotiation of the token happens\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/",
      "examples": [ "https://your.custom.identity.service.tld/token_endpoint" ],
      "type": "string"
    }
  },
  "patternProperties": {
    "^[@$_#]": true
  },
  "additionalProperties": false
}
