@triplit/client
Version:
8 lines (7 loc) • 441 B
TypeScript
/**
* Decodes a JWT token and returns the claims area.
* If no value is found or an error occurs while decoding (due to an invalid jwt), it returns undefined.
*/
export declare function decodeToken(token: unknown, claimsPath?: string): Record<string, unknown> | undefined;
export declare function decodeJwt(token: unknown): Record<string, unknown> | undefined;
export declare function tokenIsExpired(token: Record<string, any>): boolean;