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