@tidecloak/verify
Version:
A lightweight utility for server-side verification of TideCloak-issued JSON Web Tokens (JWTs).
10 lines • 591 B
TypeScript
/**
* Verify a TideCloak-issued JWT on the server side using your imported config object.
*
* @param {object} config - Imported TideCloak configuration (parsed JSON).
* @param {string} token - access token to verify.
* @param {string[]} [allowedRoles] - Array of Keycloak 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