When using JWT, the app should check the validity using JWKS
Reference
Generate Token
Use this endpoint to generate a JWT. Send the clientId that you would like a JWT for.
POST/v4/jwt/generate
Request Parameters
Field | Type | Required | Description |
---|---|---|---|
clientId | string | ✗ | ClientIf of the app you want to create a JWT for. Defaults to the sent header. |
expires | integer | ✗ | Expiration time for JWT. The value is also checked again app settings. |
The retrieved JWT looks like the example below. The audience must match the clientId.
{
session: { user: { id: 123 }, customer: { id: 456 } },
iat: 1736800727,
iss: 'https://auth.admiralcloud.com',
aud: '123456-dfe3-494b-9300-12345678',
exp: 1736804327,
sub: '123'
}
Check Token
Check an existing JW Token.
GET/v4/jwt/checkToken
Request Parameters
Field | Type | Required | Description |
---|---|---|---|
action | string | ✗ | Action to check. |