1 | export interface JwtDecodeOptions {
|
2 | header?: boolean;
|
3 | }
|
4 | export interface JwtHeader {
|
5 | typ?: string;
|
6 | alg?: string;
|
7 | kid?: string;
|
8 | }
|
9 | export interface JwtPayload {
|
10 | iss?: string;
|
11 | sub?: string;
|
12 | aud?: string[] | string;
|
13 | exp?: number;
|
14 | nbf?: number;
|
15 | iat?: number;
|
16 | jti?: string;
|
17 | }
|
18 | export declare class InvalidTokenError extends Error {
|
19 | }
|
20 | export declare function jwtDecode<T = JwtHeader>(token: string, options: JwtDecodeOptions & {
|
21 | header: true;
|
22 | }): T;
|
23 | export declare function jwtDecode<T = JwtPayload>(token: string, options?: JwtDecodeOptions): T;
|