@grandlinex/react-components
Version:
18 lines (17 loc) • 503 B
TypeScript
export type JwtToken<A extends Record<string, any>> = {
exp: number;
iat: number;
} & A;
export declare class JWT<A extends Record<string, any>> {
private readonly token;
private readonly exp;
private iat;
private readonly data;
constructor(token: string);
static parseJwt<A extends Record<string, any> = any>(token: string): JwtToken<A>;
isExpired(): boolean;
getExpireDate(): Date;
getData(): JwtToken<A>;
getToken(): string;
getHeader(): string;
}