Skip to main content

JwtAuthenticator

Authenticator for requests using JWT authentication flow.

  • type: object
  • required: ["type","secret_key","algorithm"]

type​

  • Required: Yes
  • type: string
  • enum: ["JwtAuthenticator"]

secret_key​

Secret used to sign the JSON web token.

  • Required: Yes
  • type: string
  • Available variables: config

Examples:

{{ config['secret_key'] }}

base64_encode_secret_key​

When set to true, the secret key will be base64 encoded prior to being encoded as part of the JWT. Only set to "true" when required by the API.

  • Required: No
  • type: boolean
  • default: false

algorithm​

Algorithm used to sign the JSON web token.

  • Required: Yes
  • type: string
  • enum: ["HS256","HS384","HS512","ES256","ES256K","ES384","ES512","RS256","RS384","RS512","PS256","PS384","PS512","EdDSA"]

Examples:

ES256
HS256
RS256
{{ config['algorithm'] }}

token_duration​

The amount of time in seconds a JWT token can be valid after being issued.

  • Required: No
  • type: integer
  • default: 1200

Examples:

1200
3600

iat_backdate_seconds​

Number of seconds to move the iat (issued at) and nbf (not before) claims into the past, so a small clock difference between this machine and the API server does not make the token look issued in the future. exp is not moved. Only set this when the API recommends it.

  • Required: No
  • type: integer
  • default: 0
  • minimum: 0

Examples:

60

header_prefix​

The prefix to be used within the Authentication header.

  • Required: No
  • type: string

Examples:

Bearer
Basic

jwt_headers​

JWT headers used when signing JSON web token.

  • Required: No

  • type: object

  • kid

    Private key ID for user account.

    • Required: No
    • type: string

    Examples:

    {{ config['kid'] }}
  • typ

    The media type of the complete JWT.

    • Required: No
    • type: string
    • default: JWT

    Examples:

    JWT
  • cty

    Content type of JWT header.

    • Required: No
    • type: string

    Examples:

    JWT

additional_jwt_headers​

Additional headers to be included with the JWT headers object.

  • Required: No
  • type: object

jwt_payload​

JWT Payload used when signing JSON web token.

  • Required: No

  • type: object

  • iss

    The user/principal that issued the JWT. Commonly a value unique to the user.

    • Required: No
    • type: string

    Examples:

    {{ config['iss'] }}
  • sub

    The subject of the JWT. Commonly defined by the API.

    • Required: No
    • type: string
  • aud

    The recipient that the JWT is intended for. Commonly defined by the API.

    • Required: No
    • type: string

    Examples:

    appstoreconnect-v1

additional_jwt_payload​

Additional properties to be added to the JWT payload.

  • Required: No
  • type: object

passphrase​

A passphrase/password used to encrypt the private key. Only provide a passphrase if required by the API for JWT authentication. The API will typically provide the passphrase when generating the public/private key pair.

  • Required: No
  • type: string

Examples:

{{ config['passphrase'] }}

request_option​

A request option describing where the signed JWT token that is generated should be injected into the outbound API request.

$parameters​

  • Required: No
  • type: object