Token Auth configuration

PlantUML supports token authentication and this is basically the second part of an OAuth flow. This means that the token for authentication to a URL endpoint must be determined in a different way. This is only useful for tokens that are valid for a very long time (for example API keys without expiration date).

A token auth credentials configuration file must be stored in the folder configured by the property plantuml.security.credentials.path. The file extension is .credential, the file content is structured in JSON, the charset encoding is UTF-8, the filename must match the UserInfo part of the URL.

Flow

Preparation

URL authentication

Token auth configuration

Token auth JSON structure:

{
  "name": "<name of the configuration>",
  "type": "tokenauth",
  "properties": {
    "headers": {
      "key1": "value1",
      "key2": "value2",
      ...
    }
  },
  "proxy": {
    "type": "<proxy type>",
    "address": "<proxy server address>",
    "port": "<proxy server port>"
  }
}

Examples:

{
  "name": "public-api",
  "type": "tokenauth",
  "properties": {
    "headers": {
      "Authorization": "ApiKey a4db08b7-5729-4ba9-8c08-f2df493465a1"
    }
  }
}


Privacy Policy      Advertise