@navios/jwt 0.2.0 → 0.3.1
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/index.d.mts +8 -0
- package/dist/src/index.d.mts.map +1 -0
- package/dist/src/jwt-service.provider.d.mts +7 -0
- package/dist/src/jwt-service.provider.d.mts.map +1 -0
- package/dist/src/jwt.service.d.mts +560 -0
- package/dist/src/jwt.service.d.mts.map +1 -0
- package/dist/src/options/jwt-service.options.d.mts +757 -0
- package/dist/src/options/jwt-service.options.d.mts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsdown.config.d.mts +3 -0
- package/dist/tsdown.config.d.mts.map +1 -0
- package/dist/tsup.config.d.mts +3 -0
- package/dist/tsup.config.d.mts.map +1 -0
- package/dist/vitest.config.d.mts +3 -0
- package/dist/vitest.config.d.mts.map +1 -0
- package/{dist → lib}/_tsup-dts-rollup.d.mts +54 -60
- package/{dist → lib}/_tsup-dts-rollup.d.ts +54 -60
- package/{dist → lib}/index.d.mts +1 -2
- package/{dist → lib}/index.d.ts +1 -2
- package/lib/index.js +298 -0
- package/lib/index.js.map +1 -0
- package/{dist → lib}/index.mjs +40 -86
- package/lib/index.mjs.map +1 -0
- package/package.json +13 -14
- package/project.json +53 -0
- package/src/jwt-service.provider.mts +9 -27
- package/src/jwt.service.mts +15 -3
- package/src/options/jwt-service.options.mts +12 -2
- package/tsconfig.json +13 -0
- package/tsup.config.mts +12 -0
- package/vitest.config.mts +9 -0
- package/dist/index.js +0 -365
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { BoundInjectionToken } from '@navios/core';
|
|
2
|
-
import type { FactoryContext } from '@navios/core';
|
|
3
2
|
import type { FactoryInjectionToken } from '@navios/core';
|
|
4
3
|
import { InjectionToken } from '@navios/core';
|
|
5
4
|
import jwt from 'jsonwebtoken';
|
|
6
5
|
import { LoggerInstance } from '@navios/core';
|
|
7
6
|
import { objectInputType } from 'zod';
|
|
8
7
|
import { objectOutputType } from 'zod';
|
|
9
|
-
import { RequestType as RequestType_2 } from './options/jwt-service.options.mjs';
|
|
10
8
|
import type { Secret as Secret_2 } from 'jsonwebtoken';
|
|
11
9
|
import { z } from 'zod';
|
|
12
10
|
import { ZodAny } from 'zod';
|
|
@@ -95,12 +93,6 @@ declare class JwtService {
|
|
|
95
93
|
export { JwtService }
|
|
96
94
|
export { JwtService as JwtService_alias_1 }
|
|
97
95
|
|
|
98
|
-
declare class JwtServiceFactory {
|
|
99
|
-
create(ctx: FactoryContext, args: JwtServiceOptions): Promise<JwtService>;
|
|
100
|
-
}
|
|
101
|
-
export { JwtServiceFactory }
|
|
102
|
-
export { JwtServiceFactory as JwtServiceFactory_alias_1 }
|
|
103
|
-
|
|
104
96
|
declare type JwtServiceOptions = z.infer<typeof JwtServiceOptionsSchema>;
|
|
105
97
|
export { JwtServiceOptions }
|
|
106
98
|
export { JwtServiceOptions as JwtServiceOptions_alias_1 }
|
|
@@ -111,7 +103,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
111
103
|
keyid: z.ZodOptional<z.ZodString>;
|
|
112
104
|
expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
113
105
|
notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
114
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
106
|
+
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
|
|
115
107
|
subject: z.ZodOptional<z.ZodString>;
|
|
116
108
|
issuer: z.ZodOptional<z.ZodString>;
|
|
117
109
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
@@ -159,7 +151,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
159
151
|
keyid?: string | undefined;
|
|
160
152
|
expiresIn?: string | number | undefined;
|
|
161
153
|
notBefore?: string | number | undefined;
|
|
162
|
-
audience?: string | string[] | undefined;
|
|
154
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
163
155
|
subject?: string | undefined;
|
|
164
156
|
issuer?: string | undefined;
|
|
165
157
|
jwtid?: string | undefined;
|
|
@@ -185,7 +177,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
185
177
|
keyid?: string | undefined;
|
|
186
178
|
expiresIn?: string | number | undefined;
|
|
187
179
|
notBefore?: string | number | undefined;
|
|
188
|
-
audience?: string | string[] | undefined;
|
|
180
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
189
181
|
subject?: string | undefined;
|
|
190
182
|
issuer?: string | undefined;
|
|
191
183
|
jwtid?: string | undefined;
|
|
@@ -227,7 +219,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
227
219
|
}>]>>;
|
|
228
220
|
verifyOptions: z.ZodOptional<z.ZodObject<{
|
|
229
221
|
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
|
|
230
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
|
|
222
|
+
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
|
|
231
223
|
clockTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
232
224
|
clockTolerance: z.ZodOptional<z.ZodNumber>;
|
|
233
225
|
complete: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -240,7 +232,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
240
232
|
maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
241
233
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
242
234
|
}, "strip", z.ZodTypeAny, {
|
|
243
|
-
audience?: string | RegExp | string[] | undefined;
|
|
235
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
244
236
|
subject?: string | undefined;
|
|
245
237
|
issuer?: string | string[] | undefined;
|
|
246
238
|
jwtid?: string | undefined;
|
|
@@ -254,7 +246,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
254
246
|
nonce?: string | undefined;
|
|
255
247
|
maxAge?: string | number | undefined;
|
|
256
248
|
}, {
|
|
257
|
-
audience?: string | RegExp | string[] | undefined;
|
|
249
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
258
250
|
subject?: string | undefined;
|
|
259
251
|
issuer?: string | string[] | undefined;
|
|
260
252
|
jwtid?: string | undefined;
|
|
@@ -273,7 +265,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
273
265
|
keyid: z.ZodOptional<z.ZodString>;
|
|
274
266
|
expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
275
267
|
notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
276
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
268
|
+
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
|
|
277
269
|
subject: z.ZodOptional<z.ZodString>;
|
|
278
270
|
issuer: z.ZodOptional<z.ZodString>;
|
|
279
271
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
@@ -321,7 +313,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
321
313
|
keyid?: string | undefined;
|
|
322
314
|
expiresIn?: string | number | undefined;
|
|
323
315
|
notBefore?: string | number | undefined;
|
|
324
|
-
audience?: string | string[] | undefined;
|
|
316
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
325
317
|
subject?: string | undefined;
|
|
326
318
|
issuer?: string | undefined;
|
|
327
319
|
jwtid?: string | undefined;
|
|
@@ -347,7 +339,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
347
339
|
keyid?: string | undefined;
|
|
348
340
|
expiresIn?: string | number | undefined;
|
|
349
341
|
notBefore?: string | number | undefined;
|
|
350
|
-
audience?: string | string[] | undefined;
|
|
342
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
351
343
|
subject?: string | undefined;
|
|
352
344
|
issuer?: string | undefined;
|
|
353
345
|
jwtid?: string | undefined;
|
|
@@ -370,7 +362,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
370
362
|
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
371
363
|
}>, z.ZodObject<{
|
|
372
364
|
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
|
|
373
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
|
|
365
|
+
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
|
|
374
366
|
clockTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
375
367
|
clockTolerance: z.ZodOptional<z.ZodNumber>;
|
|
376
368
|
complete: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -383,7 +375,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
383
375
|
maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
384
376
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
385
377
|
}, "strip", z.ZodTypeAny, {
|
|
386
|
-
audience?: string | RegExp | string[] | undefined;
|
|
378
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
387
379
|
subject?: string | undefined;
|
|
388
380
|
issuer?: string | string[] | undefined;
|
|
389
381
|
jwtid?: string | undefined;
|
|
@@ -397,7 +389,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
397
389
|
nonce?: string | undefined;
|
|
398
390
|
maxAge?: string | number | undefined;
|
|
399
391
|
}, {
|
|
400
|
-
audience?: string | RegExp | string[] | undefined;
|
|
392
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
401
393
|
subject?: string | undefined;
|
|
402
394
|
issuer?: string | string[] | undefined;
|
|
403
395
|
jwtid?: string | undefined;
|
|
@@ -447,7 +439,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
447
439
|
keyid?: string | undefined;
|
|
448
440
|
expiresIn?: string | number | undefined;
|
|
449
441
|
notBefore?: string | number | undefined;
|
|
450
|
-
audience?: string | string[] | undefined;
|
|
442
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
451
443
|
subject?: string | undefined;
|
|
452
444
|
issuer?: string | undefined;
|
|
453
445
|
jwtid?: string | undefined;
|
|
@@ -478,7 +470,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
478
470
|
passphrase: string;
|
|
479
471
|
} | undefined;
|
|
480
472
|
verifyOptions?: {
|
|
481
|
-
audience?: string | RegExp | string[] | undefined;
|
|
473
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
482
474
|
subject?: string | undefined;
|
|
483
475
|
issuer?: string | string[] | undefined;
|
|
484
476
|
jwtid?: string | undefined;
|
|
@@ -497,7 +489,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
497
489
|
keyid?: string | undefined;
|
|
498
490
|
expiresIn?: string | number | undefined;
|
|
499
491
|
notBefore?: string | number | undefined;
|
|
500
|
-
audience?: string | string[] | undefined;
|
|
492
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
501
493
|
subject?: string | undefined;
|
|
502
494
|
issuer?: string | undefined;
|
|
503
495
|
jwtid?: string | undefined;
|
|
@@ -519,7 +511,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
519
511
|
allowInsecureKeySizes?: boolean | undefined;
|
|
520
512
|
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
521
513
|
} | {
|
|
522
|
-
audience?: string | RegExp | string[] | undefined;
|
|
514
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
523
515
|
subject?: string | undefined;
|
|
524
516
|
issuer?: string | string[] | undefined;
|
|
525
517
|
jwtid?: string | undefined;
|
|
@@ -549,7 +541,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
549
541
|
keyid?: string | undefined;
|
|
550
542
|
expiresIn?: string | number | undefined;
|
|
551
543
|
notBefore?: string | number | undefined;
|
|
552
|
-
audience?: string | string[] | undefined;
|
|
544
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
553
545
|
subject?: string | undefined;
|
|
554
546
|
issuer?: string | undefined;
|
|
555
547
|
jwtid?: string | undefined;
|
|
@@ -580,7 +572,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
580
572
|
passphrase: string;
|
|
581
573
|
} | undefined;
|
|
582
574
|
verifyOptions?: {
|
|
583
|
-
audience?: string | RegExp | string[] | undefined;
|
|
575
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
584
576
|
subject?: string | undefined;
|
|
585
577
|
issuer?: string | string[] | undefined;
|
|
586
578
|
jwtid?: string | undefined;
|
|
@@ -599,7 +591,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
599
591
|
keyid?: string | undefined;
|
|
600
592
|
expiresIn?: string | number | undefined;
|
|
601
593
|
notBefore?: string | number | undefined;
|
|
602
|
-
audience?: string | string[] | undefined;
|
|
594
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
603
595
|
subject?: string | undefined;
|
|
604
596
|
issuer?: string | undefined;
|
|
605
597
|
jwtid?: string | undefined;
|
|
@@ -621,7 +613,7 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
621
613
|
allowInsecureKeySizes?: boolean | undefined;
|
|
622
614
|
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
623
615
|
} | {
|
|
624
|
-
audience?: string | RegExp | string[] | undefined;
|
|
616
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
625
617
|
subject?: string | undefined;
|
|
626
618
|
issuer?: string | string[] | undefined;
|
|
627
619
|
jwtid?: string | undefined;
|
|
@@ -649,13 +641,13 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
|
|
|
649
641
|
export { JwtServiceOptionsSchema }
|
|
650
642
|
export { JwtServiceOptionsSchema as JwtServiceOptionsSchema_alias_1 }
|
|
651
643
|
|
|
652
|
-
declare const JwtServiceToken: InjectionToken<
|
|
644
|
+
declare const JwtServiceToken: InjectionToken<unknown, ZodObject< {
|
|
653
645
|
signOptions: ZodOptional<ZodObject< {
|
|
654
646
|
algorithm: ZodOptional<ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
|
|
655
647
|
keyid: ZodOptional<ZodString>;
|
|
656
648
|
expiresIn: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
|
|
657
649
|
notBefore: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
|
|
658
|
-
audience: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
|
|
650
|
+
audience: ZodOptional<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>, ZodArray<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>]>, "many">]>>;
|
|
659
651
|
subject: ZodOptional<ZodString>;
|
|
660
652
|
issuer: ZodOptional<ZodString>;
|
|
661
653
|
jwtid: ZodOptional<ZodString>;
|
|
@@ -703,7 +695,7 @@ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256"
|
|
|
703
695
|
keyid?: string | undefined;
|
|
704
696
|
expiresIn?: string | number | undefined;
|
|
705
697
|
notBefore?: string | number | undefined;
|
|
706
|
-
audience?: string | string[] | undefined;
|
|
698
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
707
699
|
subject?: string | undefined;
|
|
708
700
|
issuer?: string | undefined;
|
|
709
701
|
jwtid?: string | undefined;
|
|
@@ -729,7 +721,7 @@ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256"
|
|
|
729
721
|
keyid?: string | undefined;
|
|
730
722
|
expiresIn?: string | number | undefined;
|
|
731
723
|
notBefore?: string | number | undefined;
|
|
732
|
-
audience?: string | string[] | undefined;
|
|
724
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
733
725
|
subject?: string | undefined;
|
|
734
726
|
issuer?: string | undefined;
|
|
735
727
|
jwtid?: string | undefined;
|
|
@@ -771,7 +763,7 @@ passphrase: string;
|
|
|
771
763
|
}>]>>;
|
|
772
764
|
verifyOptions: ZodOptional<ZodObject< {
|
|
773
765
|
algorithms: ZodOptional<ZodArray<ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
|
|
774
|
-
audience: ZodOptional<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>, ZodArray<ZodString, "many">]>>;
|
|
766
|
+
audience: ZodOptional<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>, ZodArray<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>]>, "many">]>>;
|
|
775
767
|
clockTimestamp: ZodOptional<ZodNumber>;
|
|
776
768
|
clockTolerance: ZodOptional<ZodNumber>;
|
|
777
769
|
complete: ZodOptional<ZodBoolean>;
|
|
@@ -784,7 +776,7 @@ subject: ZodOptional<ZodString>;
|
|
|
784
776
|
maxAge: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
|
|
785
777
|
allowInvalidAsymmetricKeyTypes: ZodOptional<ZodBoolean>;
|
|
786
778
|
}, "strip", ZodTypeAny, {
|
|
787
|
-
audience?: string | RegExp | string[] | undefined;
|
|
779
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
788
780
|
subject?: string | undefined;
|
|
789
781
|
issuer?: string | string[] | undefined;
|
|
790
782
|
jwtid?: string | undefined;
|
|
@@ -798,7 +790,7 @@ ignoreNotBefore?: boolean | undefined;
|
|
|
798
790
|
nonce?: string | undefined;
|
|
799
791
|
maxAge?: string | number | undefined;
|
|
800
792
|
}, {
|
|
801
|
-
audience?: string | RegExp | string[] | undefined;
|
|
793
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
802
794
|
subject?: string | undefined;
|
|
803
795
|
issuer?: string | string[] | undefined;
|
|
804
796
|
jwtid?: string | undefined;
|
|
@@ -812,12 +804,12 @@ ignoreNotBefore?: boolean | undefined;
|
|
|
812
804
|
nonce?: string | undefined;
|
|
813
805
|
maxAge?: string | number | undefined;
|
|
814
806
|
}>>;
|
|
815
|
-
secretOrKeyProvider: ZodOptional<ZodFunction<ZodTuple<[ZodNativeEnum<
|
|
807
|
+
secretOrKeyProvider: ZodOptional<ZodFunction<ZodTuple<[ZodNativeEnum<typeof RequestType>, ZodAny, ZodOptional<ZodUnion<[ZodObject< {
|
|
816
808
|
algorithm: ZodOptional<ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
|
|
817
809
|
keyid: ZodOptional<ZodString>;
|
|
818
810
|
expiresIn: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
|
|
819
811
|
notBefore: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
|
|
820
|
-
audience: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
|
|
812
|
+
audience: ZodOptional<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>, ZodArray<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>]>, "many">]>>;
|
|
821
813
|
subject: ZodOptional<ZodString>;
|
|
822
814
|
issuer: ZodOptional<ZodString>;
|
|
823
815
|
jwtid: ZodOptional<ZodString>;
|
|
@@ -865,7 +857,7 @@ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256"
|
|
|
865
857
|
keyid?: string | undefined;
|
|
866
858
|
expiresIn?: string | number | undefined;
|
|
867
859
|
notBefore?: string | number | undefined;
|
|
868
|
-
audience?: string | string[] | undefined;
|
|
860
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
869
861
|
subject?: string | undefined;
|
|
870
862
|
issuer?: string | undefined;
|
|
871
863
|
jwtid?: string | undefined;
|
|
@@ -891,7 +883,7 @@ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256"
|
|
|
891
883
|
keyid?: string | undefined;
|
|
892
884
|
expiresIn?: string | number | undefined;
|
|
893
885
|
notBefore?: string | number | undefined;
|
|
894
|
-
audience?: string | string[] | undefined;
|
|
886
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
895
887
|
subject?: string | undefined;
|
|
896
888
|
issuer?: string | undefined;
|
|
897
889
|
jwtid?: string | undefined;
|
|
@@ -914,7 +906,7 @@ allowInsecureKeySizes?: boolean | undefined;
|
|
|
914
906
|
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
915
907
|
}>, ZodObject< {
|
|
916
908
|
algorithms: ZodOptional<ZodArray<ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
|
|
917
|
-
audience: ZodOptional<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>, ZodArray<ZodString, "many">]>>;
|
|
909
|
+
audience: ZodOptional<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>, ZodArray<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>]>, "many">]>>;
|
|
918
910
|
clockTimestamp: ZodOptional<ZodNumber>;
|
|
919
911
|
clockTolerance: ZodOptional<ZodNumber>;
|
|
920
912
|
complete: ZodOptional<ZodBoolean>;
|
|
@@ -927,7 +919,7 @@ subject: ZodOptional<ZodString>;
|
|
|
927
919
|
maxAge: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
|
|
928
920
|
allowInvalidAsymmetricKeyTypes: ZodOptional<ZodBoolean>;
|
|
929
921
|
}, "strip", ZodTypeAny, {
|
|
930
|
-
audience?: string | RegExp | string[] | undefined;
|
|
922
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
931
923
|
subject?: string | undefined;
|
|
932
924
|
issuer?: string | string[] | undefined;
|
|
933
925
|
jwtid?: string | undefined;
|
|
@@ -941,7 +933,7 @@ ignoreNotBefore?: boolean | undefined;
|
|
|
941
933
|
nonce?: string | undefined;
|
|
942
934
|
maxAge?: string | number | undefined;
|
|
943
935
|
}, {
|
|
944
|
-
audience?: string | RegExp | string[] | undefined;
|
|
936
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
945
937
|
subject?: string | undefined;
|
|
946
938
|
issuer?: string | string[] | undefined;
|
|
947
939
|
jwtid?: string | undefined;
|
|
@@ -991,7 +983,7 @@ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256"
|
|
|
991
983
|
keyid?: string | undefined;
|
|
992
984
|
expiresIn?: string | number | undefined;
|
|
993
985
|
notBefore?: string | number | undefined;
|
|
994
|
-
audience?: string | string[] | undefined;
|
|
986
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
995
987
|
subject?: string | undefined;
|
|
996
988
|
issuer?: string | undefined;
|
|
997
989
|
jwtid?: string | undefined;
|
|
@@ -1022,7 +1014,7 @@ key: string | Buffer<ArrayBufferLike>;
|
|
|
1022
1014
|
passphrase: string;
|
|
1023
1015
|
} | undefined;
|
|
1024
1016
|
verifyOptions?: {
|
|
1025
|
-
audience?: string | RegExp | string[] | undefined;
|
|
1017
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1026
1018
|
subject?: string | undefined;
|
|
1027
1019
|
issuer?: string | string[] | undefined;
|
|
1028
1020
|
jwtid?: string | undefined;
|
|
@@ -1036,12 +1028,12 @@ ignoreNotBefore?: boolean | undefined;
|
|
|
1036
1028
|
nonce?: string | undefined;
|
|
1037
1029
|
maxAge?: string | number | undefined;
|
|
1038
1030
|
} | undefined;
|
|
1039
|
-
secretOrKeyProvider?: ((args_0:
|
|
1031
|
+
secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
|
|
1040
1032
|
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
1041
1033
|
keyid?: string | undefined;
|
|
1042
1034
|
expiresIn?: string | number | undefined;
|
|
1043
1035
|
notBefore?: string | number | undefined;
|
|
1044
|
-
audience?: string | string[] | undefined;
|
|
1036
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1045
1037
|
subject?: string | undefined;
|
|
1046
1038
|
issuer?: string | undefined;
|
|
1047
1039
|
jwtid?: string | undefined;
|
|
@@ -1063,7 +1055,7 @@ encoding?: string | undefined;
|
|
|
1063
1055
|
allowInsecureKeySizes?: boolean | undefined;
|
|
1064
1056
|
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
1065
1057
|
} | {
|
|
1066
|
-
audience?: string | RegExp | string[] | undefined;
|
|
1058
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1067
1059
|
subject?: string | undefined;
|
|
1068
1060
|
issuer?: string | string[] | undefined;
|
|
1069
1061
|
jwtid?: string | undefined;
|
|
@@ -1093,7 +1085,7 @@ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256"
|
|
|
1093
1085
|
keyid?: string | undefined;
|
|
1094
1086
|
expiresIn?: string | number | undefined;
|
|
1095
1087
|
notBefore?: string | number | undefined;
|
|
1096
|
-
audience?: string | string[] | undefined;
|
|
1088
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1097
1089
|
subject?: string | undefined;
|
|
1098
1090
|
issuer?: string | undefined;
|
|
1099
1091
|
jwtid?: string | undefined;
|
|
@@ -1124,7 +1116,7 @@ key: string | Buffer<ArrayBufferLike>;
|
|
|
1124
1116
|
passphrase: string;
|
|
1125
1117
|
} | undefined;
|
|
1126
1118
|
verifyOptions?: {
|
|
1127
|
-
audience?: string | RegExp | string[] | undefined;
|
|
1119
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1128
1120
|
subject?: string | undefined;
|
|
1129
1121
|
issuer?: string | string[] | undefined;
|
|
1130
1122
|
jwtid?: string | undefined;
|
|
@@ -1138,12 +1130,12 @@ ignoreNotBefore?: boolean | undefined;
|
|
|
1138
1130
|
nonce?: string | undefined;
|
|
1139
1131
|
maxAge?: string | number | undefined;
|
|
1140
1132
|
} | undefined;
|
|
1141
|
-
secretOrKeyProvider?: ((args_0:
|
|
1133
|
+
secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
|
|
1142
1134
|
algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
|
|
1143
1135
|
keyid?: string | undefined;
|
|
1144
1136
|
expiresIn?: string | number | undefined;
|
|
1145
1137
|
notBefore?: string | number | undefined;
|
|
1146
|
-
audience?: string | string[] | undefined;
|
|
1138
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1147
1139
|
subject?: string | undefined;
|
|
1148
1140
|
issuer?: string | undefined;
|
|
1149
1141
|
jwtid?: string | undefined;
|
|
@@ -1165,7 +1157,7 @@ encoding?: string | undefined;
|
|
|
1165
1157
|
allowInsecureKeySizes?: boolean | undefined;
|
|
1166
1158
|
allowInvalidAsymmetricKeyTypes?: boolean | undefined;
|
|
1167
1159
|
} | {
|
|
1168
|
-
audience?: string | RegExp | string[] | undefined;
|
|
1160
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1169
1161
|
subject?: string | undefined;
|
|
1170
1162
|
issuer?: string | string[] | undefined;
|
|
1171
1163
|
jwtid?: string | undefined;
|
|
@@ -1189,7 +1181,7 @@ type: ZodString;
|
|
|
1189
1181
|
key: string | Buffer<ArrayBufferLike>;
|
|
1190
1182
|
passphrase: string;
|
|
1191
1183
|
}>) | undefined;
|
|
1192
|
-
}
|
|
1184
|
+
}>, true>;
|
|
1193
1185
|
export { JwtServiceToken }
|
|
1194
1186
|
export { JwtServiceToken as JwtServiceToken_alias_1 }
|
|
1195
1187
|
|
|
@@ -1209,7 +1201,9 @@ export { JwtVerifyOptions as JwtVerifyOptions_alias_1 }
|
|
|
1209
1201
|
|
|
1210
1202
|
export declare const NotBeforeError: typeof jwt.NotBeforeError;
|
|
1211
1203
|
|
|
1212
|
-
declare function provideJwtService(config: JwtServiceOptions
|
|
1204
|
+
declare function provideJwtService(config: JwtServiceOptions): BoundInjectionToken<JwtService, typeof JwtServiceOptionsSchema>;
|
|
1205
|
+
|
|
1206
|
+
declare function provideJwtService(config: () => Promise<JwtServiceOptions>): FactoryInjectionToken<JwtService, typeof JwtServiceOptionsSchema>;
|
|
1213
1207
|
export { provideJwtService }
|
|
1214
1208
|
export { provideJwtService as provideJwtService_alias_1 }
|
|
1215
1209
|
|
|
@@ -1252,7 +1246,7 @@ declare const SignOptionsSchema: z.ZodObject<{
|
|
|
1252
1246
|
keyid: z.ZodOptional<z.ZodString>;
|
|
1253
1247
|
expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1254
1248
|
notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1255
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1249
|
+
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
|
|
1256
1250
|
subject: z.ZodOptional<z.ZodString>;
|
|
1257
1251
|
issuer: z.ZodOptional<z.ZodString>;
|
|
1258
1252
|
jwtid: z.ZodOptional<z.ZodString>;
|
|
@@ -1300,7 +1294,7 @@ declare const SignOptionsSchema: z.ZodObject<{
|
|
|
1300
1294
|
keyid?: string | undefined;
|
|
1301
1295
|
expiresIn?: string | number | undefined;
|
|
1302
1296
|
notBefore?: string | number | undefined;
|
|
1303
|
-
audience?: string | string[] | undefined;
|
|
1297
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1304
1298
|
subject?: string | undefined;
|
|
1305
1299
|
issuer?: string | undefined;
|
|
1306
1300
|
jwtid?: string | undefined;
|
|
@@ -1326,7 +1320,7 @@ declare const SignOptionsSchema: z.ZodObject<{
|
|
|
1326
1320
|
keyid?: string | undefined;
|
|
1327
1321
|
expiresIn?: string | number | undefined;
|
|
1328
1322
|
notBefore?: string | number | undefined;
|
|
1329
|
-
audience?: string | string[] | undefined;
|
|
1323
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1330
1324
|
subject?: string | undefined;
|
|
1331
1325
|
issuer?: string | undefined;
|
|
1332
1326
|
jwtid?: string | undefined;
|
|
@@ -1359,7 +1353,7 @@ export { VerifyOptions as VerifyOptions_alias_1 }
|
|
|
1359
1353
|
|
|
1360
1354
|
declare const VerifyOptionsSchema: z.ZodObject<{
|
|
1361
1355
|
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
|
|
1362
|
-
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
|
|
1356
|
+
audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
|
|
1363
1357
|
clockTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
1364
1358
|
clockTolerance: z.ZodOptional<z.ZodNumber>;
|
|
1365
1359
|
complete: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1372,7 +1366,7 @@ declare const VerifyOptionsSchema: z.ZodObject<{
|
|
|
1372
1366
|
maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1373
1367
|
allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
|
|
1374
1368
|
}, "strip", z.ZodTypeAny, {
|
|
1375
|
-
audience?: string | RegExp | string[] | undefined;
|
|
1369
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1376
1370
|
subject?: string | undefined;
|
|
1377
1371
|
issuer?: string | string[] | undefined;
|
|
1378
1372
|
jwtid?: string | undefined;
|
|
@@ -1386,7 +1380,7 @@ declare const VerifyOptionsSchema: z.ZodObject<{
|
|
|
1386
1380
|
nonce?: string | undefined;
|
|
1387
1381
|
maxAge?: string | number | undefined;
|
|
1388
1382
|
}, {
|
|
1389
|
-
audience?: string | RegExp | string[] | undefined;
|
|
1383
|
+
audience?: string | RegExp | (string | RegExp)[] | undefined;
|
|
1390
1384
|
subject?: string | undefined;
|
|
1391
1385
|
issuer?: string | string[] | undefined;
|
|
1392
1386
|
jwtid?: string | undefined;
|