Generate JWT token with FAB auth manager

Note

This guide only applies if your environment is configured with FAB auth manager.

In order to use the Airflow public API, you need a JWT token for authentication. You can then include this token in your Airflow public API requests. To generate a JWT token, use the Create Token API in FAB auth manager token API.

Example

ENDPOINT_URL="http://localhost:8080/"
curl -X 'POST' \
    "${ENDPOINT_URL}/auth/token" \
    -H 'Content-Type: application/json' \
    -d '{
    "username": "<username>",
    "password": "<password>"
    }'

This process will return a token that you can use in the Airflow public API requests.

Was this entry helpful?