@navios/jwt 0.1.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.
@@ -0,0 +1,1326 @@
1
+ import * as jwt from 'jsonwebtoken';
2
+ import { Secret as Secret$1 } from 'jsonwebtoken';
3
+ export { JsonWebTokenError, NotBeforeError, TokenExpiredError } from 'jsonwebtoken';
4
+ import * as zod from 'zod';
5
+ import { z } from 'zod';
6
+ import * as _navios_core from '@navios/core';
7
+ import { InjectionToken, ServiceLocatorAbstractFactoryContext } from '@navios/core';
8
+
9
+ declare enum RequestType {
10
+ Sign = "Sign",
11
+ Verify = "Verify"
12
+ }
13
+ declare const AlgorithmType: z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>;
14
+ declare const JwtHeaderSchema: z.ZodObject<{
15
+ alg: z.ZodUnion<[z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, z.ZodString]>;
16
+ typ: z.ZodOptional<z.ZodString>;
17
+ cty: z.ZodOptional<z.ZodString>;
18
+ crit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
+ kid: z.ZodOptional<z.ZodString>;
20
+ jku: z.ZodOptional<z.ZodString>;
21
+ x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
22
+ 'x5t#S256': z.ZodOptional<z.ZodString>;
23
+ x5t: z.ZodOptional<z.ZodString>;
24
+ x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ alg: string;
27
+ typ?: string | undefined;
28
+ cty?: string | undefined;
29
+ crit?: string[] | undefined;
30
+ kid?: string | undefined;
31
+ jku?: string | undefined;
32
+ x5u?: string | string[] | undefined;
33
+ 'x5t#S256'?: string | undefined;
34
+ x5t?: string | undefined;
35
+ x5c?: string | string[] | undefined;
36
+ }, {
37
+ alg: string;
38
+ typ?: string | undefined;
39
+ cty?: string | undefined;
40
+ crit?: string[] | undefined;
41
+ kid?: string | undefined;
42
+ jku?: string | undefined;
43
+ x5u?: string | string[] | undefined;
44
+ 'x5t#S256'?: string | undefined;
45
+ x5t?: string | undefined;
46
+ x5c?: string | string[] | undefined;
47
+ }>;
48
+ type JwtHeader = z.infer<typeof JwtHeaderSchema>;
49
+ declare const SignOptionsSchema: z.ZodObject<{
50
+ algorithm: z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
51
+ keyid: z.ZodOptional<z.ZodString>;
52
+ expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
53
+ notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
54
+ audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
55
+ subject: z.ZodOptional<z.ZodString>;
56
+ issuer: z.ZodOptional<z.ZodString>;
57
+ jwtid: z.ZodOptional<z.ZodString>;
58
+ mutatePayload: z.ZodOptional<z.ZodBoolean>;
59
+ noTimestamp: z.ZodOptional<z.ZodBoolean>;
60
+ header: z.ZodOptional<z.ZodObject<{
61
+ alg: z.ZodUnion<[z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, z.ZodString]>;
62
+ typ: z.ZodOptional<z.ZodString>;
63
+ cty: z.ZodOptional<z.ZodString>;
64
+ crit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
65
+ kid: z.ZodOptional<z.ZodString>;
66
+ jku: z.ZodOptional<z.ZodString>;
67
+ x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
68
+ 'x5t#S256': z.ZodOptional<z.ZodString>;
69
+ x5t: z.ZodOptional<z.ZodString>;
70
+ x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ alg: string;
73
+ typ?: string | undefined;
74
+ cty?: string | undefined;
75
+ crit?: string[] | undefined;
76
+ kid?: string | undefined;
77
+ jku?: string | undefined;
78
+ x5u?: string | string[] | undefined;
79
+ 'x5t#S256'?: string | undefined;
80
+ x5t?: string | undefined;
81
+ x5c?: string | string[] | undefined;
82
+ }, {
83
+ alg: string;
84
+ typ?: string | undefined;
85
+ cty?: string | undefined;
86
+ crit?: string[] | undefined;
87
+ kid?: string | undefined;
88
+ jku?: string | undefined;
89
+ x5u?: string | string[] | undefined;
90
+ 'x5t#S256'?: string | undefined;
91
+ x5t?: string | undefined;
92
+ x5c?: string | string[] | undefined;
93
+ }>>;
94
+ encoding: z.ZodOptional<z.ZodString>;
95
+ allowInsecureKeySizes: z.ZodOptional<z.ZodBoolean>;
96
+ allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
99
+ keyid?: string | undefined;
100
+ expiresIn?: string | number | undefined;
101
+ notBefore?: string | number | undefined;
102
+ audience?: string | string[] | undefined;
103
+ subject?: string | undefined;
104
+ issuer?: string | undefined;
105
+ jwtid?: string | undefined;
106
+ mutatePayload?: boolean | undefined;
107
+ noTimestamp?: boolean | undefined;
108
+ header?: {
109
+ alg: string;
110
+ typ?: string | undefined;
111
+ cty?: string | undefined;
112
+ crit?: string[] | undefined;
113
+ kid?: string | undefined;
114
+ jku?: string | undefined;
115
+ x5u?: string | string[] | undefined;
116
+ 'x5t#S256'?: string | undefined;
117
+ x5t?: string | undefined;
118
+ x5c?: string | string[] | undefined;
119
+ } | undefined;
120
+ encoding?: string | undefined;
121
+ allowInsecureKeySizes?: boolean | undefined;
122
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
123
+ }, {
124
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
125
+ keyid?: string | undefined;
126
+ expiresIn?: string | number | undefined;
127
+ notBefore?: string | number | undefined;
128
+ audience?: string | string[] | undefined;
129
+ subject?: string | undefined;
130
+ issuer?: string | undefined;
131
+ jwtid?: string | undefined;
132
+ mutatePayload?: boolean | undefined;
133
+ noTimestamp?: boolean | undefined;
134
+ header?: {
135
+ alg: string;
136
+ typ?: string | undefined;
137
+ cty?: string | undefined;
138
+ crit?: string[] | undefined;
139
+ kid?: string | undefined;
140
+ jku?: string | undefined;
141
+ x5u?: string | string[] | undefined;
142
+ 'x5t#S256'?: string | undefined;
143
+ x5t?: string | undefined;
144
+ x5c?: string | string[] | undefined;
145
+ } | undefined;
146
+ encoding?: string | undefined;
147
+ allowInsecureKeySizes?: boolean | undefined;
148
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
149
+ }>;
150
+ type SignOptions = z.infer<typeof SignOptionsSchema>;
151
+ declare const VerifyOptionsSchema: z.ZodObject<{
152
+ algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
153
+ audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
154
+ clockTimestamp: z.ZodOptional<z.ZodNumber>;
155
+ clockTolerance: z.ZodOptional<z.ZodNumber>;
156
+ complete: z.ZodOptional<z.ZodBoolean>;
157
+ issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
158
+ ignoreExpiration: z.ZodOptional<z.ZodBoolean>;
159
+ ignoreNotBefore: z.ZodOptional<z.ZodBoolean>;
160
+ jwtid: z.ZodOptional<z.ZodString>;
161
+ nonce: z.ZodOptional<z.ZodString>;
162
+ subject: z.ZodOptional<z.ZodString>;
163
+ maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
164
+ allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
165
+ }, "strip", z.ZodTypeAny, {
166
+ audience?: string | RegExp | string[] | undefined;
167
+ subject?: string | undefined;
168
+ issuer?: string | string[] | undefined;
169
+ jwtid?: string | undefined;
170
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
171
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
172
+ clockTimestamp?: number | undefined;
173
+ clockTolerance?: number | undefined;
174
+ complete?: boolean | undefined;
175
+ ignoreExpiration?: boolean | undefined;
176
+ ignoreNotBefore?: boolean | undefined;
177
+ nonce?: string | undefined;
178
+ maxAge?: string | number | undefined;
179
+ }, {
180
+ audience?: string | RegExp | string[] | undefined;
181
+ subject?: string | undefined;
182
+ issuer?: string | string[] | undefined;
183
+ jwtid?: string | undefined;
184
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
185
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
186
+ clockTimestamp?: number | undefined;
187
+ clockTolerance?: number | undefined;
188
+ complete?: boolean | undefined;
189
+ ignoreExpiration?: boolean | undefined;
190
+ ignoreNotBefore?: boolean | undefined;
191
+ nonce?: string | undefined;
192
+ maxAge?: string | number | undefined;
193
+ }>;
194
+ type VerifyOptions = z.infer<typeof VerifyOptionsSchema>;
195
+ declare const SecretSchema: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodObject<{
196
+ type: z.ZodString;
197
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
198
+ type: z.ZodString;
199
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
200
+ type: z.ZodString;
201
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
202
+ key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
203
+ passphrase: z.ZodString;
204
+ }, "strip", z.ZodTypeAny, {
205
+ key: string | Buffer<ArrayBufferLike>;
206
+ passphrase: string;
207
+ }, {
208
+ key: string | Buffer<ArrayBufferLike>;
209
+ passphrase: string;
210
+ }>]>;
211
+ type Secret = z.infer<typeof SecretSchema>;
212
+ declare const JwtServiceOptionsSchema: z.ZodObject<{
213
+ signOptions: z.ZodOptional<z.ZodObject<{
214
+ algorithm: z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
215
+ keyid: z.ZodOptional<z.ZodString>;
216
+ expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
217
+ notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
218
+ audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
219
+ subject: z.ZodOptional<z.ZodString>;
220
+ issuer: z.ZodOptional<z.ZodString>;
221
+ jwtid: z.ZodOptional<z.ZodString>;
222
+ mutatePayload: z.ZodOptional<z.ZodBoolean>;
223
+ noTimestamp: z.ZodOptional<z.ZodBoolean>;
224
+ header: z.ZodOptional<z.ZodObject<{
225
+ alg: z.ZodUnion<[z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, z.ZodString]>;
226
+ typ: z.ZodOptional<z.ZodString>;
227
+ cty: z.ZodOptional<z.ZodString>;
228
+ crit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
229
+ kid: z.ZodOptional<z.ZodString>;
230
+ jku: z.ZodOptional<z.ZodString>;
231
+ x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
232
+ 'x5t#S256': z.ZodOptional<z.ZodString>;
233
+ x5t: z.ZodOptional<z.ZodString>;
234
+ x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ alg: string;
237
+ typ?: string | undefined;
238
+ cty?: string | undefined;
239
+ crit?: string[] | undefined;
240
+ kid?: string | undefined;
241
+ jku?: string | undefined;
242
+ x5u?: string | string[] | undefined;
243
+ 'x5t#S256'?: string | undefined;
244
+ x5t?: string | undefined;
245
+ x5c?: string | string[] | undefined;
246
+ }, {
247
+ alg: string;
248
+ typ?: string | undefined;
249
+ cty?: string | undefined;
250
+ crit?: string[] | undefined;
251
+ kid?: string | undefined;
252
+ jku?: string | undefined;
253
+ x5u?: string | string[] | undefined;
254
+ 'x5t#S256'?: string | undefined;
255
+ x5t?: string | undefined;
256
+ x5c?: string | string[] | undefined;
257
+ }>>;
258
+ encoding: z.ZodOptional<z.ZodString>;
259
+ allowInsecureKeySizes: z.ZodOptional<z.ZodBoolean>;
260
+ allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
263
+ keyid?: string | undefined;
264
+ expiresIn?: string | number | undefined;
265
+ notBefore?: string | number | undefined;
266
+ audience?: string | string[] | undefined;
267
+ subject?: string | undefined;
268
+ issuer?: string | undefined;
269
+ jwtid?: string | undefined;
270
+ mutatePayload?: boolean | undefined;
271
+ noTimestamp?: boolean | undefined;
272
+ header?: {
273
+ alg: string;
274
+ typ?: string | undefined;
275
+ cty?: string | undefined;
276
+ crit?: string[] | undefined;
277
+ kid?: string | undefined;
278
+ jku?: string | undefined;
279
+ x5u?: string | string[] | undefined;
280
+ 'x5t#S256'?: string | undefined;
281
+ x5t?: string | undefined;
282
+ x5c?: string | string[] | undefined;
283
+ } | undefined;
284
+ encoding?: string | undefined;
285
+ allowInsecureKeySizes?: boolean | undefined;
286
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
287
+ }, {
288
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
289
+ keyid?: string | undefined;
290
+ expiresIn?: string | number | undefined;
291
+ notBefore?: string | number | undefined;
292
+ audience?: string | string[] | undefined;
293
+ subject?: string | undefined;
294
+ issuer?: string | undefined;
295
+ jwtid?: string | undefined;
296
+ mutatePayload?: boolean | undefined;
297
+ noTimestamp?: boolean | undefined;
298
+ header?: {
299
+ alg: string;
300
+ typ?: string | undefined;
301
+ cty?: string | undefined;
302
+ crit?: string[] | undefined;
303
+ kid?: string | undefined;
304
+ jku?: string | undefined;
305
+ x5u?: string | string[] | undefined;
306
+ 'x5t#S256'?: string | undefined;
307
+ x5t?: string | undefined;
308
+ x5c?: string | string[] | undefined;
309
+ } | undefined;
310
+ encoding?: string | undefined;
311
+ allowInsecureKeySizes?: boolean | undefined;
312
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
313
+ }>>;
314
+ secret: z.ZodOptional<z.ZodString>;
315
+ publicKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>>;
316
+ privateKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodObject<{
317
+ type: z.ZodString;
318
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
319
+ type: z.ZodString;
320
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
321
+ type: z.ZodString;
322
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
323
+ key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
324
+ passphrase: z.ZodString;
325
+ }, "strip", z.ZodTypeAny, {
326
+ key: string | Buffer<ArrayBufferLike>;
327
+ passphrase: string;
328
+ }, {
329
+ key: string | Buffer<ArrayBufferLike>;
330
+ passphrase: string;
331
+ }>]>>;
332
+ verifyOptions: z.ZodOptional<z.ZodObject<{
333
+ algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
334
+ audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
335
+ clockTimestamp: z.ZodOptional<z.ZodNumber>;
336
+ clockTolerance: z.ZodOptional<z.ZodNumber>;
337
+ complete: z.ZodOptional<z.ZodBoolean>;
338
+ issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
339
+ ignoreExpiration: z.ZodOptional<z.ZodBoolean>;
340
+ ignoreNotBefore: z.ZodOptional<z.ZodBoolean>;
341
+ jwtid: z.ZodOptional<z.ZodString>;
342
+ nonce: z.ZodOptional<z.ZodString>;
343
+ subject: z.ZodOptional<z.ZodString>;
344
+ maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
345
+ allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
346
+ }, "strip", z.ZodTypeAny, {
347
+ audience?: string | RegExp | string[] | undefined;
348
+ subject?: string | undefined;
349
+ issuer?: string | string[] | undefined;
350
+ jwtid?: string | undefined;
351
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
352
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
353
+ clockTimestamp?: number | undefined;
354
+ clockTolerance?: number | undefined;
355
+ complete?: boolean | undefined;
356
+ ignoreExpiration?: boolean | undefined;
357
+ ignoreNotBefore?: boolean | undefined;
358
+ nonce?: string | undefined;
359
+ maxAge?: string | number | undefined;
360
+ }, {
361
+ audience?: string | RegExp | string[] | undefined;
362
+ subject?: string | undefined;
363
+ issuer?: string | string[] | undefined;
364
+ jwtid?: string | undefined;
365
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
366
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
367
+ clockTimestamp?: number | undefined;
368
+ clockTolerance?: number | undefined;
369
+ complete?: boolean | undefined;
370
+ ignoreExpiration?: boolean | undefined;
371
+ ignoreNotBefore?: boolean | undefined;
372
+ nonce?: string | undefined;
373
+ maxAge?: string | number | undefined;
374
+ }>>;
375
+ secretOrKeyProvider: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodNativeEnum<typeof RequestType>, z.ZodAny, z.ZodOptional<z.ZodUnion<[z.ZodObject<{
376
+ algorithm: z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
377
+ keyid: z.ZodOptional<z.ZodString>;
378
+ expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
379
+ notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
380
+ audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
381
+ subject: z.ZodOptional<z.ZodString>;
382
+ issuer: z.ZodOptional<z.ZodString>;
383
+ jwtid: z.ZodOptional<z.ZodString>;
384
+ mutatePayload: z.ZodOptional<z.ZodBoolean>;
385
+ noTimestamp: z.ZodOptional<z.ZodBoolean>;
386
+ header: z.ZodOptional<z.ZodObject<{
387
+ alg: z.ZodUnion<[z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, z.ZodString]>;
388
+ typ: z.ZodOptional<z.ZodString>;
389
+ cty: z.ZodOptional<z.ZodString>;
390
+ crit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
391
+ kid: z.ZodOptional<z.ZodString>;
392
+ jku: z.ZodOptional<z.ZodString>;
393
+ x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
394
+ 'x5t#S256': z.ZodOptional<z.ZodString>;
395
+ x5t: z.ZodOptional<z.ZodString>;
396
+ x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ alg: string;
399
+ typ?: string | undefined;
400
+ cty?: string | undefined;
401
+ crit?: string[] | undefined;
402
+ kid?: string | undefined;
403
+ jku?: string | undefined;
404
+ x5u?: string | string[] | undefined;
405
+ 'x5t#S256'?: string | undefined;
406
+ x5t?: string | undefined;
407
+ x5c?: string | string[] | undefined;
408
+ }, {
409
+ alg: string;
410
+ typ?: string | undefined;
411
+ cty?: string | undefined;
412
+ crit?: string[] | undefined;
413
+ kid?: string | undefined;
414
+ jku?: string | undefined;
415
+ x5u?: string | string[] | undefined;
416
+ 'x5t#S256'?: string | undefined;
417
+ x5t?: string | undefined;
418
+ x5c?: string | string[] | undefined;
419
+ }>>;
420
+ encoding: z.ZodOptional<z.ZodString>;
421
+ allowInsecureKeySizes: z.ZodOptional<z.ZodBoolean>;
422
+ allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
425
+ keyid?: string | undefined;
426
+ expiresIn?: string | number | undefined;
427
+ notBefore?: string | number | undefined;
428
+ audience?: string | string[] | undefined;
429
+ subject?: string | undefined;
430
+ issuer?: string | undefined;
431
+ jwtid?: string | undefined;
432
+ mutatePayload?: boolean | undefined;
433
+ noTimestamp?: boolean | undefined;
434
+ header?: {
435
+ alg: string;
436
+ typ?: string | undefined;
437
+ cty?: string | undefined;
438
+ crit?: string[] | undefined;
439
+ kid?: string | undefined;
440
+ jku?: string | undefined;
441
+ x5u?: string | string[] | undefined;
442
+ 'x5t#S256'?: string | undefined;
443
+ x5t?: string | undefined;
444
+ x5c?: string | string[] | undefined;
445
+ } | undefined;
446
+ encoding?: string | undefined;
447
+ allowInsecureKeySizes?: boolean | undefined;
448
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
449
+ }, {
450
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
451
+ keyid?: string | undefined;
452
+ expiresIn?: string | number | undefined;
453
+ notBefore?: string | number | undefined;
454
+ audience?: string | string[] | undefined;
455
+ subject?: string | undefined;
456
+ issuer?: string | undefined;
457
+ jwtid?: string | undefined;
458
+ mutatePayload?: boolean | undefined;
459
+ noTimestamp?: boolean | undefined;
460
+ header?: {
461
+ alg: string;
462
+ typ?: string | undefined;
463
+ cty?: string | undefined;
464
+ crit?: string[] | undefined;
465
+ kid?: string | undefined;
466
+ jku?: string | undefined;
467
+ x5u?: string | string[] | undefined;
468
+ 'x5t#S256'?: string | undefined;
469
+ x5t?: string | undefined;
470
+ x5c?: string | string[] | undefined;
471
+ } | undefined;
472
+ encoding?: string | undefined;
473
+ allowInsecureKeySizes?: boolean | undefined;
474
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
475
+ }>, z.ZodObject<{
476
+ algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
477
+ audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
478
+ clockTimestamp: z.ZodOptional<z.ZodNumber>;
479
+ clockTolerance: z.ZodOptional<z.ZodNumber>;
480
+ complete: z.ZodOptional<z.ZodBoolean>;
481
+ issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
482
+ ignoreExpiration: z.ZodOptional<z.ZodBoolean>;
483
+ ignoreNotBefore: z.ZodOptional<z.ZodBoolean>;
484
+ jwtid: z.ZodOptional<z.ZodString>;
485
+ nonce: z.ZodOptional<z.ZodString>;
486
+ subject: z.ZodOptional<z.ZodString>;
487
+ maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
488
+ allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
489
+ }, "strip", z.ZodTypeAny, {
490
+ audience?: string | RegExp | string[] | undefined;
491
+ subject?: string | undefined;
492
+ issuer?: string | string[] | undefined;
493
+ jwtid?: string | undefined;
494
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
495
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
496
+ clockTimestamp?: number | undefined;
497
+ clockTolerance?: number | undefined;
498
+ complete?: boolean | undefined;
499
+ ignoreExpiration?: boolean | undefined;
500
+ ignoreNotBefore?: boolean | undefined;
501
+ nonce?: string | undefined;
502
+ maxAge?: string | number | undefined;
503
+ }, {
504
+ audience?: string | RegExp | string[] | undefined;
505
+ subject?: string | undefined;
506
+ issuer?: string | string[] | undefined;
507
+ jwtid?: string | undefined;
508
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
509
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
510
+ clockTimestamp?: number | undefined;
511
+ clockTolerance?: number | undefined;
512
+ complete?: boolean | undefined;
513
+ ignoreExpiration?: boolean | undefined;
514
+ ignoreNotBefore?: boolean | undefined;
515
+ nonce?: string | undefined;
516
+ maxAge?: string | number | undefined;
517
+ }>]>>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodObject<{
518
+ type: z.ZodString;
519
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
520
+ type: z.ZodString;
521
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
522
+ type: z.ZodString;
523
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
524
+ key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
525
+ passphrase: z.ZodString;
526
+ }, "strip", z.ZodTypeAny, {
527
+ key: string | Buffer<ArrayBufferLike>;
528
+ passphrase: string;
529
+ }, {
530
+ key: string | Buffer<ArrayBufferLike>;
531
+ passphrase: string;
532
+ }>]>, z.ZodPromise<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodObject<{
533
+ type: z.ZodString;
534
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
535
+ type: z.ZodString;
536
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
537
+ type: z.ZodString;
538
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
539
+ key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
540
+ passphrase: z.ZodString;
541
+ }, "strip", z.ZodTypeAny, {
542
+ key: string | Buffer<ArrayBufferLike>;
543
+ passphrase: string;
544
+ }, {
545
+ key: string | Buffer<ArrayBufferLike>;
546
+ passphrase: string;
547
+ }>]>>]>>>;
548
+ }, "strip", z.ZodTypeAny, {
549
+ signOptions?: {
550
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
551
+ keyid?: string | undefined;
552
+ expiresIn?: string | number | undefined;
553
+ notBefore?: string | number | undefined;
554
+ audience?: string | string[] | undefined;
555
+ subject?: string | undefined;
556
+ issuer?: string | undefined;
557
+ jwtid?: string | undefined;
558
+ mutatePayload?: boolean | undefined;
559
+ noTimestamp?: boolean | undefined;
560
+ header?: {
561
+ alg: string;
562
+ typ?: string | undefined;
563
+ cty?: string | undefined;
564
+ crit?: string[] | undefined;
565
+ kid?: string | undefined;
566
+ jku?: string | undefined;
567
+ x5u?: string | string[] | undefined;
568
+ 'x5t#S256'?: string | undefined;
569
+ x5t?: string | undefined;
570
+ x5c?: string | string[] | undefined;
571
+ } | undefined;
572
+ encoding?: string | undefined;
573
+ allowInsecureKeySizes?: boolean | undefined;
574
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
575
+ } | undefined;
576
+ secret?: string | undefined;
577
+ publicKey?: string | Buffer<ArrayBufferLike> | undefined;
578
+ privateKey?: string | Buffer<ArrayBufferLike> | z.objectOutputType<{
579
+ type: z.ZodString;
580
+ }, z.ZodTypeAny, "passthrough"> | {
581
+ key: string | Buffer<ArrayBufferLike>;
582
+ passphrase: string;
583
+ } | undefined;
584
+ verifyOptions?: {
585
+ audience?: string | RegExp | string[] | undefined;
586
+ subject?: string | undefined;
587
+ issuer?: string | string[] | undefined;
588
+ jwtid?: string | undefined;
589
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
590
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
591
+ clockTimestamp?: number | undefined;
592
+ clockTolerance?: number | undefined;
593
+ complete?: boolean | undefined;
594
+ ignoreExpiration?: boolean | undefined;
595
+ ignoreNotBefore?: boolean | undefined;
596
+ nonce?: string | undefined;
597
+ maxAge?: string | number | undefined;
598
+ } | undefined;
599
+ secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
600
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
601
+ keyid?: string | undefined;
602
+ expiresIn?: string | number | undefined;
603
+ notBefore?: string | number | undefined;
604
+ audience?: string | string[] | undefined;
605
+ subject?: string | undefined;
606
+ issuer?: string | undefined;
607
+ jwtid?: string | undefined;
608
+ mutatePayload?: boolean | undefined;
609
+ noTimestamp?: boolean | undefined;
610
+ header?: {
611
+ alg: string;
612
+ typ?: string | undefined;
613
+ cty?: string | undefined;
614
+ crit?: string[] | undefined;
615
+ kid?: string | undefined;
616
+ jku?: string | undefined;
617
+ x5u?: string | string[] | undefined;
618
+ 'x5t#S256'?: string | undefined;
619
+ x5t?: string | undefined;
620
+ x5c?: string | string[] | undefined;
621
+ } | undefined;
622
+ encoding?: string | undefined;
623
+ allowInsecureKeySizes?: boolean | undefined;
624
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
625
+ } | {
626
+ audience?: string | RegExp | string[] | undefined;
627
+ subject?: string | undefined;
628
+ issuer?: string | string[] | undefined;
629
+ jwtid?: string | undefined;
630
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
631
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
632
+ clockTimestamp?: number | undefined;
633
+ clockTolerance?: number | undefined;
634
+ complete?: boolean | undefined;
635
+ ignoreExpiration?: boolean | undefined;
636
+ ignoreNotBefore?: boolean | undefined;
637
+ nonce?: string | undefined;
638
+ maxAge?: string | number | undefined;
639
+ } | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | z.objectOutputType<{
640
+ type: z.ZodString;
641
+ }, z.ZodTypeAny, "passthrough"> | {
642
+ key: string | Buffer<ArrayBufferLike>;
643
+ passphrase: string;
644
+ } | Promise<string | Buffer<ArrayBufferLike> | z.objectOutputType<{
645
+ type: z.ZodString;
646
+ }, z.ZodTypeAny, "passthrough"> | {
647
+ key: string | Buffer<ArrayBufferLike>;
648
+ passphrase: string;
649
+ }>) | undefined;
650
+ }, {
651
+ signOptions?: {
652
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
653
+ keyid?: string | undefined;
654
+ expiresIn?: string | number | undefined;
655
+ notBefore?: string | number | undefined;
656
+ audience?: string | string[] | undefined;
657
+ subject?: string | undefined;
658
+ issuer?: string | undefined;
659
+ jwtid?: string | undefined;
660
+ mutatePayload?: boolean | undefined;
661
+ noTimestamp?: boolean | undefined;
662
+ header?: {
663
+ alg: string;
664
+ typ?: string | undefined;
665
+ cty?: string | undefined;
666
+ crit?: string[] | undefined;
667
+ kid?: string | undefined;
668
+ jku?: string | undefined;
669
+ x5u?: string | string[] | undefined;
670
+ 'x5t#S256'?: string | undefined;
671
+ x5t?: string | undefined;
672
+ x5c?: string | string[] | undefined;
673
+ } | undefined;
674
+ encoding?: string | undefined;
675
+ allowInsecureKeySizes?: boolean | undefined;
676
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
677
+ } | undefined;
678
+ secret?: string | undefined;
679
+ publicKey?: string | Buffer<ArrayBufferLike> | undefined;
680
+ privateKey?: string | Buffer<ArrayBufferLike> | z.objectInputType<{
681
+ type: z.ZodString;
682
+ }, z.ZodTypeAny, "passthrough"> | {
683
+ key: string | Buffer<ArrayBufferLike>;
684
+ passphrase: string;
685
+ } | undefined;
686
+ verifyOptions?: {
687
+ audience?: string | RegExp | string[] | undefined;
688
+ subject?: string | undefined;
689
+ issuer?: string | string[] | undefined;
690
+ jwtid?: string | undefined;
691
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
692
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
693
+ clockTimestamp?: number | undefined;
694
+ clockTolerance?: number | undefined;
695
+ complete?: boolean | undefined;
696
+ ignoreExpiration?: boolean | undefined;
697
+ ignoreNotBefore?: boolean | undefined;
698
+ nonce?: string | undefined;
699
+ maxAge?: string | number | undefined;
700
+ } | undefined;
701
+ secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
702
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
703
+ keyid?: string | undefined;
704
+ expiresIn?: string | number | undefined;
705
+ notBefore?: string | number | undefined;
706
+ audience?: string | string[] | undefined;
707
+ subject?: string | undefined;
708
+ issuer?: string | undefined;
709
+ jwtid?: string | undefined;
710
+ mutatePayload?: boolean | undefined;
711
+ noTimestamp?: boolean | undefined;
712
+ header?: {
713
+ alg: string;
714
+ typ?: string | undefined;
715
+ cty?: string | undefined;
716
+ crit?: string[] | undefined;
717
+ kid?: string | undefined;
718
+ jku?: string | undefined;
719
+ x5u?: string | string[] | undefined;
720
+ 'x5t#S256'?: string | undefined;
721
+ x5t?: string | undefined;
722
+ x5c?: string | string[] | undefined;
723
+ } | undefined;
724
+ encoding?: string | undefined;
725
+ allowInsecureKeySizes?: boolean | undefined;
726
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
727
+ } | {
728
+ audience?: string | RegExp | string[] | undefined;
729
+ subject?: string | undefined;
730
+ issuer?: string | string[] | undefined;
731
+ jwtid?: string | undefined;
732
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
733
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
734
+ clockTimestamp?: number | undefined;
735
+ clockTolerance?: number | undefined;
736
+ complete?: boolean | undefined;
737
+ ignoreExpiration?: boolean | undefined;
738
+ ignoreNotBefore?: boolean | undefined;
739
+ nonce?: string | undefined;
740
+ maxAge?: string | number | undefined;
741
+ } | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | z.objectInputType<{
742
+ type: z.ZodString;
743
+ }, z.ZodTypeAny, "passthrough"> | {
744
+ key: string | Buffer<ArrayBufferLike>;
745
+ passphrase: string;
746
+ } | Promise<string | Buffer<ArrayBufferLike> | z.objectInputType<{
747
+ type: z.ZodString;
748
+ }, z.ZodTypeAny, "passthrough"> | {
749
+ key: string | Buffer<ArrayBufferLike>;
750
+ passphrase: string;
751
+ }>) | undefined;
752
+ }>;
753
+ type JwtServiceOptions = z.infer<typeof JwtServiceOptionsSchema>;
754
+ interface JwtSignOptions extends SignOptions {
755
+ secret?: string | Buffer;
756
+ privateKey?: Secret;
757
+ }
758
+ interface JwtVerifyOptions extends VerifyOptions {
759
+ secret?: string | Buffer;
760
+ publicKey?: string | Buffer;
761
+ }
762
+ type GetSecretKeyResult = string | Buffer | Secret$1;
763
+
764
+ declare class JwtService {
765
+ private readonly options;
766
+ logger: _navios_core.LoggerInstance;
767
+ constructor(options?: JwtServiceOptions);
768
+ sign(payload: string, options?: Omit<JwtSignOptions, keyof SignOptions>): string;
769
+ sign(payload: Buffer | object, options?: JwtSignOptions): string;
770
+ signAsync(payload: string, options?: Omit<JwtSignOptions, keyof jwt.SignOptions>): Promise<string>;
771
+ signAsync(payload: Buffer | object, options?: JwtSignOptions): Promise<string>;
772
+ verify<T extends object = any>(token: string, options?: JwtVerifyOptions): T;
773
+ verifyAsync<T extends object = any>(token: string, options?: JwtVerifyOptions): Promise<T>;
774
+ decode<T = any>(token: string, options?: jwt.DecodeOptions): T;
775
+ private mergeJwtOptions;
776
+ private overrideSecretFromOptions;
777
+ private getSecretKey;
778
+ }
779
+
780
+ declare const JwtServiceToken: InjectionToken<JwtService, zod.ZodObject<{
781
+ signOptions: zod.ZodOptional<zod.ZodObject<{
782
+ algorithm: zod.ZodOptional<zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
783
+ keyid: zod.ZodOptional<zod.ZodString>;
784
+ expiresIn: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
785
+ notBefore: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
786
+ audience: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
787
+ subject: zod.ZodOptional<zod.ZodString>;
788
+ issuer: zod.ZodOptional<zod.ZodString>;
789
+ jwtid: zod.ZodOptional<zod.ZodString>;
790
+ mutatePayload: zod.ZodOptional<zod.ZodBoolean>;
791
+ noTimestamp: zod.ZodOptional<zod.ZodBoolean>;
792
+ header: zod.ZodOptional<zod.ZodObject<{
793
+ alg: zod.ZodUnion<[zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, zod.ZodString]>;
794
+ typ: zod.ZodOptional<zod.ZodString>;
795
+ cty: zod.ZodOptional<zod.ZodString>;
796
+ crit: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
797
+ kid: zod.ZodOptional<zod.ZodString>;
798
+ jku: zod.ZodOptional<zod.ZodString>;
799
+ x5u: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
800
+ 'x5t#S256': zod.ZodOptional<zod.ZodString>;
801
+ x5t: zod.ZodOptional<zod.ZodString>;
802
+ x5c: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
803
+ }, "strip", zod.ZodTypeAny, {
804
+ alg: string;
805
+ typ?: string | undefined;
806
+ cty?: string | undefined;
807
+ crit?: string[] | undefined;
808
+ kid?: string | undefined;
809
+ jku?: string | undefined;
810
+ x5u?: string | string[] | undefined;
811
+ 'x5t#S256'?: string | undefined;
812
+ x5t?: string | undefined;
813
+ x5c?: string | string[] | undefined;
814
+ }, {
815
+ alg: string;
816
+ typ?: string | undefined;
817
+ cty?: string | undefined;
818
+ crit?: string[] | undefined;
819
+ kid?: string | undefined;
820
+ jku?: string | undefined;
821
+ x5u?: string | string[] | undefined;
822
+ 'x5t#S256'?: string | undefined;
823
+ x5t?: string | undefined;
824
+ x5c?: string | string[] | undefined;
825
+ }>>;
826
+ encoding: zod.ZodOptional<zod.ZodString>;
827
+ allowInsecureKeySizes: zod.ZodOptional<zod.ZodBoolean>;
828
+ allowInvalidAsymmetricKeyTypes: zod.ZodOptional<zod.ZodBoolean>;
829
+ }, "strip", zod.ZodTypeAny, {
830
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
831
+ keyid?: string | undefined;
832
+ expiresIn?: string | number | undefined;
833
+ notBefore?: string | number | undefined;
834
+ audience?: string | string[] | undefined;
835
+ subject?: string | undefined;
836
+ issuer?: string | undefined;
837
+ jwtid?: string | undefined;
838
+ mutatePayload?: boolean | undefined;
839
+ noTimestamp?: boolean | undefined;
840
+ header?: {
841
+ alg: string;
842
+ typ?: string | undefined;
843
+ cty?: string | undefined;
844
+ crit?: string[] | undefined;
845
+ kid?: string | undefined;
846
+ jku?: string | undefined;
847
+ x5u?: string | string[] | undefined;
848
+ 'x5t#S256'?: string | undefined;
849
+ x5t?: string | undefined;
850
+ x5c?: string | string[] | undefined;
851
+ } | undefined;
852
+ encoding?: string | undefined;
853
+ allowInsecureKeySizes?: boolean | undefined;
854
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
855
+ }, {
856
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
857
+ keyid?: string | undefined;
858
+ expiresIn?: string | number | undefined;
859
+ notBefore?: string | number | undefined;
860
+ audience?: string | string[] | undefined;
861
+ subject?: string | undefined;
862
+ issuer?: string | undefined;
863
+ jwtid?: string | undefined;
864
+ mutatePayload?: boolean | undefined;
865
+ noTimestamp?: boolean | undefined;
866
+ header?: {
867
+ alg: string;
868
+ typ?: string | undefined;
869
+ cty?: string | undefined;
870
+ crit?: string[] | undefined;
871
+ kid?: string | undefined;
872
+ jku?: string | undefined;
873
+ x5u?: string | string[] | undefined;
874
+ 'x5t#S256'?: string | undefined;
875
+ x5t?: string | undefined;
876
+ x5c?: string | string[] | undefined;
877
+ } | undefined;
878
+ encoding?: string | undefined;
879
+ allowInsecureKeySizes?: boolean | undefined;
880
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
881
+ }>>;
882
+ secret: zod.ZodOptional<zod.ZodString>;
883
+ publicKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>]>>;
884
+ privateKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>, zod.ZodObject<{
885
+ type: zod.ZodString;
886
+ }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
887
+ type: zod.ZodString;
888
+ }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
889
+ type: zod.ZodString;
890
+ }, zod.ZodTypeAny, "passthrough">>, zod.ZodObject<{
891
+ key: zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
892
+ passphrase: zod.ZodString;
893
+ }, "strip", zod.ZodTypeAny, {
894
+ key: string | Buffer<ArrayBufferLike>;
895
+ passphrase: string;
896
+ }, {
897
+ key: string | Buffer<ArrayBufferLike>;
898
+ passphrase: string;
899
+ }>]>>;
900
+ verifyOptions: zod.ZodOptional<zod.ZodObject<{
901
+ algorithms: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
902
+ audience: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodType<RegExp, zod.ZodTypeDef, RegExp>, zod.ZodArray<zod.ZodString, "many">]>>;
903
+ clockTimestamp: zod.ZodOptional<zod.ZodNumber>;
904
+ clockTolerance: zod.ZodOptional<zod.ZodNumber>;
905
+ complete: zod.ZodOptional<zod.ZodBoolean>;
906
+ issuer: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
907
+ ignoreExpiration: zod.ZodOptional<zod.ZodBoolean>;
908
+ ignoreNotBefore: zod.ZodOptional<zod.ZodBoolean>;
909
+ jwtid: zod.ZodOptional<zod.ZodString>;
910
+ nonce: zod.ZodOptional<zod.ZodString>;
911
+ subject: zod.ZodOptional<zod.ZodString>;
912
+ maxAge: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
913
+ allowInvalidAsymmetricKeyTypes: zod.ZodOptional<zod.ZodBoolean>;
914
+ }, "strip", zod.ZodTypeAny, {
915
+ audience?: string | RegExp | string[] | undefined;
916
+ subject?: string | undefined;
917
+ issuer?: string | string[] | undefined;
918
+ jwtid?: string | undefined;
919
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
920
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
921
+ clockTimestamp?: number | undefined;
922
+ clockTolerance?: number | undefined;
923
+ complete?: boolean | undefined;
924
+ ignoreExpiration?: boolean | undefined;
925
+ ignoreNotBefore?: boolean | undefined;
926
+ nonce?: string | undefined;
927
+ maxAge?: string | number | undefined;
928
+ }, {
929
+ audience?: string | RegExp | string[] | undefined;
930
+ subject?: string | undefined;
931
+ issuer?: string | string[] | undefined;
932
+ jwtid?: string | undefined;
933
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
934
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
935
+ clockTimestamp?: number | undefined;
936
+ clockTolerance?: number | undefined;
937
+ complete?: boolean | undefined;
938
+ ignoreExpiration?: boolean | undefined;
939
+ ignoreNotBefore?: boolean | undefined;
940
+ nonce?: string | undefined;
941
+ maxAge?: string | number | undefined;
942
+ }>>;
943
+ secretOrKeyProvider: zod.ZodOptional<zod.ZodFunction<zod.ZodTuple<[zod.ZodNativeEnum<typeof RequestType>, zod.ZodAny, zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
944
+ algorithm: zod.ZodOptional<zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
945
+ keyid: zod.ZodOptional<zod.ZodString>;
946
+ expiresIn: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
947
+ notBefore: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
948
+ audience: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
949
+ subject: zod.ZodOptional<zod.ZodString>;
950
+ issuer: zod.ZodOptional<zod.ZodString>;
951
+ jwtid: zod.ZodOptional<zod.ZodString>;
952
+ mutatePayload: zod.ZodOptional<zod.ZodBoolean>;
953
+ noTimestamp: zod.ZodOptional<zod.ZodBoolean>;
954
+ header: zod.ZodOptional<zod.ZodObject<{
955
+ alg: zod.ZodUnion<[zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, zod.ZodString]>;
956
+ typ: zod.ZodOptional<zod.ZodString>;
957
+ cty: zod.ZodOptional<zod.ZodString>;
958
+ crit: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
959
+ kid: zod.ZodOptional<zod.ZodString>;
960
+ jku: zod.ZodOptional<zod.ZodString>;
961
+ x5u: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
962
+ 'x5t#S256': zod.ZodOptional<zod.ZodString>;
963
+ x5t: zod.ZodOptional<zod.ZodString>;
964
+ x5c: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
965
+ }, "strip", zod.ZodTypeAny, {
966
+ alg: string;
967
+ typ?: string | undefined;
968
+ cty?: string | undefined;
969
+ crit?: string[] | undefined;
970
+ kid?: string | undefined;
971
+ jku?: string | undefined;
972
+ x5u?: string | string[] | undefined;
973
+ 'x5t#S256'?: string | undefined;
974
+ x5t?: string | undefined;
975
+ x5c?: string | string[] | undefined;
976
+ }, {
977
+ alg: string;
978
+ typ?: string | undefined;
979
+ cty?: string | undefined;
980
+ crit?: string[] | undefined;
981
+ kid?: string | undefined;
982
+ jku?: string | undefined;
983
+ x5u?: string | string[] | undefined;
984
+ 'x5t#S256'?: string | undefined;
985
+ x5t?: string | undefined;
986
+ x5c?: string | string[] | undefined;
987
+ }>>;
988
+ encoding: zod.ZodOptional<zod.ZodString>;
989
+ allowInsecureKeySizes: zod.ZodOptional<zod.ZodBoolean>;
990
+ allowInvalidAsymmetricKeyTypes: zod.ZodOptional<zod.ZodBoolean>;
991
+ }, "strip", zod.ZodTypeAny, {
992
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
993
+ keyid?: string | undefined;
994
+ expiresIn?: string | number | undefined;
995
+ notBefore?: string | number | undefined;
996
+ audience?: string | string[] | undefined;
997
+ subject?: string | undefined;
998
+ issuer?: string | undefined;
999
+ jwtid?: string | undefined;
1000
+ mutatePayload?: boolean | undefined;
1001
+ noTimestamp?: boolean | undefined;
1002
+ header?: {
1003
+ alg: string;
1004
+ typ?: string | undefined;
1005
+ cty?: string | undefined;
1006
+ crit?: string[] | undefined;
1007
+ kid?: string | undefined;
1008
+ jku?: string | undefined;
1009
+ x5u?: string | string[] | undefined;
1010
+ 'x5t#S256'?: string | undefined;
1011
+ x5t?: string | undefined;
1012
+ x5c?: string | string[] | undefined;
1013
+ } | undefined;
1014
+ encoding?: string | undefined;
1015
+ allowInsecureKeySizes?: boolean | undefined;
1016
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1017
+ }, {
1018
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1019
+ keyid?: string | undefined;
1020
+ expiresIn?: string | number | undefined;
1021
+ notBefore?: string | number | undefined;
1022
+ audience?: string | string[] | undefined;
1023
+ subject?: string | undefined;
1024
+ issuer?: string | undefined;
1025
+ jwtid?: string | undefined;
1026
+ mutatePayload?: boolean | undefined;
1027
+ noTimestamp?: boolean | undefined;
1028
+ header?: {
1029
+ alg: string;
1030
+ typ?: string | undefined;
1031
+ cty?: string | undefined;
1032
+ crit?: string[] | undefined;
1033
+ kid?: string | undefined;
1034
+ jku?: string | undefined;
1035
+ x5u?: string | string[] | undefined;
1036
+ 'x5t#S256'?: string | undefined;
1037
+ x5t?: string | undefined;
1038
+ x5c?: string | string[] | undefined;
1039
+ } | undefined;
1040
+ encoding?: string | undefined;
1041
+ allowInsecureKeySizes?: boolean | undefined;
1042
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1043
+ }>, zod.ZodObject<{
1044
+ algorithms: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
1045
+ audience: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodType<RegExp, zod.ZodTypeDef, RegExp>, zod.ZodArray<zod.ZodString, "many">]>>;
1046
+ clockTimestamp: zod.ZodOptional<zod.ZodNumber>;
1047
+ clockTolerance: zod.ZodOptional<zod.ZodNumber>;
1048
+ complete: zod.ZodOptional<zod.ZodBoolean>;
1049
+ issuer: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
1050
+ ignoreExpiration: zod.ZodOptional<zod.ZodBoolean>;
1051
+ ignoreNotBefore: zod.ZodOptional<zod.ZodBoolean>;
1052
+ jwtid: zod.ZodOptional<zod.ZodString>;
1053
+ nonce: zod.ZodOptional<zod.ZodString>;
1054
+ subject: zod.ZodOptional<zod.ZodString>;
1055
+ maxAge: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
1056
+ allowInvalidAsymmetricKeyTypes: zod.ZodOptional<zod.ZodBoolean>;
1057
+ }, "strip", zod.ZodTypeAny, {
1058
+ audience?: string | RegExp | string[] | undefined;
1059
+ subject?: string | undefined;
1060
+ issuer?: string | string[] | undefined;
1061
+ jwtid?: string | undefined;
1062
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1063
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1064
+ clockTimestamp?: number | undefined;
1065
+ clockTolerance?: number | undefined;
1066
+ complete?: boolean | undefined;
1067
+ ignoreExpiration?: boolean | undefined;
1068
+ ignoreNotBefore?: boolean | undefined;
1069
+ nonce?: string | undefined;
1070
+ maxAge?: string | number | undefined;
1071
+ }, {
1072
+ audience?: string | RegExp | string[] | undefined;
1073
+ subject?: string | undefined;
1074
+ issuer?: string | string[] | undefined;
1075
+ jwtid?: string | undefined;
1076
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1077
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1078
+ clockTimestamp?: number | undefined;
1079
+ clockTolerance?: number | undefined;
1080
+ complete?: boolean | undefined;
1081
+ ignoreExpiration?: boolean | undefined;
1082
+ ignoreNotBefore?: boolean | undefined;
1083
+ nonce?: string | undefined;
1084
+ maxAge?: string | number | undefined;
1085
+ }>]>>], zod.ZodUnknown>, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>, zod.ZodObject<{
1086
+ type: zod.ZodString;
1087
+ }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
1088
+ type: zod.ZodString;
1089
+ }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
1090
+ type: zod.ZodString;
1091
+ }, zod.ZodTypeAny, "passthrough">>, zod.ZodObject<{
1092
+ key: zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
1093
+ passphrase: zod.ZodString;
1094
+ }, "strip", zod.ZodTypeAny, {
1095
+ key: string | Buffer<ArrayBufferLike>;
1096
+ passphrase: string;
1097
+ }, {
1098
+ key: string | Buffer<ArrayBufferLike>;
1099
+ passphrase: string;
1100
+ }>]>, zod.ZodPromise<zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>, zod.ZodObject<{
1101
+ type: zod.ZodString;
1102
+ }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
1103
+ type: zod.ZodString;
1104
+ }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
1105
+ type: zod.ZodString;
1106
+ }, zod.ZodTypeAny, "passthrough">>, zod.ZodObject<{
1107
+ key: zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
1108
+ passphrase: zod.ZodString;
1109
+ }, "strip", zod.ZodTypeAny, {
1110
+ key: string | Buffer<ArrayBufferLike>;
1111
+ passphrase: string;
1112
+ }, {
1113
+ key: string | Buffer<ArrayBufferLike>;
1114
+ passphrase: string;
1115
+ }>]>>]>>>;
1116
+ }, "strip", zod.ZodTypeAny, {
1117
+ signOptions?: {
1118
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1119
+ keyid?: string | undefined;
1120
+ expiresIn?: string | number | undefined;
1121
+ notBefore?: string | number | undefined;
1122
+ audience?: string | string[] | undefined;
1123
+ subject?: string | undefined;
1124
+ issuer?: string | undefined;
1125
+ jwtid?: string | undefined;
1126
+ mutatePayload?: boolean | undefined;
1127
+ noTimestamp?: boolean | undefined;
1128
+ header?: {
1129
+ alg: string;
1130
+ typ?: string | undefined;
1131
+ cty?: string | undefined;
1132
+ crit?: string[] | undefined;
1133
+ kid?: string | undefined;
1134
+ jku?: string | undefined;
1135
+ x5u?: string | string[] | undefined;
1136
+ 'x5t#S256'?: string | undefined;
1137
+ x5t?: string | undefined;
1138
+ x5c?: string | string[] | undefined;
1139
+ } | undefined;
1140
+ encoding?: string | undefined;
1141
+ allowInsecureKeySizes?: boolean | undefined;
1142
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1143
+ } | undefined;
1144
+ secret?: string | undefined;
1145
+ publicKey?: string | Buffer<ArrayBufferLike> | undefined;
1146
+ privateKey?: string | Buffer<ArrayBufferLike> | zod.objectOutputType<{
1147
+ type: zod.ZodString;
1148
+ }, zod.ZodTypeAny, "passthrough"> | {
1149
+ key: string | Buffer<ArrayBufferLike>;
1150
+ passphrase: string;
1151
+ } | undefined;
1152
+ verifyOptions?: {
1153
+ audience?: string | RegExp | string[] | undefined;
1154
+ subject?: string | undefined;
1155
+ issuer?: string | string[] | undefined;
1156
+ jwtid?: string | undefined;
1157
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1158
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1159
+ clockTimestamp?: number | undefined;
1160
+ clockTolerance?: number | undefined;
1161
+ complete?: boolean | undefined;
1162
+ ignoreExpiration?: boolean | undefined;
1163
+ ignoreNotBefore?: boolean | undefined;
1164
+ nonce?: string | undefined;
1165
+ maxAge?: string | number | undefined;
1166
+ } | undefined;
1167
+ secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
1168
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1169
+ keyid?: string | undefined;
1170
+ expiresIn?: string | number | undefined;
1171
+ notBefore?: string | number | undefined;
1172
+ audience?: string | string[] | undefined;
1173
+ subject?: string | undefined;
1174
+ issuer?: string | undefined;
1175
+ jwtid?: string | undefined;
1176
+ mutatePayload?: boolean | undefined;
1177
+ noTimestamp?: boolean | undefined;
1178
+ header?: {
1179
+ alg: string;
1180
+ typ?: string | undefined;
1181
+ cty?: string | undefined;
1182
+ crit?: string[] | undefined;
1183
+ kid?: string | undefined;
1184
+ jku?: string | undefined;
1185
+ x5u?: string | string[] | undefined;
1186
+ 'x5t#S256'?: string | undefined;
1187
+ x5t?: string | undefined;
1188
+ x5c?: string | string[] | undefined;
1189
+ } | undefined;
1190
+ encoding?: string | undefined;
1191
+ allowInsecureKeySizes?: boolean | undefined;
1192
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1193
+ } | {
1194
+ audience?: string | RegExp | string[] | undefined;
1195
+ subject?: string | undefined;
1196
+ issuer?: string | string[] | undefined;
1197
+ jwtid?: string | undefined;
1198
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1199
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1200
+ clockTimestamp?: number | undefined;
1201
+ clockTolerance?: number | undefined;
1202
+ complete?: boolean | undefined;
1203
+ ignoreExpiration?: boolean | undefined;
1204
+ ignoreNotBefore?: boolean | undefined;
1205
+ nonce?: string | undefined;
1206
+ maxAge?: string | number | undefined;
1207
+ } | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | zod.objectOutputType<{
1208
+ type: zod.ZodString;
1209
+ }, zod.ZodTypeAny, "passthrough"> | {
1210
+ key: string | Buffer<ArrayBufferLike>;
1211
+ passphrase: string;
1212
+ } | Promise<string | Buffer<ArrayBufferLike> | zod.objectOutputType<{
1213
+ type: zod.ZodString;
1214
+ }, zod.ZodTypeAny, "passthrough"> | {
1215
+ key: string | Buffer<ArrayBufferLike>;
1216
+ passphrase: string;
1217
+ }>) | undefined;
1218
+ }, {
1219
+ signOptions?: {
1220
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1221
+ keyid?: string | undefined;
1222
+ expiresIn?: string | number | undefined;
1223
+ notBefore?: string | number | undefined;
1224
+ audience?: string | string[] | undefined;
1225
+ subject?: string | undefined;
1226
+ issuer?: string | undefined;
1227
+ jwtid?: string | undefined;
1228
+ mutatePayload?: boolean | undefined;
1229
+ noTimestamp?: boolean | undefined;
1230
+ header?: {
1231
+ alg: string;
1232
+ typ?: string | undefined;
1233
+ cty?: string | undefined;
1234
+ crit?: string[] | undefined;
1235
+ kid?: string | undefined;
1236
+ jku?: string | undefined;
1237
+ x5u?: string | string[] | undefined;
1238
+ 'x5t#S256'?: string | undefined;
1239
+ x5t?: string | undefined;
1240
+ x5c?: string | string[] | undefined;
1241
+ } | undefined;
1242
+ encoding?: string | undefined;
1243
+ allowInsecureKeySizes?: boolean | undefined;
1244
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1245
+ } | undefined;
1246
+ secret?: string | undefined;
1247
+ publicKey?: string | Buffer<ArrayBufferLike> | undefined;
1248
+ privateKey?: string | Buffer<ArrayBufferLike> | zod.objectInputType<{
1249
+ type: zod.ZodString;
1250
+ }, zod.ZodTypeAny, "passthrough"> | {
1251
+ key: string | Buffer<ArrayBufferLike>;
1252
+ passphrase: string;
1253
+ } | undefined;
1254
+ verifyOptions?: {
1255
+ audience?: string | RegExp | string[] | undefined;
1256
+ subject?: string | undefined;
1257
+ issuer?: string | string[] | undefined;
1258
+ jwtid?: string | undefined;
1259
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1260
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1261
+ clockTimestamp?: number | undefined;
1262
+ clockTolerance?: number | undefined;
1263
+ complete?: boolean | undefined;
1264
+ ignoreExpiration?: boolean | undefined;
1265
+ ignoreNotBefore?: boolean | undefined;
1266
+ nonce?: string | undefined;
1267
+ maxAge?: string | number | undefined;
1268
+ } | undefined;
1269
+ secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
1270
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1271
+ keyid?: string | undefined;
1272
+ expiresIn?: string | number | undefined;
1273
+ notBefore?: string | number | undefined;
1274
+ audience?: string | string[] | undefined;
1275
+ subject?: string | undefined;
1276
+ issuer?: string | undefined;
1277
+ jwtid?: string | undefined;
1278
+ mutatePayload?: boolean | undefined;
1279
+ noTimestamp?: boolean | undefined;
1280
+ header?: {
1281
+ alg: string;
1282
+ typ?: string | undefined;
1283
+ cty?: string | undefined;
1284
+ crit?: string[] | undefined;
1285
+ kid?: string | undefined;
1286
+ jku?: string | undefined;
1287
+ x5u?: string | string[] | undefined;
1288
+ 'x5t#S256'?: string | undefined;
1289
+ x5t?: string | undefined;
1290
+ x5c?: string | string[] | undefined;
1291
+ } | undefined;
1292
+ encoding?: string | undefined;
1293
+ allowInsecureKeySizes?: boolean | undefined;
1294
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1295
+ } | {
1296
+ audience?: string | RegExp | string[] | undefined;
1297
+ subject?: string | undefined;
1298
+ issuer?: string | string[] | undefined;
1299
+ jwtid?: string | undefined;
1300
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1301
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1302
+ clockTimestamp?: number | undefined;
1303
+ clockTolerance?: number | undefined;
1304
+ complete?: boolean | undefined;
1305
+ ignoreExpiration?: boolean | undefined;
1306
+ ignoreNotBefore?: boolean | undefined;
1307
+ nonce?: string | undefined;
1308
+ maxAge?: string | number | undefined;
1309
+ } | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | zod.objectInputType<{
1310
+ type: zod.ZodString;
1311
+ }, zod.ZodTypeAny, "passthrough"> | {
1312
+ key: string | Buffer<ArrayBufferLike>;
1313
+ passphrase: string;
1314
+ } | Promise<string | Buffer<ArrayBufferLike> | zod.objectInputType<{
1315
+ type: zod.ZodString;
1316
+ }, zod.ZodTypeAny, "passthrough"> | {
1317
+ key: string | Buffer<ArrayBufferLike>;
1318
+ passphrase: string;
1319
+ }>) | undefined;
1320
+ }>>;
1321
+ declare class JwtServiceFactory {
1322
+ create(ctx: ServiceLocatorAbstractFactoryContext, args: JwtServiceOptions): Promise<JwtService>;
1323
+ }
1324
+ declare function provideJwtService(config: JwtServiceOptions | (() => Promise<JwtServiceOptions>)): InjectionToken<JwtService, undefined>;
1325
+
1326
+ export { AlgorithmType, type GetSecretKeyResult, type JwtHeader, JwtHeaderSchema, JwtService, JwtServiceFactory, type JwtServiceOptions, JwtServiceOptionsSchema, JwtServiceToken, type JwtSignOptions, type JwtVerifyOptions, RequestType, type Secret, SecretSchema, type SignOptions, SignOptionsSchema, type VerifyOptions, VerifyOptionsSchema, provideJwtService };