UNPKG

@tidecloak/verify

Version:

A lightweight utility for server-side verification of TideCloak-issued JSON Web Tokens (JWTs).

12 lines 754 B
/** * Verify a TideCloak-issued JWT on the server side using your imported config object. * * @param {object} config - Imported TideCloak configuration (parsed JSON). May also * carry optional `tokenSignatureAlgorithms` (string[]) and `clockTolerance` * (number of seconds, or a jose duration string) to tune verification. * @param {string} token - access token to verify. * @param {string[]} [allowedRoles] - Array of Tidecloak realm or client roles; user must have at least one. * @returns {Promise<object|null>} - The token payload if valid and role-check passes, otherwise null. */ export function verifyTideCloakToken(config: object, token: string, allowedRoles?: string[]): Promise<object | null>; //# sourceMappingURL=TideJWT.d.ts.map