OAuth 2.0 - JWT Bearer Auth
OAuth 2.0 with JWT Bearer Auth
The OAuth 2.0 JWT Bearer authentication method allows you to obtain an Access Token using a JWT (JSON Web Token). This JWT represents the user’s identity and permissions and replaces traditional username-password authentication.
Once obtained, the Access Token is used to authenticate API requests as a Bearer Token. When it expires, you can use a new JWT to request a fresh Access Token, maintaining secure access without re-authentication.
Authentication Options
Two-Step Authentication Process
OAuth 2.0 with JWT Bearer authentication follows a two-step process:
- Generate a JWT from the provided configuration parameters - We construct a JWT using the issuer, audience, subject, expiry, and additional claims configured by the user.
- Exchange the JWT for an Access Token (if applicable) - If a token request URL is provided, the JWT is sent to the authorization server to obtain an Access Token. If no URL is provided, the JWT itself is used as the Bearer Token in API requests.
How We Generate the JWT
We generate the JWT based on the configured values in the authentication setup:
Exchange JWT for an Access Token (if applicable)
If a token request URL is provided, the system will send the JWT to the authorization server and extract the Access Token from the response:
A successful response might look like this:
The system will extract access_token from this response and use it for subsequent API requests.
If no token request URL is provided, the system will use the JWT itself as the Bearer Token.
Configuration Fields
To set this up:
-
Select JWT Auth from the Auth Config dropdown.
-
Fill in the required fields:
For testing and validation, you can use JWT.io. The iat and exp claims are automatically generated and do not need to be manually specified in the configuration.