Skip to main content

authentication-tasks



Authentication Tasks

Authentication tasks are used to authenticate workflows with external systems.

Authenticate with OAuth 2.0​

The Authenticate with OAuth 2.0 task is used to authenticate with an OAuth 2.0 provider.

Inputs​

  • credentials: The credentials of the OAuth 2.0 application. Required.
  • cache: Whether to cache the token response. Optional. Default: true. Set to false to bypass cache and always fetch a fresh token.

Credentials​

  • grantType: The grant type of the OAuth 2.0 application. Required. Supported grant types are authorization_code, client_credentials, password, refresh_token.
  • clientId: The client ID of the OAuth 2.0 application. Required.
  • clientSecret: The client secret of the OAuth 2.0 application. Optional.
  • tokenUrl: The token URL of the OAuth 2.0 provider. Required.
  • authorizationUrl: The authorization URL of the OAuth 2.0 provider. Optional.
  • username: The username of the OAuth 2.0 application. Required for password grant type.
  • password: The password of the OAuth 2.0 application. Required for password grant type.
  • scope: The scope of the OAuth 2.0 application. Optional.
  • audience: The audience of the OAuth 2.0 application. Optional.

Outputs​

  • accessToken: The access token of the OAuth 2.0 application. Required.
  • refreshToken: The refresh token of the OAuth 2.0 application. Optional.
  • tokenType: The token type of the OAuth 2.0 application. Optional.
  • expiresIn: The expiration time of the access token in seconds. Optional.
  • idToken: The ID token of the OAuth 2.0 application. Optional.

Example​

tasks:
- task: "Authentication/OAuth2"
name: "authenticate"
inputs:
tokenUrl: "https://example.com/oauth2/token"
credentials:
grantType: "password"
clientId: "client-id"
clientSecret: "client-secret"
username: "username"
password: "password"
outputs:
- name: "accessToken"
mapping: "access_token

Authenticate with Basic Authentication​

The Authenticate with Basic Authentication task is used to authenticate with basic authentication.

Inputs​

  • username: The username of the basic authentication. Required.
  • password: The password of the basic authentication. Required.

Outputs​

  • authorization: The authorization header value for basic authentication. Required.

Example​


tasks:
- task: "Authentication/Basic"
name: "authenticate"
inputs:
username: "username"
password: "password"
outputs:
- name: "authorization"
mapping: "authorization"