- Authenticating a User
- Performing credentials-related operations such as issuing or verifying credentials
scope: "issue on-behalf", typ: "JWT", and the target user’s email claim. See Issue on Behalf for concepts and Issue on Behalf API & Examples for endpoint usage.
JWT Details
- Signing algorithms supported: ES256, RS256
- Expiry: 5 min (recommended)
- Claims: varies depending on the operation. You would always need to include your
partnerIdas one of the claims - Header: You must include a
kid(Key ID) header to indicate which key was used to sign the JWT. This is important for AIR Kit to select the correct key from your JWKS endpoint for verification. - JWKS URL - AIR Kit validates your JWT using JWK standards (https://datatracker.ietf.org/doc/html/rfc7517). By specifying your JSON Web Key Set (JWKS) endpoint, we could validate your JWT issued by your Authorization Server. - Example: https://static.air3.com/.well-known/example-jwks.json
Issue on Behalf JWT requirements
For Issue on Behalf (API), use a Partner JWT with these fields:| Category | Required fields | Notes |
|---|---|---|
| Claims | partnerId, scope: "issue on-behalf", email | email must be the target user’s AIR Account email |
| Header | kid, typ: "JWT" | kid identifies which key in your JWKS is used |
| Algorithm | RS256 or ES256 | Keep consistent with your JWKS key type |
| Expiry | exp (recommended 5 minutes) | Short-lived token recommended |
kidin JWT header must match a key ID exposed by your JWKS endpoint- JWKS endpoint must be publicly reachable by AIR Kit
Generating Partner JWTs
Generating an RS256 Key Pair
To generate a private/public key pair, you may use OpenSSL:private.key: Use this file as your signing key in backend code.public.key: Use this to configure your JWKS endpoint for JWT verification.
Tip: Keep your private key secure and never share it publicly.
Examples
Below are backend code examples for generating a JWT using ES256 or RS256 algorithms, including thekid (Key ID) header.
- Node.js
- Java
- C#
- Go