@navios/jwt 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/jwt-service.provider.d.mts +2 -1
- package/dist/src/jwt-service.provider.d.mts.map +1 -1
- package/dist/src/jwt.service.d.mts +185 -539
- package/dist/src/jwt.service.d.mts.map +1 -1
- package/dist/src/options/jwt-service.options.d.mts +223 -641
- package/dist/src/options/jwt-service.options.d.mts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/lib/_tsup-dts-rollup.d.mts +367 -1141
- package/lib/_tsup-dts-rollup.d.ts +367 -1141
- package/lib/index.js +66 -55
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +19 -8
- package/lib/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/jwt-service.provider.mts +6 -0
- package/src/jwt.service.mts +2 -0
- package/src/options/jwt-service.options.mts +21 -10
|
@@ -1,749 +1,331 @@
|
|
|
1
1
|
import type { Secret as JwtSecret } from 'jsonwebtoken';
|
|
2
|
-
import { z } from 'zod';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
3
|
export declare enum RequestType {
|
|
4
4
|
Sign = "Sign",
|
|
5
5
|
Verify = "Verify"
|
|
6
6
|
}
|
|
7
|
-
export declare const AlgorithmType: z.ZodEnum<
|
|
7
|
+
export declare const AlgorithmType: z.ZodEnum<{
|
|
8
|
+
HS256: "HS256";
|
|
9
|
+
HS384: "HS384";
|
|
10
|
+
HS512: "HS512";
|
|
11
|
+
RS256: "RS256";
|
|
12
|
+
RS384: "RS384";
|
|
13
|
+
RS512: "RS512";
|
|
14
|
+
ES256: "ES256";
|
|
15
|
+
ES384: "ES384";
|
|
16
|
+
ES512: "ES512";
|
|
17
|
+
PS256: "PS256";
|
|
18
|
+
PS384: "PS384";
|
|
19
|
+
PS512: "PS512";
|
|
20
|
+
none: "none";
|
|
21
|
+
}>;
|
|
8
22
|
export declare const JwtHeaderSchema: z.ZodObject<{
|
|
9
|
-
alg: z.ZodUnion<[z.ZodEnum<
|
|
23
|
+
alg: z.ZodUnion<[z.ZodEnum<{
|
|
24
|
+
HS256: "HS256";
|
|
25
|
+
HS384: "HS384";
|
|
26
|
+
HS512: "HS512";
|
|
27
|
+
RS256: "RS256";
|
|
28
|
+
RS384: "RS384";
|
|
29
|
+
RS512: "RS512";
|
|
30
|
+
ES256: "ES256";
|
|
31
|
+
ES384: "ES384";
|
|
32
|
+
ES512: "ES512";
|
|
33
|
+
PS256: "PS256";
|
|
34
|
+
PS384: "PS384";
|
|
35
|
+
PS512: "PS512";
|
|
36
|
+
none: "none";
|
|
37
|
+
}>, z.ZodString]>;
|
|
10
38
|
typ: z.ZodOptional<z.ZodString>;
|
|
11
39
|
cty: z.ZodOptional<z.ZodString>;
|
|
12
|
-
crit: z.ZodOptional<z.ZodArray<z.ZodString
|
|
40
|
+
crit: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
41
|
kid: z.ZodOptional<z.ZodString>;
|
|
14
42
|
jku: z.ZodOptional<z.ZodString>;
|
|
15
|
-
x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
43
|
+
x5u: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
16
44
|
'x5t#S256': z.ZodOptional<z.ZodString>;
|
|
17
45
|
x5t: z.ZodOptional<z.ZodString>;
|
|
18
|
-
x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
19
|
-
},
|
|
20
|
-
alg: string;
|
|
21
|
-
typ?: string | undefined;
|
|
22
|
-
cty?: string | undefined;
|
|
23
|
-
crit?: string[] | undefined;
|
|
24
|
-
kid?: string | undefined;
|
|
25
|
-
jku?: string | undefined;
|
|
26
|
-
x5u?: string | string[] | undefined;
|
|
27
|
-
'x5t#S256'?: string | undefined;
|
|
28
|
-
x5t?: string | undefined;
|
|
29
|
-
x5c?: string | string[] | undefined;
|
|
30
|
-
}, {
|
|
31
|
-
alg: string;
|
|
32
|
-
typ?: string | undefined;
|
|
33
|
-
cty?: string | undefined;
|
|
34
|
-
crit?: string[] | undefined;
|
|
35
|
-
kid?: string | undefined;
|
|
36
|
-
jku?: string | undefined;
|
|
37
|
-
x5u?: string | string[] | undefined;
|
|
38
|
-
'x5t#S256'?: string | undefined;
|
|
39
|
-
x5t?: string | undefined;
|
|
40
|
-
x5c?: string | string[] | undefined;
|
|
41
|
-
}>;
|
|
46
|
+
x5c: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
42
48
|
export type JwtHeader = z.infer<typeof JwtHeaderSchema>;
|
|
43
49
|
export declare const SignOptionsSchema: z.ZodObject<{
|
|
44
|
-
algorithm: z.ZodOptional<z.ZodEnum<
|
|
50
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
HS256: "HS256";
|
|
52
|
+
HS384: "HS384";
|
|
53
|
+
HS512: "HS512";
|
|
54
|
+
RS256: "RS256";
|
|
55
|
+
RS384: "RS384";
|
|
56
|
+
RS512: "RS512";
|
|
57
|
+
ES256: "ES256";
|
|
58
|
+
ES384: "ES384";
|
|
59
|
+
ES512: "ES512";
|
|
60
|
+
PS256: "PS256";
|
|
61
|
+
PS384: "PS384";
|
|
62
|
+
PS512: "PS512";
|
|
63
|
+
none: "none";
|
|
64
|
+
}>>;
|
|
45
65
|
keyid: z.ZodOptional<z.ZodString>;
|
|
46
|
-
expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
47
|
-
notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
48
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString,
|
|
66
|
+
expiresIn: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
67
|
+
notBefore: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
68
|
+
audience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>>]>>;
|
|
49
69
|
subject: z.ZodOptional<z.ZodString>;
|
|
50
70
|
issuer: z.ZodOptional<z.ZodString>;
|
|
51
71
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
52
72
|
mutatePayload: z.ZodOptional<z.ZodBoolean>;
|
|
53
73
|
noTimestamp: z.ZodOptional<z.ZodBoolean>;
|
|
54
74
|
header: z.ZodOptional<z.ZodObject<{
|
|
55
|
-
alg: z.ZodUnion<[z.ZodEnum<
|
|
75
|
+
alg: z.ZodUnion<[z.ZodEnum<{
|
|
76
|
+
HS256: "HS256";
|
|
77
|
+
HS384: "HS384";
|
|
78
|
+
HS512: "HS512";
|
|
79
|
+
RS256: "RS256";
|
|
80
|
+
RS384: "RS384";
|
|
81
|
+
RS512: "RS512";
|
|
82
|
+
ES256: "ES256";
|
|
83
|
+
ES384: "ES384";
|
|
84
|
+
ES512: "ES512";
|
|
85
|
+
PS256: "PS256";
|
|
86
|
+
PS384: "PS384";
|
|
87
|
+
PS512: "PS512";
|
|
88
|
+
none: "none";
|
|
89
|
+
}>, z.ZodString]>;
|
|
56
90
|
typ: z.ZodOptional<z.ZodString>;
|
|
57
91
|
cty: z.ZodOptional<z.ZodString>;
|
|
58
|
-
crit: z.ZodOptional<z.ZodArray<z.ZodString
|
|
92
|
+
crit: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
93
|
kid: z.ZodOptional<z.ZodString>;
|
|
60
94
|
jku: z.ZodOptional<z.ZodString>;
|
|
61
|
-
x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
95
|
+
x5u: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
62
96
|
'x5t#S256': z.ZodOptional<z.ZodString>;
|
|
63
97
|
x5t: z.ZodOptional<z.ZodString>;
|
|
64
|
-
x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
65
|
-
},
|
|
66
|
-
alg: string;
|
|
67
|
-
typ?: string | undefined;
|
|
68
|
-
cty?: string | undefined;
|
|
69
|
-
crit?: string[] | undefined;
|
|
70
|
-
kid?: string | undefined;
|
|
71
|
-
jku?: string | undefined;
|
|
72
|
-
x5u?: string | string[] | undefined;
|
|
73
|
-
'x5t#S256'?: string | undefined;
|
|
74
|
-
x5t?: string | undefined;
|
|
75
|
-
x5c?: string | string[] | undefined;
|
|
76
|
-
}, {
|
|
77
|
-
alg: string;
|
|
78
|
-
typ?: string | undefined;
|
|
79
|
-
cty?: string | undefined;
|
|
80
|
-
crit?: string[] | undefined;
|
|
81
|
-
kid?: string | undefined;
|
|
82
|
-
jku?: string | undefined;
|
|
83
|
-
x5u?: string | string[] | undefined;
|
|
84
|
-
'x5t#S256'?: string | undefined;
|
|
85
|
-
x5t?: string | undefined;
|
|
86
|
-
x5c?: string | string[] | undefined;
|
|
87
|
-
}>>;
|
|
98
|
+
x5c: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
88
100
|
encoding: z.ZodOptional<z.ZodString>;
|
|
89
101
|
allowInsecureKeySizes: z.ZodOptional<z.ZodBoolean>;
|
|
90
102
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
-
},
|
|
92
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
93
|
-
keyid?: string | undefined;
|
|
94
|
-
expiresIn?: string | number | undefined;
|
|
95
|
-
notBefore?: string | number | undefined;
|
|
96
|
-
audience?: string | string[] | undefined;
|
|
97
|
-
subject?: string | undefined;
|
|
98
|
-
issuer?: string | undefined;
|
|
99
|
-
jwtid?: string | undefined;
|
|
100
|
-
mutatePayload?: boolean | undefined;
|
|
101
|
-
noTimestamp?: boolean | undefined;
|
|
102
|
-
header?: {
|
|
103
|
-
alg: string;
|
|
104
|
-
typ?: string | undefined;
|
|
105
|
-
cty?: string | undefined;
|
|
106
|
-
crit?: string[] | undefined;
|
|
107
|
-
kid?: string | undefined;
|
|
108
|
-
jku?: string | undefined;
|
|
109
|
-
x5u?: string | string[] | undefined;
|
|
110
|
-
'x5t#S256'?: string | undefined;
|
|
111
|
-
x5t?: string | undefined;
|
|
112
|
-
x5c?: string | string[] | undefined;
|
|
113
|
-
} | undefined;
|
|
114
|
-
encoding?: string | undefined;
|
|
115
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
116
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
117
|
-
}, {
|
|
118
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
119
|
-
keyid?: string | undefined;
|
|
120
|
-
expiresIn?: string | number | undefined;
|
|
121
|
-
notBefore?: string | number | undefined;
|
|
122
|
-
audience?: string | string[] | undefined;
|
|
123
|
-
subject?: string | undefined;
|
|
124
|
-
issuer?: string | undefined;
|
|
125
|
-
jwtid?: string | undefined;
|
|
126
|
-
mutatePayload?: boolean | undefined;
|
|
127
|
-
noTimestamp?: boolean | undefined;
|
|
128
|
-
header?: {
|
|
129
|
-
alg: string;
|
|
130
|
-
typ?: string | undefined;
|
|
131
|
-
cty?: string | undefined;
|
|
132
|
-
crit?: string[] | undefined;
|
|
133
|
-
kid?: string | undefined;
|
|
134
|
-
jku?: string | undefined;
|
|
135
|
-
x5u?: string | string[] | undefined;
|
|
136
|
-
'x5t#S256'?: string | undefined;
|
|
137
|
-
x5t?: string | undefined;
|
|
138
|
-
x5c?: string | string[] | undefined;
|
|
139
|
-
} | undefined;
|
|
140
|
-
encoding?: string | undefined;
|
|
141
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
142
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
143
|
-
}>;
|
|
103
|
+
}, z.core.$strip>;
|
|
144
104
|
export type SignOptions = z.infer<typeof SignOptionsSchema>;
|
|
145
105
|
export declare const VerifyOptionsSchema: z.ZodObject<{
|
|
146
|
-
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
147
|
-
|
|
106
|
+
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
107
|
+
HS256: "HS256";
|
|
108
|
+
HS384: "HS384";
|
|
109
|
+
HS512: "HS512";
|
|
110
|
+
RS256: "RS256";
|
|
111
|
+
RS384: "RS384";
|
|
112
|
+
RS512: "RS512";
|
|
113
|
+
ES256: "ES256";
|
|
114
|
+
ES384: "ES384";
|
|
115
|
+
ES512: "ES512";
|
|
116
|
+
PS256: "PS256";
|
|
117
|
+
PS384: "PS384";
|
|
118
|
+
PS512: "PS512";
|
|
119
|
+
none: "none";
|
|
120
|
+
}>>>;
|
|
121
|
+
audience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>>]>>;
|
|
148
122
|
clockTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
149
123
|
clockTolerance: z.ZodOptional<z.ZodNumber>;
|
|
150
124
|
complete: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
-
issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
125
|
+
issuer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
152
126
|
ignoreExpiration: z.ZodOptional<z.ZodBoolean>;
|
|
153
127
|
ignoreNotBefore: z.ZodOptional<z.ZodBoolean>;
|
|
154
128
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
155
129
|
nonce: z.ZodOptional<z.ZodString>;
|
|
156
130
|
subject: z.ZodOptional<z.ZodString>;
|
|
157
|
-
maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
131
|
+
maxAge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
158
132
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
-
},
|
|
160
|
-
audience?: string | RegExp | string[] | undefined;
|
|
161
|
-
subject?: string | undefined;
|
|
162
|
-
issuer?: string | string[] | undefined;
|
|
163
|
-
jwtid?: string | undefined;
|
|
164
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
165
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
166
|
-
clockTimestamp?: number | undefined;
|
|
167
|
-
clockTolerance?: number | undefined;
|
|
168
|
-
complete?: boolean | undefined;
|
|
169
|
-
ignoreExpiration?: boolean | undefined;
|
|
170
|
-
ignoreNotBefore?: boolean | undefined;
|
|
171
|
-
nonce?: string | undefined;
|
|
172
|
-
maxAge?: string | number | undefined;
|
|
173
|
-
}, {
|
|
174
|
-
audience?: string | RegExp | string[] | undefined;
|
|
175
|
-
subject?: string | undefined;
|
|
176
|
-
issuer?: string | string[] | undefined;
|
|
177
|
-
jwtid?: string | undefined;
|
|
178
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
179
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
180
|
-
clockTimestamp?: number | undefined;
|
|
181
|
-
clockTolerance?: number | undefined;
|
|
182
|
-
complete?: boolean | undefined;
|
|
183
|
-
ignoreExpiration?: boolean | undefined;
|
|
184
|
-
ignoreNotBefore?: boolean | undefined;
|
|
185
|
-
nonce?: string | undefined;
|
|
186
|
-
maxAge?: string | number | undefined;
|
|
187
|
-
}>;
|
|
133
|
+
}, z.core.$strip>;
|
|
188
134
|
export type VerifyOptions = z.infer<typeof VerifyOptionsSchema>;
|
|
189
|
-
export declare const SecretSchema: z.ZodUnion<[z.ZodString, z.
|
|
190
|
-
type: z.ZodString;
|
|
191
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
135
|
+
export declare const SecretSchema: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, z.ZodObject<{
|
|
192
136
|
type: z.ZodString;
|
|
193
|
-
}, z.
|
|
194
|
-
|
|
195
|
-
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
196
|
-
key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
|
|
137
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
138
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
|
|
197
139
|
passphrase: z.ZodString;
|
|
198
|
-
},
|
|
199
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
200
|
-
passphrase: string;
|
|
201
|
-
}, {
|
|
202
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
203
|
-
passphrase: string;
|
|
204
|
-
}>]>;
|
|
140
|
+
}, z.core.$strip>]>;
|
|
205
141
|
export type Secret = z.infer<typeof SecretSchema>;
|
|
206
142
|
export declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
207
143
|
signOptions: z.ZodOptional<z.ZodObject<{
|
|
208
|
-
algorithm: z.ZodOptional<z.ZodEnum<
|
|
144
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
HS256: "HS256";
|
|
146
|
+
HS384: "HS384";
|
|
147
|
+
HS512: "HS512";
|
|
148
|
+
RS256: "RS256";
|
|
149
|
+
RS384: "RS384";
|
|
150
|
+
RS512: "RS512";
|
|
151
|
+
ES256: "ES256";
|
|
152
|
+
ES384: "ES384";
|
|
153
|
+
ES512: "ES512";
|
|
154
|
+
PS256: "PS256";
|
|
155
|
+
PS384: "PS384";
|
|
156
|
+
PS512: "PS512";
|
|
157
|
+
none: "none";
|
|
158
|
+
}>>;
|
|
209
159
|
keyid: z.ZodOptional<z.ZodString>;
|
|
210
|
-
expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
211
|
-
notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
212
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString,
|
|
160
|
+
expiresIn: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
161
|
+
notBefore: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
162
|
+
audience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>>]>>;
|
|
213
163
|
subject: z.ZodOptional<z.ZodString>;
|
|
214
164
|
issuer: z.ZodOptional<z.ZodString>;
|
|
215
165
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
216
166
|
mutatePayload: z.ZodOptional<z.ZodBoolean>;
|
|
217
167
|
noTimestamp: z.ZodOptional<z.ZodBoolean>;
|
|
218
168
|
header: z.ZodOptional<z.ZodObject<{
|
|
219
|
-
alg: z.ZodUnion<[z.ZodEnum<
|
|
169
|
+
alg: z.ZodUnion<[z.ZodEnum<{
|
|
170
|
+
HS256: "HS256";
|
|
171
|
+
HS384: "HS384";
|
|
172
|
+
HS512: "HS512";
|
|
173
|
+
RS256: "RS256";
|
|
174
|
+
RS384: "RS384";
|
|
175
|
+
RS512: "RS512";
|
|
176
|
+
ES256: "ES256";
|
|
177
|
+
ES384: "ES384";
|
|
178
|
+
ES512: "ES512";
|
|
179
|
+
PS256: "PS256";
|
|
180
|
+
PS384: "PS384";
|
|
181
|
+
PS512: "PS512";
|
|
182
|
+
none: "none";
|
|
183
|
+
}>, z.ZodString]>;
|
|
220
184
|
typ: z.ZodOptional<z.ZodString>;
|
|
221
185
|
cty: z.ZodOptional<z.ZodString>;
|
|
222
|
-
crit: z.ZodOptional<z.ZodArray<z.ZodString
|
|
186
|
+
crit: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
223
187
|
kid: z.ZodOptional<z.ZodString>;
|
|
224
188
|
jku: z.ZodOptional<z.ZodString>;
|
|
225
|
-
x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
189
|
+
x5u: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
226
190
|
'x5t#S256': z.ZodOptional<z.ZodString>;
|
|
227
191
|
x5t: z.ZodOptional<z.ZodString>;
|
|
228
|
-
x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
229
|
-
},
|
|
230
|
-
alg: string;
|
|
231
|
-
typ?: string | undefined;
|
|
232
|
-
cty?: string | undefined;
|
|
233
|
-
crit?: string[] | undefined;
|
|
234
|
-
kid?: string | undefined;
|
|
235
|
-
jku?: string | undefined;
|
|
236
|
-
x5u?: string | string[] | undefined;
|
|
237
|
-
'x5t#S256'?: string | undefined;
|
|
238
|
-
x5t?: string | undefined;
|
|
239
|
-
x5c?: string | string[] | undefined;
|
|
240
|
-
}, {
|
|
241
|
-
alg: string;
|
|
242
|
-
typ?: string | undefined;
|
|
243
|
-
cty?: string | undefined;
|
|
244
|
-
crit?: string[] | undefined;
|
|
245
|
-
kid?: string | undefined;
|
|
246
|
-
jku?: string | undefined;
|
|
247
|
-
x5u?: string | string[] | undefined;
|
|
248
|
-
'x5t#S256'?: string | undefined;
|
|
249
|
-
x5t?: string | undefined;
|
|
250
|
-
x5c?: string | string[] | undefined;
|
|
251
|
-
}>>;
|
|
192
|
+
x5c: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
252
194
|
encoding: z.ZodOptional<z.ZodString>;
|
|
253
195
|
allowInsecureKeySizes: z.ZodOptional<z.ZodBoolean>;
|
|
254
196
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
255
|
-
},
|
|
256
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
257
|
-
keyid?: string | undefined;
|
|
258
|
-
expiresIn?: string | number | undefined;
|
|
259
|
-
notBefore?: string | number | undefined;
|
|
260
|
-
audience?: string | string[] | undefined;
|
|
261
|
-
subject?: string | undefined;
|
|
262
|
-
issuer?: string | undefined;
|
|
263
|
-
jwtid?: string | undefined;
|
|
264
|
-
mutatePayload?: boolean | undefined;
|
|
265
|
-
noTimestamp?: boolean | undefined;
|
|
266
|
-
header?: {
|
|
267
|
-
alg: string;
|
|
268
|
-
typ?: string | undefined;
|
|
269
|
-
cty?: string | undefined;
|
|
270
|
-
crit?: string[] | undefined;
|
|
271
|
-
kid?: string | undefined;
|
|
272
|
-
jku?: string | undefined;
|
|
273
|
-
x5u?: string | string[] | undefined;
|
|
274
|
-
'x5t#S256'?: string | undefined;
|
|
275
|
-
x5t?: string | undefined;
|
|
276
|
-
x5c?: string | string[] | undefined;
|
|
277
|
-
} | undefined;
|
|
278
|
-
encoding?: string | undefined;
|
|
279
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
280
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
281
|
-
}, {
|
|
282
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
283
|
-
keyid?: string | undefined;
|
|
284
|
-
expiresIn?: string | number | undefined;
|
|
285
|
-
notBefore?: string | number | undefined;
|
|
286
|
-
audience?: string | string[] | undefined;
|
|
287
|
-
subject?: string | undefined;
|
|
288
|
-
issuer?: string | undefined;
|
|
289
|
-
jwtid?: string | undefined;
|
|
290
|
-
mutatePayload?: boolean | undefined;
|
|
291
|
-
noTimestamp?: boolean | undefined;
|
|
292
|
-
header?: {
|
|
293
|
-
alg: string;
|
|
294
|
-
typ?: string | undefined;
|
|
295
|
-
cty?: string | undefined;
|
|
296
|
-
crit?: string[] | undefined;
|
|
297
|
-
kid?: string | undefined;
|
|
298
|
-
jku?: string | undefined;
|
|
299
|
-
x5u?: string | string[] | undefined;
|
|
300
|
-
'x5t#S256'?: string | undefined;
|
|
301
|
-
x5t?: string | undefined;
|
|
302
|
-
x5c?: string | string[] | undefined;
|
|
303
|
-
} | undefined;
|
|
304
|
-
encoding?: string | undefined;
|
|
305
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
306
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
307
|
-
}>>;
|
|
197
|
+
}, z.core.$strip>>;
|
|
308
198
|
secret: z.ZodOptional<z.ZodString>;
|
|
309
|
-
publicKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.
|
|
310
|
-
privateKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.
|
|
199
|
+
publicKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>>;
|
|
200
|
+
privateKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, z.ZodObject<{
|
|
311
201
|
type: z.ZodString;
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
315
|
-
type: z.ZodString;
|
|
316
|
-
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
317
|
-
key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
|
|
202
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
203
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
|
|
318
204
|
passphrase: z.ZodString;
|
|
319
|
-
},
|
|
320
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
321
|
-
passphrase: string;
|
|
322
|
-
}, {
|
|
323
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
324
|
-
passphrase: string;
|
|
325
|
-
}>]>>;
|
|
205
|
+
}, z.core.$strip>]>>;
|
|
326
206
|
verifyOptions: z.ZodOptional<z.ZodObject<{
|
|
327
|
-
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
328
|
-
|
|
207
|
+
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
208
|
+
HS256: "HS256";
|
|
209
|
+
HS384: "HS384";
|
|
210
|
+
HS512: "HS512";
|
|
211
|
+
RS256: "RS256";
|
|
212
|
+
RS384: "RS384";
|
|
213
|
+
RS512: "RS512";
|
|
214
|
+
ES256: "ES256";
|
|
215
|
+
ES384: "ES384";
|
|
216
|
+
ES512: "ES512";
|
|
217
|
+
PS256: "PS256";
|
|
218
|
+
PS384: "PS384";
|
|
219
|
+
PS512: "PS512";
|
|
220
|
+
none: "none";
|
|
221
|
+
}>>>;
|
|
222
|
+
audience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>>]>>;
|
|
329
223
|
clockTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
330
224
|
clockTolerance: z.ZodOptional<z.ZodNumber>;
|
|
331
225
|
complete: z.ZodOptional<z.ZodBoolean>;
|
|
332
|
-
issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
226
|
+
issuer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
333
227
|
ignoreExpiration: z.ZodOptional<z.ZodBoolean>;
|
|
334
228
|
ignoreNotBefore: z.ZodOptional<z.ZodBoolean>;
|
|
335
229
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
336
230
|
nonce: z.ZodOptional<z.ZodString>;
|
|
337
231
|
subject: z.ZodOptional<z.ZodString>;
|
|
338
|
-
maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
232
|
+
maxAge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
339
233
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
issuer?: string | string[] | undefined;
|
|
358
|
-
jwtid?: string | undefined;
|
|
359
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
360
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
361
|
-
clockTimestamp?: number | undefined;
|
|
362
|
-
clockTolerance?: number | undefined;
|
|
363
|
-
complete?: boolean | undefined;
|
|
364
|
-
ignoreExpiration?: boolean | undefined;
|
|
365
|
-
ignoreNotBefore?: boolean | undefined;
|
|
366
|
-
nonce?: string | undefined;
|
|
367
|
-
maxAge?: string | number | undefined;
|
|
368
|
-
}>>;
|
|
369
|
-
secretOrKeyProvider: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodNativeEnum<typeof RequestType>, z.ZodAny, z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
370
|
-
algorithm: z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
secretOrKeyProvider: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodEnum<typeof RequestType>, z.ZodAny, z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
236
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
237
|
+
HS256: "HS256";
|
|
238
|
+
HS384: "HS384";
|
|
239
|
+
HS512: "HS512";
|
|
240
|
+
RS256: "RS256";
|
|
241
|
+
RS384: "RS384";
|
|
242
|
+
RS512: "RS512";
|
|
243
|
+
ES256: "ES256";
|
|
244
|
+
ES384: "ES384";
|
|
245
|
+
ES512: "ES512";
|
|
246
|
+
PS256: "PS256";
|
|
247
|
+
PS384: "PS384";
|
|
248
|
+
PS512: "PS512";
|
|
249
|
+
none: "none";
|
|
250
|
+
}>>;
|
|
371
251
|
keyid: z.ZodOptional<z.ZodString>;
|
|
372
|
-
expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
373
|
-
notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
374
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString,
|
|
252
|
+
expiresIn: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
253
|
+
notBefore: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
254
|
+
audience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>>]>>;
|
|
375
255
|
subject: z.ZodOptional<z.ZodString>;
|
|
376
256
|
issuer: z.ZodOptional<z.ZodString>;
|
|
377
257
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
378
258
|
mutatePayload: z.ZodOptional<z.ZodBoolean>;
|
|
379
259
|
noTimestamp: z.ZodOptional<z.ZodBoolean>;
|
|
380
260
|
header: z.ZodOptional<z.ZodObject<{
|
|
381
|
-
alg: z.ZodUnion<[z.ZodEnum<
|
|
261
|
+
alg: z.ZodUnion<[z.ZodEnum<{
|
|
262
|
+
HS256: "HS256";
|
|
263
|
+
HS384: "HS384";
|
|
264
|
+
HS512: "HS512";
|
|
265
|
+
RS256: "RS256";
|
|
266
|
+
RS384: "RS384";
|
|
267
|
+
RS512: "RS512";
|
|
268
|
+
ES256: "ES256";
|
|
269
|
+
ES384: "ES384";
|
|
270
|
+
ES512: "ES512";
|
|
271
|
+
PS256: "PS256";
|
|
272
|
+
PS384: "PS384";
|
|
273
|
+
PS512: "PS512";
|
|
274
|
+
none: "none";
|
|
275
|
+
}>, z.ZodString]>;
|
|
382
276
|
typ: z.ZodOptional<z.ZodString>;
|
|
383
277
|
cty: z.ZodOptional<z.ZodString>;
|
|
384
|
-
crit: z.ZodOptional<z.ZodArray<z.ZodString
|
|
278
|
+
crit: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
385
279
|
kid: z.ZodOptional<z.ZodString>;
|
|
386
280
|
jku: z.ZodOptional<z.ZodString>;
|
|
387
|
-
x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
281
|
+
x5u: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
388
282
|
'x5t#S256': z.ZodOptional<z.ZodString>;
|
|
389
283
|
x5t: z.ZodOptional<z.ZodString>;
|
|
390
|
-
x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
391
|
-
},
|
|
392
|
-
alg: string;
|
|
393
|
-
typ?: string | undefined;
|
|
394
|
-
cty?: string | undefined;
|
|
395
|
-
crit?: string[] | undefined;
|
|
396
|
-
kid?: string | undefined;
|
|
397
|
-
jku?: string | undefined;
|
|
398
|
-
x5u?: string | string[] | undefined;
|
|
399
|
-
'x5t#S256'?: string | undefined;
|
|
400
|
-
x5t?: string | undefined;
|
|
401
|
-
x5c?: string | string[] | undefined;
|
|
402
|
-
}, {
|
|
403
|
-
alg: string;
|
|
404
|
-
typ?: string | undefined;
|
|
405
|
-
cty?: string | undefined;
|
|
406
|
-
crit?: string[] | undefined;
|
|
407
|
-
kid?: string | undefined;
|
|
408
|
-
jku?: string | undefined;
|
|
409
|
-
x5u?: string | string[] | undefined;
|
|
410
|
-
'x5t#S256'?: string | undefined;
|
|
411
|
-
x5t?: string | undefined;
|
|
412
|
-
x5c?: string | string[] | undefined;
|
|
413
|
-
}>>;
|
|
284
|
+
x5c: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
285
|
+
}, z.core.$strip>>;
|
|
414
286
|
encoding: z.ZodOptional<z.ZodString>;
|
|
415
287
|
allowInsecureKeySizes: z.ZodOptional<z.ZodBoolean>;
|
|
416
288
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
417
|
-
},
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
jku?: string | undefined;
|
|
435
|
-
x5u?: string | string[] | undefined;
|
|
436
|
-
'x5t#S256'?: string | undefined;
|
|
437
|
-
x5t?: string | undefined;
|
|
438
|
-
x5c?: string | string[] | undefined;
|
|
439
|
-
} | undefined;
|
|
440
|
-
encoding?: string | undefined;
|
|
441
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
442
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
443
|
-
}, {
|
|
444
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
445
|
-
keyid?: string | undefined;
|
|
446
|
-
expiresIn?: string | number | undefined;
|
|
447
|
-
notBefore?: string | number | undefined;
|
|
448
|
-
audience?: string | string[] | undefined;
|
|
449
|
-
subject?: string | undefined;
|
|
450
|
-
issuer?: string | undefined;
|
|
451
|
-
jwtid?: string | undefined;
|
|
452
|
-
mutatePayload?: boolean | undefined;
|
|
453
|
-
noTimestamp?: boolean | undefined;
|
|
454
|
-
header?: {
|
|
455
|
-
alg: string;
|
|
456
|
-
typ?: string | undefined;
|
|
457
|
-
cty?: string | undefined;
|
|
458
|
-
crit?: string[] | undefined;
|
|
459
|
-
kid?: string | undefined;
|
|
460
|
-
jku?: string | undefined;
|
|
461
|
-
x5u?: string | string[] | undefined;
|
|
462
|
-
'x5t#S256'?: string | undefined;
|
|
463
|
-
x5t?: string | undefined;
|
|
464
|
-
x5c?: string | string[] | undefined;
|
|
465
|
-
} | undefined;
|
|
466
|
-
encoding?: string | undefined;
|
|
467
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
468
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
469
|
-
}>, z.ZodObject<{
|
|
470
|
-
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
|
|
471
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
|
|
289
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
290
|
+
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
291
|
+
HS256: "HS256";
|
|
292
|
+
HS384: "HS384";
|
|
293
|
+
HS512: "HS512";
|
|
294
|
+
RS256: "RS256";
|
|
295
|
+
RS384: "RS384";
|
|
296
|
+
RS512: "RS512";
|
|
297
|
+
ES256: "ES256";
|
|
298
|
+
ES384: "ES384";
|
|
299
|
+
ES512: "ES512";
|
|
300
|
+
PS256: "PS256";
|
|
301
|
+
PS384: "PS384";
|
|
302
|
+
PS512: "PS512";
|
|
303
|
+
none: "none";
|
|
304
|
+
}>>>;
|
|
305
|
+
audience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>>]>>;
|
|
472
306
|
clockTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
473
307
|
clockTolerance: z.ZodOptional<z.ZodNumber>;
|
|
474
308
|
complete: z.ZodOptional<z.ZodBoolean>;
|
|
475
|
-
issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
309
|
+
issuer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
476
310
|
ignoreExpiration: z.ZodOptional<z.ZodBoolean>;
|
|
477
311
|
ignoreNotBefore: z.ZodOptional<z.ZodBoolean>;
|
|
478
312
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
479
313
|
nonce: z.ZodOptional<z.ZodString>;
|
|
480
314
|
subject: z.ZodOptional<z.ZodString>;
|
|
481
|
-
maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
315
|
+
maxAge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
482
316
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
483
|
-
},
|
|
484
|
-
audience?: string | RegExp | string[] | undefined;
|
|
485
|
-
subject?: string | undefined;
|
|
486
|
-
issuer?: string | string[] | undefined;
|
|
487
|
-
jwtid?: string | undefined;
|
|
488
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
489
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
490
|
-
clockTimestamp?: number | undefined;
|
|
491
|
-
clockTolerance?: number | undefined;
|
|
492
|
-
complete?: boolean | undefined;
|
|
493
|
-
ignoreExpiration?: boolean | undefined;
|
|
494
|
-
ignoreNotBefore?: boolean | undefined;
|
|
495
|
-
nonce?: string | undefined;
|
|
496
|
-
maxAge?: string | number | undefined;
|
|
497
|
-
}, {
|
|
498
|
-
audience?: string | RegExp | string[] | undefined;
|
|
499
|
-
subject?: string | undefined;
|
|
500
|
-
issuer?: string | string[] | undefined;
|
|
501
|
-
jwtid?: string | undefined;
|
|
502
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
503
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
504
|
-
clockTimestamp?: number | undefined;
|
|
505
|
-
clockTolerance?: number | undefined;
|
|
506
|
-
complete?: boolean | undefined;
|
|
507
|
-
ignoreExpiration?: boolean | undefined;
|
|
508
|
-
ignoreNotBefore?: boolean | undefined;
|
|
509
|
-
nonce?: string | undefined;
|
|
510
|
-
maxAge?: string | number | undefined;
|
|
511
|
-
}>]>>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodObject<{
|
|
512
|
-
type: z.ZodString;
|
|
513
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
514
|
-
type: z.ZodString;
|
|
515
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
317
|
+
}, z.core.$strip>]>>], null>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, z.ZodObject<{
|
|
516
318
|
type: z.ZodString;
|
|
517
|
-
}, z.
|
|
518
|
-
key: z.ZodUnion<[z.ZodString, z.
|
|
319
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
320
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
|
|
519
321
|
passphrase: z.ZodString;
|
|
520
|
-
},
|
|
521
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
522
|
-
passphrase: string;
|
|
523
|
-
}, {
|
|
524
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
525
|
-
passphrase: string;
|
|
526
|
-
}>]>, z.ZodPromise<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodObject<{
|
|
322
|
+
}, z.core.$strip>]>, z.ZodPromise<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, z.ZodObject<{
|
|
527
323
|
type: z.ZodString;
|
|
528
|
-
},
|
|
529
|
-
|
|
530
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
531
|
-
type: z.ZodString;
|
|
532
|
-
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
533
|
-
key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
|
|
324
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
325
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
|
|
534
326
|
passphrase: z.ZodString;
|
|
535
|
-
},
|
|
536
|
-
|
|
537
|
-
passphrase: string;
|
|
538
|
-
}, {
|
|
539
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
540
|
-
passphrase: string;
|
|
541
|
-
}>]>>]>>>;
|
|
542
|
-
}, "strip", z.ZodTypeAny, {
|
|
543
|
-
signOptions?: {
|
|
544
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
545
|
-
keyid?: string | undefined;
|
|
546
|
-
expiresIn?: string | number | undefined;
|
|
547
|
-
notBefore?: string | number | undefined;
|
|
548
|
-
audience?: string | string[] | undefined;
|
|
549
|
-
subject?: string | undefined;
|
|
550
|
-
issuer?: string | undefined;
|
|
551
|
-
jwtid?: string | undefined;
|
|
552
|
-
mutatePayload?: boolean | undefined;
|
|
553
|
-
noTimestamp?: boolean | undefined;
|
|
554
|
-
header?: {
|
|
555
|
-
alg: string;
|
|
556
|
-
typ?: string | undefined;
|
|
557
|
-
cty?: string | undefined;
|
|
558
|
-
crit?: string[] | undefined;
|
|
559
|
-
kid?: string | undefined;
|
|
560
|
-
jku?: string | undefined;
|
|
561
|
-
x5u?: string | string[] | undefined;
|
|
562
|
-
'x5t#S256'?: string | undefined;
|
|
563
|
-
x5t?: string | undefined;
|
|
564
|
-
x5c?: string | string[] | undefined;
|
|
565
|
-
} | undefined;
|
|
566
|
-
encoding?: string | undefined;
|
|
567
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
568
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
569
|
-
} | undefined;
|
|
570
|
-
secret?: string | undefined;
|
|
571
|
-
publicKey?: string | Buffer<ArrayBufferLike> | undefined;
|
|
572
|
-
privateKey?: string | Buffer<ArrayBufferLike> | z.objectOutputType<{
|
|
573
|
-
type: z.ZodString;
|
|
574
|
-
}, z.ZodTypeAny, "passthrough"> | {
|
|
575
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
576
|
-
passphrase: string;
|
|
577
|
-
} | undefined;
|
|
578
|
-
verifyOptions?: {
|
|
579
|
-
audience?: string | RegExp | string[] | undefined;
|
|
580
|
-
subject?: string | undefined;
|
|
581
|
-
issuer?: string | string[] | undefined;
|
|
582
|
-
jwtid?: string | undefined;
|
|
583
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
584
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
585
|
-
clockTimestamp?: number | undefined;
|
|
586
|
-
clockTolerance?: number | undefined;
|
|
587
|
-
complete?: boolean | undefined;
|
|
588
|
-
ignoreExpiration?: boolean | undefined;
|
|
589
|
-
ignoreNotBefore?: boolean | undefined;
|
|
590
|
-
nonce?: string | undefined;
|
|
591
|
-
maxAge?: string | number | undefined;
|
|
592
|
-
} | undefined;
|
|
593
|
-
secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
|
|
594
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
595
|
-
keyid?: string | undefined;
|
|
596
|
-
expiresIn?: string | number | undefined;
|
|
597
|
-
notBefore?: string | number | undefined;
|
|
598
|
-
audience?: string | string[] | undefined;
|
|
599
|
-
subject?: string | undefined;
|
|
600
|
-
issuer?: string | undefined;
|
|
601
|
-
jwtid?: string | undefined;
|
|
602
|
-
mutatePayload?: boolean | undefined;
|
|
603
|
-
noTimestamp?: boolean | undefined;
|
|
604
|
-
header?: {
|
|
605
|
-
alg: string;
|
|
606
|
-
typ?: string | undefined;
|
|
607
|
-
cty?: string | undefined;
|
|
608
|
-
crit?: string[] | undefined;
|
|
609
|
-
kid?: string | undefined;
|
|
610
|
-
jku?: string | undefined;
|
|
611
|
-
x5u?: string | string[] | undefined;
|
|
612
|
-
'x5t#S256'?: string | undefined;
|
|
613
|
-
x5t?: string | undefined;
|
|
614
|
-
x5c?: string | string[] | undefined;
|
|
615
|
-
} | undefined;
|
|
616
|
-
encoding?: string | undefined;
|
|
617
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
618
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
619
|
-
} | {
|
|
620
|
-
audience?: string | RegExp | string[] | undefined;
|
|
621
|
-
subject?: string | undefined;
|
|
622
|
-
issuer?: string | string[] | undefined;
|
|
623
|
-
jwtid?: string | undefined;
|
|
624
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
625
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
626
|
-
clockTimestamp?: number | undefined;
|
|
627
|
-
clockTolerance?: number | undefined;
|
|
628
|
-
complete?: boolean | undefined;
|
|
629
|
-
ignoreExpiration?: boolean | undefined;
|
|
630
|
-
ignoreNotBefore?: boolean | undefined;
|
|
631
|
-
nonce?: string | undefined;
|
|
632
|
-
maxAge?: string | number | undefined;
|
|
633
|
-
} | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | z.objectOutputType<{
|
|
634
|
-
type: z.ZodString;
|
|
635
|
-
}, z.ZodTypeAny, "passthrough"> | {
|
|
636
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
637
|
-
passphrase: string;
|
|
638
|
-
} | Promise<string | Buffer<ArrayBufferLike> | z.objectOutputType<{
|
|
639
|
-
type: z.ZodString;
|
|
640
|
-
}, z.ZodTypeAny, "passthrough"> | {
|
|
641
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
642
|
-
passphrase: string;
|
|
643
|
-
}>) | undefined;
|
|
644
|
-
}, {
|
|
645
|
-
signOptions?: {
|
|
646
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
647
|
-
keyid?: string | undefined;
|
|
648
|
-
expiresIn?: string | number | undefined;
|
|
649
|
-
notBefore?: string | number | undefined;
|
|
650
|
-
audience?: string | string[] | undefined;
|
|
651
|
-
subject?: string | undefined;
|
|
652
|
-
issuer?: string | undefined;
|
|
653
|
-
jwtid?: string | undefined;
|
|
654
|
-
mutatePayload?: boolean | undefined;
|
|
655
|
-
noTimestamp?: boolean | undefined;
|
|
656
|
-
header?: {
|
|
657
|
-
alg: string;
|
|
658
|
-
typ?: string | undefined;
|
|
659
|
-
cty?: string | undefined;
|
|
660
|
-
crit?: string[] | undefined;
|
|
661
|
-
kid?: string | undefined;
|
|
662
|
-
jku?: string | undefined;
|
|
663
|
-
x5u?: string | string[] | undefined;
|
|
664
|
-
'x5t#S256'?: string | undefined;
|
|
665
|
-
x5t?: string | undefined;
|
|
666
|
-
x5c?: string | string[] | undefined;
|
|
667
|
-
} | undefined;
|
|
668
|
-
encoding?: string | undefined;
|
|
669
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
670
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
671
|
-
} | undefined;
|
|
672
|
-
secret?: string | undefined;
|
|
673
|
-
publicKey?: string | Buffer<ArrayBufferLike> | undefined;
|
|
674
|
-
privateKey?: string | Buffer<ArrayBufferLike> | z.objectInputType<{
|
|
675
|
-
type: z.ZodString;
|
|
676
|
-
}, z.ZodTypeAny, "passthrough"> | {
|
|
677
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
678
|
-
passphrase: string;
|
|
679
|
-
} | undefined;
|
|
680
|
-
verifyOptions?: {
|
|
681
|
-
audience?: string | RegExp | string[] | undefined;
|
|
682
|
-
subject?: string | undefined;
|
|
683
|
-
issuer?: string | string[] | undefined;
|
|
684
|
-
jwtid?: string | undefined;
|
|
685
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
686
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
687
|
-
clockTimestamp?: number | undefined;
|
|
688
|
-
clockTolerance?: number | undefined;
|
|
689
|
-
complete?: boolean | undefined;
|
|
690
|
-
ignoreExpiration?: boolean | undefined;
|
|
691
|
-
ignoreNotBefore?: boolean | undefined;
|
|
692
|
-
nonce?: string | undefined;
|
|
693
|
-
maxAge?: string | number | undefined;
|
|
694
|
-
} | undefined;
|
|
695
|
-
secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
|
|
696
|
-
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
697
|
-
keyid?: string | undefined;
|
|
698
|
-
expiresIn?: string | number | undefined;
|
|
699
|
-
notBefore?: string | number | undefined;
|
|
700
|
-
audience?: string | string[] | undefined;
|
|
701
|
-
subject?: string | undefined;
|
|
702
|
-
issuer?: string | undefined;
|
|
703
|
-
jwtid?: string | undefined;
|
|
704
|
-
mutatePayload?: boolean | undefined;
|
|
705
|
-
noTimestamp?: boolean | undefined;
|
|
706
|
-
header?: {
|
|
707
|
-
alg: string;
|
|
708
|
-
typ?: string | undefined;
|
|
709
|
-
cty?: string | undefined;
|
|
710
|
-
crit?: string[] | undefined;
|
|
711
|
-
kid?: string | undefined;
|
|
712
|
-
jku?: string | undefined;
|
|
713
|
-
x5u?: string | string[] | undefined;
|
|
714
|
-
'x5t#S256'?: string | undefined;
|
|
715
|
-
x5t?: string | undefined;
|
|
716
|
-
x5c?: string | string[] | undefined;
|
|
717
|
-
} | undefined;
|
|
718
|
-
encoding?: string | undefined;
|
|
719
|
-
allowInsecureKeySizes?: boolean | undefined;
|
|
720
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
721
|
-
} | {
|
|
722
|
-
audience?: string | RegExp | string[] | undefined;
|
|
723
|
-
subject?: string | undefined;
|
|
724
|
-
issuer?: string | string[] | undefined;
|
|
725
|
-
jwtid?: string | undefined;
|
|
726
|
-
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
727
|
-
algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
|
|
728
|
-
clockTimestamp?: number | undefined;
|
|
729
|
-
clockTolerance?: number | undefined;
|
|
730
|
-
complete?: boolean | undefined;
|
|
731
|
-
ignoreExpiration?: boolean | undefined;
|
|
732
|
-
ignoreNotBefore?: boolean | undefined;
|
|
733
|
-
nonce?: string | undefined;
|
|
734
|
-
maxAge?: string | number | undefined;
|
|
735
|
-
} | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | z.objectInputType<{
|
|
736
|
-
type: z.ZodString;
|
|
737
|
-
}, z.ZodTypeAny, "passthrough"> | {
|
|
738
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
739
|
-
passphrase: string;
|
|
740
|
-
} | Promise<string | Buffer<ArrayBufferLike> | z.objectInputType<{
|
|
741
|
-
type: z.ZodString;
|
|
742
|
-
}, z.ZodTypeAny, "passthrough"> | {
|
|
743
|
-
key: string | Buffer<ArrayBufferLike>;
|
|
744
|
-
passphrase: string;
|
|
745
|
-
}>) | undefined;
|
|
746
|
-
}>;
|
|
327
|
+
}, z.core.$strip>]>>]>>>;
|
|
328
|
+
}, z.core.$strip>;
|
|
747
329
|
export type JwtServiceOptions = z.infer<typeof JwtServiceOptionsSchema>;
|
|
748
330
|
export interface JwtSignOptions extends SignOptions {
|
|
749
331
|
secret?: string | Buffer;
|