1 |
|
2 |
|
3 |
|
4 |
|
5 | export declare type Algorithm = 'HS256' | 'HS384' | 'HS512' | 'RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512' | 'none';
|
6 |
|
7 |
|
8 |
|
9 | export interface JwtPayload {
|
10 | [key: string]: any;
|
11 | iss?: string | undefined;
|
12 | sub?: string | undefined;
|
13 | aud?: string | string[] | undefined;
|
14 | exp?: number | undefined;
|
15 | nbf?: number | undefined;
|
16 | iat?: number | undefined;
|
17 | jti?: string | undefined;
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export interface JwtHeader {
|
24 | alg: string | Algorithm;
|
25 | typ?: string | undefined;
|
26 | cty?: string | undefined;
|
27 | crit?: (string | Exclude<keyof JwtHeader, 'crit'>)[] | undefined;
|
28 | kid?: string | undefined;
|
29 | jku?: string | undefined;
|
30 | x5u?: string | string[] | undefined;
|
31 | 'x5t#S256'?: string | undefined;
|
32 | x5t?: string | undefined;
|
33 | x5c?: string | string[] | undefined;
|
34 | }
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | export interface Jwt {
|
40 | header: JwtHeader;
|
41 | payload: JwtPayload | string;
|
42 | signature: string;
|
43 | }
|
44 |
|
45 |
|
46 |
|
47 | export interface JwtWithPayloadObject {
|
48 | header: JwtHeader;
|
49 | payload: JwtPayload;
|
50 | signature: string;
|
51 | }
|
52 |
|
\ | No newline at end of file |