@navios/jwt 0.1.1 → 0.3.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.
@@ -1,14 +1,44 @@
1
- import jwt, { Secret as Secret$1 } from 'jsonwebtoken';
2
- import * as zod from 'zod';
1
+ import type { BoundInjectionToken } from '@navios/core';
2
+ import type { FactoryInjectionToken } from '@navios/core';
3
+ import { InjectionToken } from '@navios/core';
4
+ import jwt from 'jsonwebtoken';
5
+ import { LoggerInstance } from '@navios/core';
6
+ import { objectInputType } from 'zod';
7
+ import { objectOutputType } from 'zod';
8
+ import type { Secret as Secret_2 } from 'jsonwebtoken';
3
9
  import { z } from 'zod';
4
- import * as _navios_core from '@navios/core';
5
- import { InjectionToken, ServiceLocatorAbstractFactoryContext } from '@navios/core';
10
+ import { ZodAny } from 'zod';
11
+ import { ZodArray } from 'zod';
12
+ import { ZodBoolean } from 'zod';
13
+ import { ZodEnum } from 'zod';
14
+ import { ZodFunction } from 'zod';
15
+ import { ZodNativeEnum } from 'zod';
16
+ import { ZodNumber } from 'zod';
17
+ import { ZodObject } from 'zod';
18
+ import { ZodOptional } from 'zod';
19
+ import { ZodPromise } from 'zod';
20
+ import { ZodString } from 'zod';
21
+ import { ZodTuple } from 'zod';
22
+ import { ZodType } from 'zod';
23
+ import { ZodTypeAny } from 'zod';
24
+ import { ZodTypeDef } from 'zod';
25
+ import { ZodUnion } from 'zod';
26
+ import { ZodUnknown } from 'zod';
6
27
 
7
- declare enum RequestType {
8
- Sign = "Sign",
9
- Verify = "Verify"
10
- }
11
28
  declare const AlgorithmType: z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>;
29
+ export { AlgorithmType }
30
+ export { AlgorithmType as AlgorithmType_alias_1 }
31
+
32
+ declare type GetSecretKeyResult = string | Buffer | Secret_2;
33
+ export { GetSecretKeyResult }
34
+ export { GetSecretKeyResult as GetSecretKeyResult_alias_1 }
35
+
36
+ export declare const JsonWebTokenError: typeof jwt.JsonWebTokenError;
37
+
38
+ declare type JwtHeader = z.infer<typeof JwtHeaderSchema>;
39
+ export { JwtHeader }
40
+ export { JwtHeader as JwtHeader_alias_1 }
41
+
12
42
  declare const JwtHeaderSchema: z.ZodObject<{
13
43
  alg: z.ZodUnion<[z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, z.ZodString]>;
14
44
  typ: z.ZodOptional<z.ZodString>;
@@ -43,170 +73,30 @@ declare const JwtHeaderSchema: z.ZodObject<{
43
73
  x5t?: string | undefined;
44
74
  x5c?: string | string[] | undefined;
45
75
  }>;
46
- type JwtHeader = z.infer<typeof JwtHeaderSchema>;
47
- declare const SignOptionsSchema: z.ZodObject<{
48
- algorithm: z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
49
- keyid: z.ZodOptional<z.ZodString>;
50
- expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
51
- notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
52
- audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
53
- subject: z.ZodOptional<z.ZodString>;
54
- issuer: z.ZodOptional<z.ZodString>;
55
- jwtid: z.ZodOptional<z.ZodString>;
56
- mutatePayload: z.ZodOptional<z.ZodBoolean>;
57
- noTimestamp: z.ZodOptional<z.ZodBoolean>;
58
- header: z.ZodOptional<z.ZodObject<{
59
- alg: z.ZodUnion<[z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, z.ZodString]>;
60
- typ: z.ZodOptional<z.ZodString>;
61
- cty: z.ZodOptional<z.ZodString>;
62
- crit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
63
- kid: z.ZodOptional<z.ZodString>;
64
- jku: z.ZodOptional<z.ZodString>;
65
- x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
66
- 'x5t#S256': z.ZodOptional<z.ZodString>;
67
- x5t: z.ZodOptional<z.ZodString>;
68
- x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
69
- }, "strip", z.ZodTypeAny, {
70
- alg: string;
71
- typ?: string | undefined;
72
- cty?: string | undefined;
73
- crit?: string[] | undefined;
74
- kid?: string | undefined;
75
- jku?: string | undefined;
76
- x5u?: string | string[] | undefined;
77
- 'x5t#S256'?: string | undefined;
78
- x5t?: string | undefined;
79
- x5c?: string | string[] | undefined;
80
- }, {
81
- alg: string;
82
- typ?: string | undefined;
83
- cty?: string | undefined;
84
- crit?: string[] | undefined;
85
- kid?: string | undefined;
86
- jku?: string | undefined;
87
- x5u?: string | string[] | undefined;
88
- 'x5t#S256'?: string | undefined;
89
- x5t?: string | undefined;
90
- x5c?: string | string[] | undefined;
91
- }>>;
92
- encoding: z.ZodOptional<z.ZodString>;
93
- allowInsecureKeySizes: z.ZodOptional<z.ZodBoolean>;
94
- allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
95
- }, "strip", z.ZodTypeAny, {
96
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
97
- keyid?: string | undefined;
98
- expiresIn?: string | number | undefined;
99
- notBefore?: string | number | undefined;
100
- audience?: string | string[] | undefined;
101
- subject?: string | undefined;
102
- issuer?: string | undefined;
103
- jwtid?: string | undefined;
104
- mutatePayload?: boolean | undefined;
105
- noTimestamp?: boolean | undefined;
106
- header?: {
107
- alg: string;
108
- typ?: string | undefined;
109
- cty?: string | undefined;
110
- crit?: string[] | undefined;
111
- kid?: string | undefined;
112
- jku?: string | undefined;
113
- x5u?: string | string[] | undefined;
114
- 'x5t#S256'?: string | undefined;
115
- x5t?: string | undefined;
116
- x5c?: string | string[] | undefined;
117
- } | undefined;
118
- encoding?: string | undefined;
119
- allowInsecureKeySizes?: boolean | undefined;
120
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
121
- }, {
122
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
123
- keyid?: string | undefined;
124
- expiresIn?: string | number | undefined;
125
- notBefore?: string | number | undefined;
126
- audience?: string | string[] | undefined;
127
- subject?: string | undefined;
128
- issuer?: string | undefined;
129
- jwtid?: string | undefined;
130
- mutatePayload?: boolean | undefined;
131
- noTimestamp?: boolean | undefined;
132
- header?: {
133
- alg: string;
134
- typ?: string | undefined;
135
- cty?: string | undefined;
136
- crit?: string[] | undefined;
137
- kid?: string | undefined;
138
- jku?: string | undefined;
139
- x5u?: string | string[] | undefined;
140
- 'x5t#S256'?: string | undefined;
141
- x5t?: string | undefined;
142
- x5c?: string | string[] | undefined;
143
- } | undefined;
144
- encoding?: string | undefined;
145
- allowInsecureKeySizes?: boolean | undefined;
146
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
147
- }>;
148
- type SignOptions = z.infer<typeof SignOptionsSchema>;
149
- declare const VerifyOptionsSchema: z.ZodObject<{
150
- algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
151
- audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
152
- clockTimestamp: z.ZodOptional<z.ZodNumber>;
153
- clockTolerance: z.ZodOptional<z.ZodNumber>;
154
- complete: z.ZodOptional<z.ZodBoolean>;
155
- issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
156
- ignoreExpiration: z.ZodOptional<z.ZodBoolean>;
157
- ignoreNotBefore: z.ZodOptional<z.ZodBoolean>;
158
- jwtid: z.ZodOptional<z.ZodString>;
159
- nonce: z.ZodOptional<z.ZodString>;
160
- subject: z.ZodOptional<z.ZodString>;
161
- maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
162
- allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
163
- }, "strip", z.ZodTypeAny, {
164
- audience?: string | RegExp | string[] | undefined;
165
- subject?: string | undefined;
166
- issuer?: string | string[] | undefined;
167
- jwtid?: string | undefined;
168
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
169
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
170
- clockTimestamp?: number | undefined;
171
- clockTolerance?: number | undefined;
172
- complete?: boolean | undefined;
173
- ignoreExpiration?: boolean | undefined;
174
- ignoreNotBefore?: boolean | undefined;
175
- nonce?: string | undefined;
176
- maxAge?: string | number | undefined;
177
- }, {
178
- audience?: string | RegExp | string[] | undefined;
179
- subject?: string | undefined;
180
- issuer?: string | string[] | undefined;
181
- jwtid?: string | undefined;
182
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
183
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
184
- clockTimestamp?: number | undefined;
185
- clockTolerance?: number | undefined;
186
- complete?: boolean | undefined;
187
- ignoreExpiration?: boolean | undefined;
188
- ignoreNotBefore?: boolean | undefined;
189
- nonce?: string | undefined;
190
- maxAge?: string | number | undefined;
191
- }>;
192
- type VerifyOptions = z.infer<typeof VerifyOptionsSchema>;
193
- declare const SecretSchema: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodObject<{
194
- type: z.ZodString;
195
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
196
- type: z.ZodString;
197
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
198
- type: z.ZodString;
199
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
200
- key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
201
- passphrase: z.ZodString;
202
- }, "strip", z.ZodTypeAny, {
203
- key: string | Buffer<ArrayBufferLike>;
204
- passphrase: string;
205
- }, {
206
- key: string | Buffer<ArrayBufferLike>;
207
- passphrase: string;
208
- }>]>;
209
- type Secret = z.infer<typeof SecretSchema>;
76
+ export { JwtHeaderSchema }
77
+ export { JwtHeaderSchema as JwtHeaderSchema_alias_1 }
78
+
79
+ declare class JwtService {
80
+ private readonly options;
81
+ logger: LoggerInstance;
82
+ constructor(options?: JwtServiceOptions);
83
+ sign(payload: string, options?: Omit<JwtSignOptions, keyof SignOptions>): string;
84
+ sign(payload: Buffer | object, options?: JwtSignOptions): string;
85
+ signAsync(payload: string, options?: Omit<JwtSignOptions, keyof jwt.SignOptions>): Promise<string>;
86
+ signAsync(payload: Buffer | object, options?: JwtSignOptions): Promise<string>;
87
+ verify<T extends object = any>(token: string, options?: JwtVerifyOptions): T;
88
+ verifyAsync<T extends object = any>(token: string, options?: JwtVerifyOptions): Promise<T>;
89
+ decode<T = any>(token: string, options?: jwt.DecodeOptions): T;
90
+ private mergeJwtOptions;
91
+ private getSecretKey;
92
+ }
93
+ export { JwtService }
94
+ export { JwtService as JwtService_alias_1 }
95
+
96
+ declare type JwtServiceOptions = z.infer<typeof JwtServiceOptionsSchema>;
97
+ export { JwtServiceOptions }
98
+ export { JwtServiceOptions as JwtServiceOptions_alias_1 }
99
+
210
100
  declare const JwtServiceOptionsSchema: z.ZodObject<{
211
101
  signOptions: z.ZodOptional<z.ZodObject<{
212
102
  algorithm: z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
@@ -748,580 +638,761 @@ declare const JwtServiceOptionsSchema: z.ZodObject<{
748
638
  passphrase: string;
749
639
  }>) | undefined;
750
640
  }>;
751
- type JwtServiceOptions = z.infer<typeof JwtServiceOptionsSchema>;
752
- interface JwtSignOptions extends SignOptions {
641
+ export { JwtServiceOptionsSchema }
642
+ export { JwtServiceOptionsSchema as JwtServiceOptionsSchema_alias_1 }
643
+
644
+ declare const JwtServiceToken: InjectionToken<unknown, ZodObject< {
645
+ signOptions: ZodOptional<ZodObject< {
646
+ algorithm: ZodOptional<ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
647
+ keyid: ZodOptional<ZodString>;
648
+ expiresIn: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
649
+ notBefore: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
650
+ audience: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
651
+ subject: ZodOptional<ZodString>;
652
+ issuer: ZodOptional<ZodString>;
653
+ jwtid: ZodOptional<ZodString>;
654
+ mutatePayload: ZodOptional<ZodBoolean>;
655
+ noTimestamp: ZodOptional<ZodBoolean>;
656
+ header: ZodOptional<ZodObject< {
657
+ alg: ZodUnion<[ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, ZodString]>;
658
+ typ: ZodOptional<ZodString>;
659
+ cty: ZodOptional<ZodString>;
660
+ crit: ZodOptional<ZodArray<ZodString, "many">>;
661
+ kid: ZodOptional<ZodString>;
662
+ jku: ZodOptional<ZodString>;
663
+ x5u: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
664
+ 'x5t#S256': ZodOptional<ZodString>;
665
+ x5t: ZodOptional<ZodString>;
666
+ x5c: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
667
+ }, "strip", ZodTypeAny, {
668
+ alg: string;
669
+ typ?: string | undefined;
670
+ cty?: string | undefined;
671
+ crit?: string[] | undefined;
672
+ kid?: string | undefined;
673
+ jku?: string | undefined;
674
+ x5u?: string | string[] | undefined;
675
+ 'x5t#S256'?: string | undefined;
676
+ x5t?: string | undefined;
677
+ x5c?: string | string[] | undefined;
678
+ }, {
679
+ alg: string;
680
+ typ?: string | undefined;
681
+ cty?: string | undefined;
682
+ crit?: string[] | undefined;
683
+ kid?: string | undefined;
684
+ jku?: string | undefined;
685
+ x5u?: string | string[] | undefined;
686
+ 'x5t#S256'?: string | undefined;
687
+ x5t?: string | undefined;
688
+ x5c?: string | string[] | undefined;
689
+ }>>;
690
+ encoding: ZodOptional<ZodString>;
691
+ allowInsecureKeySizes: ZodOptional<ZodBoolean>;
692
+ allowInvalidAsymmetricKeyTypes: ZodOptional<ZodBoolean>;
693
+ }, "strip", ZodTypeAny, {
694
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
695
+ keyid?: string | undefined;
696
+ expiresIn?: string | number | undefined;
697
+ notBefore?: string | number | undefined;
698
+ audience?: string | string[] | undefined;
699
+ subject?: string | undefined;
700
+ issuer?: string | undefined;
701
+ jwtid?: string | undefined;
702
+ mutatePayload?: boolean | undefined;
703
+ noTimestamp?: boolean | undefined;
704
+ header?: {
705
+ alg: string;
706
+ typ?: string | undefined;
707
+ cty?: string | undefined;
708
+ crit?: string[] | undefined;
709
+ kid?: string | undefined;
710
+ jku?: string | undefined;
711
+ x5u?: string | string[] | undefined;
712
+ 'x5t#S256'?: string | undefined;
713
+ x5t?: string | undefined;
714
+ x5c?: string | string[] | undefined;
715
+ } | undefined;
716
+ encoding?: string | undefined;
717
+ allowInsecureKeySizes?: boolean | undefined;
718
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
719
+ }, {
720
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
721
+ keyid?: string | undefined;
722
+ expiresIn?: string | number | undefined;
723
+ notBefore?: string | number | undefined;
724
+ audience?: string | string[] | undefined;
725
+ subject?: string | undefined;
726
+ issuer?: string | undefined;
727
+ jwtid?: string | undefined;
728
+ mutatePayload?: boolean | undefined;
729
+ noTimestamp?: boolean | undefined;
730
+ header?: {
731
+ alg: string;
732
+ typ?: string | undefined;
733
+ cty?: string | undefined;
734
+ crit?: string[] | undefined;
735
+ kid?: string | undefined;
736
+ jku?: string | undefined;
737
+ x5u?: string | string[] | undefined;
738
+ 'x5t#S256'?: string | undefined;
739
+ x5t?: string | undefined;
740
+ x5c?: string | string[] | undefined;
741
+ } | undefined;
742
+ encoding?: string | undefined;
743
+ allowInsecureKeySizes?: boolean | undefined;
744
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
745
+ }>>;
746
+ secret: ZodOptional<ZodString>;
747
+ publicKey: ZodOptional<ZodUnion<[ZodString, ZodType<Buffer<ArrayBufferLike>, ZodTypeDef, Buffer<ArrayBufferLike>>]>>;
748
+ privateKey: ZodOptional<ZodUnion<[ZodString, ZodType<Buffer<ArrayBufferLike>, ZodTypeDef, Buffer<ArrayBufferLike>>, ZodObject< {
749
+ type: ZodString;
750
+ }, "passthrough", ZodTypeAny, objectOutputType< {
751
+ type: ZodString;
752
+ }, ZodTypeAny, "passthrough">, objectInputType< {
753
+ type: ZodString;
754
+ }, ZodTypeAny, "passthrough">>, ZodObject< {
755
+ key: ZodUnion<[ZodString, ZodType<Buffer<ArrayBufferLike>, ZodTypeDef, Buffer<ArrayBufferLike>>]>;
756
+ passphrase: ZodString;
757
+ }, "strip", ZodTypeAny, {
758
+ key: string | Buffer<ArrayBufferLike>;
759
+ passphrase: string;
760
+ }, {
761
+ key: string | Buffer<ArrayBufferLike>;
762
+ passphrase: string;
763
+ }>]>>;
764
+ verifyOptions: ZodOptional<ZodObject< {
765
+ algorithms: ZodOptional<ZodArray<ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
766
+ audience: ZodOptional<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>, ZodArray<ZodString, "many">]>>;
767
+ clockTimestamp: ZodOptional<ZodNumber>;
768
+ clockTolerance: ZodOptional<ZodNumber>;
769
+ complete: ZodOptional<ZodBoolean>;
770
+ issuer: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
771
+ ignoreExpiration: ZodOptional<ZodBoolean>;
772
+ ignoreNotBefore: ZodOptional<ZodBoolean>;
773
+ jwtid: ZodOptional<ZodString>;
774
+ nonce: ZodOptional<ZodString>;
775
+ subject: ZodOptional<ZodString>;
776
+ maxAge: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
777
+ allowInvalidAsymmetricKeyTypes: ZodOptional<ZodBoolean>;
778
+ }, "strip", ZodTypeAny, {
779
+ audience?: string | RegExp | string[] | undefined;
780
+ subject?: string | undefined;
781
+ issuer?: string | string[] | undefined;
782
+ jwtid?: string | undefined;
783
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
784
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
785
+ clockTimestamp?: number | undefined;
786
+ clockTolerance?: number | undefined;
787
+ complete?: boolean | undefined;
788
+ ignoreExpiration?: boolean | undefined;
789
+ ignoreNotBefore?: boolean | undefined;
790
+ nonce?: string | undefined;
791
+ maxAge?: string | number | undefined;
792
+ }, {
793
+ audience?: string | RegExp | string[] | undefined;
794
+ subject?: string | undefined;
795
+ issuer?: string | string[] | undefined;
796
+ jwtid?: string | undefined;
797
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
798
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
799
+ clockTimestamp?: number | undefined;
800
+ clockTolerance?: number | undefined;
801
+ complete?: boolean | undefined;
802
+ ignoreExpiration?: boolean | undefined;
803
+ ignoreNotBefore?: boolean | undefined;
804
+ nonce?: string | undefined;
805
+ maxAge?: string | number | undefined;
806
+ }>>;
807
+ secretOrKeyProvider: ZodOptional<ZodFunction<ZodTuple<[ZodNativeEnum<typeof RequestType>, ZodAny, ZodOptional<ZodUnion<[ZodObject< {
808
+ algorithm: ZodOptional<ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
809
+ keyid: ZodOptional<ZodString>;
810
+ expiresIn: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
811
+ notBefore: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
812
+ audience: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
813
+ subject: ZodOptional<ZodString>;
814
+ issuer: ZodOptional<ZodString>;
815
+ jwtid: ZodOptional<ZodString>;
816
+ mutatePayload: ZodOptional<ZodBoolean>;
817
+ noTimestamp: ZodOptional<ZodBoolean>;
818
+ header: ZodOptional<ZodObject< {
819
+ alg: ZodUnion<[ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, ZodString]>;
820
+ typ: ZodOptional<ZodString>;
821
+ cty: ZodOptional<ZodString>;
822
+ crit: ZodOptional<ZodArray<ZodString, "many">>;
823
+ kid: ZodOptional<ZodString>;
824
+ jku: ZodOptional<ZodString>;
825
+ x5u: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
826
+ 'x5t#S256': ZodOptional<ZodString>;
827
+ x5t: ZodOptional<ZodString>;
828
+ x5c: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
829
+ }, "strip", ZodTypeAny, {
830
+ alg: string;
831
+ typ?: string | undefined;
832
+ cty?: string | undefined;
833
+ crit?: string[] | undefined;
834
+ kid?: string | undefined;
835
+ jku?: string | undefined;
836
+ x5u?: string | string[] | undefined;
837
+ 'x5t#S256'?: string | undefined;
838
+ x5t?: string | undefined;
839
+ x5c?: string | string[] | undefined;
840
+ }, {
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
+ }>>;
852
+ encoding: ZodOptional<ZodString>;
853
+ allowInsecureKeySizes: ZodOptional<ZodBoolean>;
854
+ allowInvalidAsymmetricKeyTypes: ZodOptional<ZodBoolean>;
855
+ }, "strip", ZodTypeAny, {
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
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
883
+ keyid?: string | undefined;
884
+ expiresIn?: string | number | undefined;
885
+ notBefore?: string | number | undefined;
886
+ audience?: string | string[] | undefined;
887
+ subject?: string | undefined;
888
+ issuer?: string | undefined;
889
+ jwtid?: string | undefined;
890
+ mutatePayload?: boolean | undefined;
891
+ noTimestamp?: boolean | undefined;
892
+ header?: {
893
+ alg: string;
894
+ typ?: string | undefined;
895
+ cty?: string | undefined;
896
+ crit?: string[] | undefined;
897
+ kid?: string | undefined;
898
+ jku?: string | undefined;
899
+ x5u?: string | string[] | undefined;
900
+ 'x5t#S256'?: string | undefined;
901
+ x5t?: string | undefined;
902
+ x5c?: string | string[] | undefined;
903
+ } | undefined;
904
+ encoding?: string | undefined;
905
+ allowInsecureKeySizes?: boolean | undefined;
906
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
907
+ }>, ZodObject< {
908
+ algorithms: ZodOptional<ZodArray<ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
909
+ audience: ZodOptional<ZodUnion<[ZodString, ZodType<RegExp, ZodTypeDef, RegExp>, ZodArray<ZodString, "many">]>>;
910
+ clockTimestamp: ZodOptional<ZodNumber>;
911
+ clockTolerance: ZodOptional<ZodNumber>;
912
+ complete: ZodOptional<ZodBoolean>;
913
+ issuer: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
914
+ ignoreExpiration: ZodOptional<ZodBoolean>;
915
+ ignoreNotBefore: ZodOptional<ZodBoolean>;
916
+ jwtid: ZodOptional<ZodString>;
917
+ nonce: ZodOptional<ZodString>;
918
+ subject: ZodOptional<ZodString>;
919
+ maxAge: ZodOptional<ZodUnion<[ZodString, ZodNumber]>>;
920
+ allowInvalidAsymmetricKeyTypes: ZodOptional<ZodBoolean>;
921
+ }, "strip", ZodTypeAny, {
922
+ audience?: string | RegExp | string[] | undefined;
923
+ subject?: string | undefined;
924
+ issuer?: string | string[] | undefined;
925
+ jwtid?: string | undefined;
926
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
927
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
928
+ clockTimestamp?: number | undefined;
929
+ clockTolerance?: number | undefined;
930
+ complete?: boolean | undefined;
931
+ ignoreExpiration?: boolean | undefined;
932
+ ignoreNotBefore?: boolean | undefined;
933
+ nonce?: string | undefined;
934
+ maxAge?: string | number | undefined;
935
+ }, {
936
+ audience?: string | RegExp | string[] | undefined;
937
+ subject?: string | undefined;
938
+ issuer?: string | string[] | undefined;
939
+ jwtid?: string | undefined;
940
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
941
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
942
+ clockTimestamp?: number | undefined;
943
+ clockTolerance?: number | undefined;
944
+ complete?: boolean | undefined;
945
+ ignoreExpiration?: boolean | undefined;
946
+ ignoreNotBefore?: boolean | undefined;
947
+ nonce?: string | undefined;
948
+ maxAge?: string | number | undefined;
949
+ }>]>>], ZodUnknown>, ZodUnion<[ZodUnion<[ZodString, ZodType<Buffer<ArrayBufferLike>, ZodTypeDef, Buffer<ArrayBufferLike>>, ZodObject< {
950
+ type: ZodString;
951
+ }, "passthrough", ZodTypeAny, objectOutputType< {
952
+ type: ZodString;
953
+ }, ZodTypeAny, "passthrough">, objectInputType< {
954
+ type: ZodString;
955
+ }, ZodTypeAny, "passthrough">>, ZodObject< {
956
+ key: ZodUnion<[ZodString, ZodType<Buffer<ArrayBufferLike>, ZodTypeDef, Buffer<ArrayBufferLike>>]>;
957
+ passphrase: ZodString;
958
+ }, "strip", ZodTypeAny, {
959
+ key: string | Buffer<ArrayBufferLike>;
960
+ passphrase: string;
961
+ }, {
962
+ key: string | Buffer<ArrayBufferLike>;
963
+ passphrase: string;
964
+ }>]>, ZodPromise<ZodUnion<[ZodString, ZodType<Buffer<ArrayBufferLike>, ZodTypeDef, Buffer<ArrayBufferLike>>, ZodObject< {
965
+ type: ZodString;
966
+ }, "passthrough", ZodTypeAny, objectOutputType< {
967
+ type: ZodString;
968
+ }, ZodTypeAny, "passthrough">, objectInputType< {
969
+ type: ZodString;
970
+ }, ZodTypeAny, "passthrough">>, ZodObject< {
971
+ key: ZodUnion<[ZodString, ZodType<Buffer<ArrayBufferLike>, ZodTypeDef, Buffer<ArrayBufferLike>>]>;
972
+ passphrase: ZodString;
973
+ }, "strip", ZodTypeAny, {
974
+ key: string | Buffer<ArrayBufferLike>;
975
+ passphrase: string;
976
+ }, {
977
+ key: string | Buffer<ArrayBufferLike>;
978
+ passphrase: string;
979
+ }>]>>]>>>;
980
+ }, "strip", ZodTypeAny, {
981
+ signOptions?: {
982
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
983
+ keyid?: string | undefined;
984
+ expiresIn?: string | number | undefined;
985
+ notBefore?: string | number | undefined;
986
+ audience?: string | string[] | undefined;
987
+ subject?: string | undefined;
988
+ issuer?: string | undefined;
989
+ jwtid?: string | undefined;
990
+ mutatePayload?: boolean | undefined;
991
+ noTimestamp?: boolean | undefined;
992
+ header?: {
993
+ alg: string;
994
+ typ?: string | undefined;
995
+ cty?: string | undefined;
996
+ crit?: string[] | undefined;
997
+ kid?: string | undefined;
998
+ jku?: string | undefined;
999
+ x5u?: string | string[] | undefined;
1000
+ 'x5t#S256'?: string | undefined;
1001
+ x5t?: string | undefined;
1002
+ x5c?: string | string[] | undefined;
1003
+ } | undefined;
1004
+ encoding?: string | undefined;
1005
+ allowInsecureKeySizes?: boolean | undefined;
1006
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1007
+ } | undefined;
1008
+ secret?: string | undefined;
1009
+ publicKey?: string | Buffer<ArrayBufferLike> | undefined;
1010
+ privateKey?: string | Buffer<ArrayBufferLike> | objectOutputType< {
1011
+ type: ZodString;
1012
+ }, ZodTypeAny, "passthrough"> | {
1013
+ key: string | Buffer<ArrayBufferLike>;
1014
+ passphrase: string;
1015
+ } | undefined;
1016
+ verifyOptions?: {
1017
+ audience?: string | RegExp | string[] | undefined;
1018
+ subject?: string | undefined;
1019
+ issuer?: string | string[] | undefined;
1020
+ jwtid?: string | undefined;
1021
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1022
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1023
+ clockTimestamp?: number | undefined;
1024
+ clockTolerance?: number | undefined;
1025
+ complete?: boolean | undefined;
1026
+ ignoreExpiration?: boolean | undefined;
1027
+ ignoreNotBefore?: boolean | undefined;
1028
+ nonce?: string | undefined;
1029
+ maxAge?: string | number | undefined;
1030
+ } | undefined;
1031
+ secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
1032
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1033
+ keyid?: string | undefined;
1034
+ expiresIn?: string | number | undefined;
1035
+ notBefore?: string | number | undefined;
1036
+ audience?: string | string[] | undefined;
1037
+ subject?: string | undefined;
1038
+ issuer?: string | undefined;
1039
+ jwtid?: string | undefined;
1040
+ mutatePayload?: boolean | undefined;
1041
+ noTimestamp?: boolean | undefined;
1042
+ header?: {
1043
+ alg: string;
1044
+ typ?: string | undefined;
1045
+ cty?: string | undefined;
1046
+ crit?: string[] | undefined;
1047
+ kid?: string | undefined;
1048
+ jku?: string | undefined;
1049
+ x5u?: string | string[] | undefined;
1050
+ 'x5t#S256'?: string | undefined;
1051
+ x5t?: string | undefined;
1052
+ x5c?: string | string[] | undefined;
1053
+ } | undefined;
1054
+ encoding?: string | undefined;
1055
+ allowInsecureKeySizes?: boolean | undefined;
1056
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1057
+ } | {
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
+ } | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | objectOutputType< {
1072
+ type: ZodString;
1073
+ }, ZodTypeAny, "passthrough"> | {
1074
+ key: string | Buffer<ArrayBufferLike>;
1075
+ passphrase: string;
1076
+ } | Promise<string | Buffer<ArrayBufferLike> | objectOutputType< {
1077
+ type: ZodString;
1078
+ }, ZodTypeAny, "passthrough"> | {
1079
+ key: string | Buffer<ArrayBufferLike>;
1080
+ passphrase: string;
1081
+ }>) | undefined;
1082
+ }, {
1083
+ signOptions?: {
1084
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1085
+ keyid?: string | undefined;
1086
+ expiresIn?: string | number | undefined;
1087
+ notBefore?: string | number | undefined;
1088
+ audience?: string | string[] | undefined;
1089
+ subject?: string | undefined;
1090
+ issuer?: string | undefined;
1091
+ jwtid?: string | undefined;
1092
+ mutatePayload?: boolean | undefined;
1093
+ noTimestamp?: boolean | undefined;
1094
+ header?: {
1095
+ alg: string;
1096
+ typ?: string | undefined;
1097
+ cty?: string | undefined;
1098
+ crit?: string[] | undefined;
1099
+ kid?: string | undefined;
1100
+ jku?: string | undefined;
1101
+ x5u?: string | string[] | undefined;
1102
+ 'x5t#S256'?: string | undefined;
1103
+ x5t?: string | undefined;
1104
+ x5c?: string | string[] | undefined;
1105
+ } | undefined;
1106
+ encoding?: string | undefined;
1107
+ allowInsecureKeySizes?: boolean | undefined;
1108
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1109
+ } | undefined;
1110
+ secret?: string | undefined;
1111
+ publicKey?: string | Buffer<ArrayBufferLike> | undefined;
1112
+ privateKey?: string | Buffer<ArrayBufferLike> | objectInputType< {
1113
+ type: ZodString;
1114
+ }, ZodTypeAny, "passthrough"> | {
1115
+ key: string | Buffer<ArrayBufferLike>;
1116
+ passphrase: string;
1117
+ } | undefined;
1118
+ verifyOptions?: {
1119
+ audience?: string | RegExp | string[] | undefined;
1120
+ subject?: string | undefined;
1121
+ issuer?: string | string[] | undefined;
1122
+ jwtid?: string | undefined;
1123
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1124
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1125
+ clockTimestamp?: number | undefined;
1126
+ clockTolerance?: number | undefined;
1127
+ complete?: boolean | undefined;
1128
+ ignoreExpiration?: boolean | undefined;
1129
+ ignoreNotBefore?: boolean | undefined;
1130
+ nonce?: string | undefined;
1131
+ maxAge?: string | number | undefined;
1132
+ } | undefined;
1133
+ secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
1134
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1135
+ keyid?: string | undefined;
1136
+ expiresIn?: string | number | undefined;
1137
+ notBefore?: string | number | undefined;
1138
+ audience?: string | string[] | undefined;
1139
+ subject?: string | undefined;
1140
+ issuer?: string | undefined;
1141
+ jwtid?: string | undefined;
1142
+ mutatePayload?: boolean | undefined;
1143
+ noTimestamp?: boolean | undefined;
1144
+ header?: {
1145
+ alg: string;
1146
+ typ?: string | undefined;
1147
+ cty?: string | undefined;
1148
+ crit?: string[] | undefined;
1149
+ kid?: string | undefined;
1150
+ jku?: string | undefined;
1151
+ x5u?: string | string[] | undefined;
1152
+ 'x5t#S256'?: string | undefined;
1153
+ x5t?: string | undefined;
1154
+ x5c?: string | string[] | undefined;
1155
+ } | undefined;
1156
+ encoding?: string | undefined;
1157
+ allowInsecureKeySizes?: boolean | undefined;
1158
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1159
+ } | {
1160
+ audience?: string | RegExp | string[] | undefined;
1161
+ subject?: string | undefined;
1162
+ issuer?: string | string[] | undefined;
1163
+ jwtid?: string | undefined;
1164
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1165
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1166
+ clockTimestamp?: number | undefined;
1167
+ clockTolerance?: number | undefined;
1168
+ complete?: boolean | undefined;
1169
+ ignoreExpiration?: boolean | undefined;
1170
+ ignoreNotBefore?: boolean | undefined;
1171
+ nonce?: string | undefined;
1172
+ maxAge?: string | number | undefined;
1173
+ } | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | objectInputType< {
1174
+ type: ZodString;
1175
+ }, ZodTypeAny, "passthrough"> | {
1176
+ key: string | Buffer<ArrayBufferLike>;
1177
+ passphrase: string;
1178
+ } | Promise<string | Buffer<ArrayBufferLike> | objectInputType< {
1179
+ type: ZodString;
1180
+ }, ZodTypeAny, "passthrough"> | {
1181
+ key: string | Buffer<ArrayBufferLike>;
1182
+ passphrase: string;
1183
+ }>) | undefined;
1184
+ }>, true>;
1185
+ export { JwtServiceToken }
1186
+ export { JwtServiceToken as JwtServiceToken_alias_1 }
1187
+
1188
+ declare interface JwtSignOptions extends SignOptions {
753
1189
  secret?: string | Buffer;
754
1190
  privateKey?: Secret;
755
1191
  }
756
- interface JwtVerifyOptions extends VerifyOptions {
1192
+ export { JwtSignOptions }
1193
+ export { JwtSignOptions as JwtSignOptions_alias_1 }
1194
+
1195
+ declare interface JwtVerifyOptions extends VerifyOptions {
757
1196
  secret?: string | Buffer;
758
1197
  publicKey?: string | Buffer;
759
1198
  }
760
- type GetSecretKeyResult = string | Buffer | Secret$1;
1199
+ export { JwtVerifyOptions }
1200
+ export { JwtVerifyOptions as JwtVerifyOptions_alias_1 }
761
1201
 
762
- declare class JwtService {
763
- private readonly options;
764
- logger: _navios_core.LoggerInstance;
765
- constructor(options?: JwtServiceOptions);
766
- sign(payload: string, options?: Omit<JwtSignOptions, keyof SignOptions>): string;
767
- sign(payload: Buffer | object, options?: JwtSignOptions): string;
768
- signAsync(payload: string, options?: Omit<JwtSignOptions, keyof jwt.SignOptions>): Promise<string>;
769
- signAsync(payload: Buffer | object, options?: JwtSignOptions): Promise<string>;
770
- verify<T extends object = any>(token: string, options?: JwtVerifyOptions): T;
771
- verifyAsync<T extends object = any>(token: string, options?: JwtVerifyOptions): Promise<T>;
772
- decode<T = any>(token: string, options?: jwt.DecodeOptions): T;
773
- private mergeJwtOptions;
774
- private getSecretKey;
1202
+ export declare const NotBeforeError: typeof jwt.NotBeforeError;
1203
+
1204
+ declare function provideJwtService(config: JwtServiceOptions | (() => Promise<JwtServiceOptions>)): BoundInjectionToken<JwtService, typeof JwtServiceOptionsSchema> | FactoryInjectionToken<JwtService, typeof JwtServiceOptionsSchema>;
1205
+ export { provideJwtService }
1206
+ export { provideJwtService as provideJwtService_alias_1 }
1207
+
1208
+ declare enum RequestType {
1209
+ Sign = "Sign",
1210
+ Verify = "Verify"
775
1211
  }
1212
+ export { RequestType }
1213
+ export { RequestType as RequestType_alias_1 }
776
1214
 
777
- declare const JwtServiceToken: InjectionToken<JwtService, zod.ZodObject<{
778
- signOptions: zod.ZodOptional<zod.ZodObject<{
779
- algorithm: zod.ZodOptional<zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
780
- keyid: zod.ZodOptional<zod.ZodString>;
781
- expiresIn: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
782
- notBefore: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
783
- audience: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
784
- subject: zod.ZodOptional<zod.ZodString>;
785
- issuer: zod.ZodOptional<zod.ZodString>;
786
- jwtid: zod.ZodOptional<zod.ZodString>;
787
- mutatePayload: zod.ZodOptional<zod.ZodBoolean>;
788
- noTimestamp: zod.ZodOptional<zod.ZodBoolean>;
789
- header: zod.ZodOptional<zod.ZodObject<{
790
- alg: zod.ZodUnion<[zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, zod.ZodString]>;
791
- typ: zod.ZodOptional<zod.ZodString>;
792
- cty: zod.ZodOptional<zod.ZodString>;
793
- crit: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
794
- kid: zod.ZodOptional<zod.ZodString>;
795
- jku: zod.ZodOptional<zod.ZodString>;
796
- x5u: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
797
- 'x5t#S256': zod.ZodOptional<zod.ZodString>;
798
- x5t: zod.ZodOptional<zod.ZodString>;
799
- x5c: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
800
- }, "strip", zod.ZodTypeAny, {
801
- alg: string;
802
- typ?: string | undefined;
803
- cty?: string | undefined;
804
- crit?: string[] | undefined;
805
- kid?: string | undefined;
806
- jku?: string | undefined;
807
- x5u?: string | string[] | undefined;
808
- 'x5t#S256'?: string | undefined;
809
- x5t?: string | undefined;
810
- x5c?: string | string[] | undefined;
811
- }, {
812
- alg: string;
813
- typ?: string | undefined;
814
- cty?: string | undefined;
815
- crit?: string[] | undefined;
816
- kid?: string | undefined;
817
- jku?: string | undefined;
818
- x5u?: string | string[] | undefined;
819
- 'x5t#S256'?: string | undefined;
820
- x5t?: string | undefined;
821
- x5c?: string | string[] | undefined;
822
- }>>;
823
- encoding: zod.ZodOptional<zod.ZodString>;
824
- allowInsecureKeySizes: zod.ZodOptional<zod.ZodBoolean>;
825
- allowInvalidAsymmetricKeyTypes: zod.ZodOptional<zod.ZodBoolean>;
826
- }, "strip", zod.ZodTypeAny, {
827
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
828
- keyid?: string | undefined;
829
- expiresIn?: string | number | undefined;
830
- notBefore?: string | number | undefined;
831
- audience?: string | string[] | undefined;
832
- subject?: string | undefined;
833
- issuer?: string | undefined;
834
- jwtid?: string | undefined;
835
- mutatePayload?: boolean | undefined;
836
- noTimestamp?: boolean | undefined;
837
- header?: {
838
- alg: string;
839
- typ?: string | undefined;
840
- cty?: string | undefined;
841
- crit?: string[] | undefined;
842
- kid?: string | undefined;
843
- jku?: string | undefined;
844
- x5u?: string | string[] | undefined;
845
- 'x5t#S256'?: string | undefined;
846
- x5t?: string | undefined;
847
- x5c?: string | string[] | undefined;
848
- } | undefined;
849
- encoding?: string | undefined;
850
- allowInsecureKeySizes?: boolean | undefined;
851
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
852
- }, {
853
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
854
- keyid?: string | undefined;
855
- expiresIn?: string | number | undefined;
856
- notBefore?: string | number | undefined;
857
- audience?: string | string[] | undefined;
858
- subject?: string | undefined;
859
- issuer?: string | undefined;
860
- jwtid?: string | undefined;
861
- mutatePayload?: boolean | undefined;
862
- noTimestamp?: boolean | undefined;
863
- header?: {
864
- alg: string;
865
- typ?: string | undefined;
866
- cty?: string | undefined;
867
- crit?: string[] | undefined;
868
- kid?: string | undefined;
869
- jku?: string | undefined;
870
- x5u?: string | string[] | undefined;
871
- 'x5t#S256'?: string | undefined;
872
- x5t?: string | undefined;
873
- x5c?: string | string[] | undefined;
874
- } | undefined;
875
- encoding?: string | undefined;
876
- allowInsecureKeySizes?: boolean | undefined;
877
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
878
- }>>;
879
- secret: zod.ZodOptional<zod.ZodString>;
880
- publicKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>]>>;
881
- privateKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>, zod.ZodObject<{
882
- type: zod.ZodString;
883
- }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
884
- type: zod.ZodString;
885
- }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
886
- type: zod.ZodString;
887
- }, zod.ZodTypeAny, "passthrough">>, zod.ZodObject<{
888
- key: zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
889
- passphrase: zod.ZodString;
890
- }, "strip", zod.ZodTypeAny, {
891
- key: string | Buffer<ArrayBufferLike>;
892
- passphrase: string;
893
- }, {
894
- key: string | Buffer<ArrayBufferLike>;
895
- passphrase: string;
896
- }>]>>;
897
- verifyOptions: zod.ZodOptional<zod.ZodObject<{
898
- algorithms: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
899
- audience: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodType<RegExp, zod.ZodTypeDef, RegExp>, zod.ZodArray<zod.ZodString, "many">]>>;
900
- clockTimestamp: zod.ZodOptional<zod.ZodNumber>;
901
- clockTolerance: zod.ZodOptional<zod.ZodNumber>;
902
- complete: zod.ZodOptional<zod.ZodBoolean>;
903
- issuer: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
904
- ignoreExpiration: zod.ZodOptional<zod.ZodBoolean>;
905
- ignoreNotBefore: zod.ZodOptional<zod.ZodBoolean>;
906
- jwtid: zod.ZodOptional<zod.ZodString>;
907
- nonce: zod.ZodOptional<zod.ZodString>;
908
- subject: zod.ZodOptional<zod.ZodString>;
909
- maxAge: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
910
- allowInvalidAsymmetricKeyTypes: zod.ZodOptional<zod.ZodBoolean>;
911
- }, "strip", zod.ZodTypeAny, {
912
- audience?: string | RegExp | string[] | undefined;
913
- subject?: string | undefined;
914
- issuer?: string | string[] | undefined;
915
- jwtid?: string | undefined;
916
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
917
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
918
- clockTimestamp?: number | undefined;
919
- clockTolerance?: number | undefined;
920
- complete?: boolean | undefined;
921
- ignoreExpiration?: boolean | undefined;
922
- ignoreNotBefore?: boolean | undefined;
923
- nonce?: string | undefined;
924
- maxAge?: string | number | undefined;
925
- }, {
926
- audience?: string | RegExp | string[] | undefined;
927
- subject?: string | undefined;
928
- issuer?: string | string[] | undefined;
929
- jwtid?: string | undefined;
930
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
931
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
932
- clockTimestamp?: number | undefined;
933
- clockTolerance?: number | undefined;
934
- complete?: boolean | undefined;
935
- ignoreExpiration?: boolean | undefined;
936
- ignoreNotBefore?: boolean | undefined;
937
- nonce?: string | undefined;
938
- maxAge?: string | number | undefined;
939
- }>>;
940
- secretOrKeyProvider: zod.ZodOptional<zod.ZodFunction<zod.ZodTuple<[zod.ZodNativeEnum<typeof RequestType>, zod.ZodAny, zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
941
- algorithm: zod.ZodOptional<zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
942
- keyid: zod.ZodOptional<zod.ZodString>;
943
- expiresIn: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
944
- notBefore: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
945
- audience: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
946
- subject: zod.ZodOptional<zod.ZodString>;
947
- issuer: zod.ZodOptional<zod.ZodString>;
948
- jwtid: zod.ZodOptional<zod.ZodString>;
949
- mutatePayload: zod.ZodOptional<zod.ZodBoolean>;
950
- noTimestamp: zod.ZodOptional<zod.ZodBoolean>;
951
- header: zod.ZodOptional<zod.ZodObject<{
952
- alg: zod.ZodUnion<[zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, zod.ZodString]>;
953
- typ: zod.ZodOptional<zod.ZodString>;
954
- cty: zod.ZodOptional<zod.ZodString>;
955
- crit: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
956
- kid: zod.ZodOptional<zod.ZodString>;
957
- jku: zod.ZodOptional<zod.ZodString>;
958
- x5u: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
959
- 'x5t#S256': zod.ZodOptional<zod.ZodString>;
960
- x5t: zod.ZodOptional<zod.ZodString>;
961
- x5c: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
962
- }, "strip", zod.ZodTypeAny, {
963
- alg: string;
964
- typ?: string | undefined;
965
- cty?: string | undefined;
966
- crit?: string[] | undefined;
967
- kid?: string | undefined;
968
- jku?: string | undefined;
969
- x5u?: string | string[] | undefined;
970
- 'x5t#S256'?: string | undefined;
971
- x5t?: string | undefined;
972
- x5c?: string | string[] | undefined;
973
- }, {
974
- alg: string;
975
- typ?: string | undefined;
976
- cty?: string | undefined;
977
- crit?: string[] | undefined;
978
- kid?: string | undefined;
979
- jku?: string | undefined;
980
- x5u?: string | string[] | undefined;
981
- 'x5t#S256'?: string | undefined;
982
- x5t?: string | undefined;
983
- x5c?: string | string[] | undefined;
984
- }>>;
985
- encoding: zod.ZodOptional<zod.ZodString>;
986
- allowInsecureKeySizes: zod.ZodOptional<zod.ZodBoolean>;
987
- allowInvalidAsymmetricKeyTypes: zod.ZodOptional<zod.ZodBoolean>;
988
- }, "strip", zod.ZodTypeAny, {
989
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
990
- keyid?: string | undefined;
991
- expiresIn?: string | number | undefined;
992
- notBefore?: string | number | undefined;
993
- audience?: string | string[] | undefined;
994
- subject?: string | undefined;
995
- issuer?: string | undefined;
996
- jwtid?: string | undefined;
997
- mutatePayload?: boolean | undefined;
998
- noTimestamp?: boolean | undefined;
999
- header?: {
1000
- alg: string;
1001
- typ?: string | undefined;
1002
- cty?: string | undefined;
1003
- crit?: string[] | undefined;
1004
- kid?: string | undefined;
1005
- jku?: string | undefined;
1006
- x5u?: string | string[] | undefined;
1007
- 'x5t#S256'?: string | undefined;
1008
- x5t?: string | undefined;
1009
- x5c?: string | string[] | undefined;
1010
- } | undefined;
1011
- encoding?: string | undefined;
1012
- allowInsecureKeySizes?: boolean | undefined;
1013
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1014
- }, {
1015
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1016
- keyid?: string | undefined;
1017
- expiresIn?: string | number | undefined;
1018
- notBefore?: string | number | undefined;
1019
- audience?: string | string[] | undefined;
1020
- subject?: string | undefined;
1021
- issuer?: string | undefined;
1022
- jwtid?: string | undefined;
1023
- mutatePayload?: boolean | undefined;
1024
- noTimestamp?: boolean | undefined;
1025
- header?: {
1026
- alg: string;
1027
- typ?: string | undefined;
1028
- cty?: string | undefined;
1029
- crit?: string[] | undefined;
1030
- kid?: string | undefined;
1031
- jku?: string | undefined;
1032
- x5u?: string | string[] | undefined;
1033
- 'x5t#S256'?: string | undefined;
1034
- x5t?: string | undefined;
1035
- x5c?: string | string[] | undefined;
1036
- } | undefined;
1037
- encoding?: string | undefined;
1038
- allowInsecureKeySizes?: boolean | undefined;
1039
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1040
- }>, zod.ZodObject<{
1041
- algorithms: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
1042
- audience: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodType<RegExp, zod.ZodTypeDef, RegExp>, zod.ZodArray<zod.ZodString, "many">]>>;
1043
- clockTimestamp: zod.ZodOptional<zod.ZodNumber>;
1044
- clockTolerance: zod.ZodOptional<zod.ZodNumber>;
1045
- complete: zod.ZodOptional<zod.ZodBoolean>;
1046
- issuer: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>>;
1047
- ignoreExpiration: zod.ZodOptional<zod.ZodBoolean>;
1048
- ignoreNotBefore: zod.ZodOptional<zod.ZodBoolean>;
1049
- jwtid: zod.ZodOptional<zod.ZodString>;
1050
- nonce: zod.ZodOptional<zod.ZodString>;
1051
- subject: zod.ZodOptional<zod.ZodString>;
1052
- maxAge: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>>;
1053
- allowInvalidAsymmetricKeyTypes: zod.ZodOptional<zod.ZodBoolean>;
1054
- }, "strip", zod.ZodTypeAny, {
1055
- audience?: string | RegExp | string[] | undefined;
1056
- subject?: string | undefined;
1057
- issuer?: string | string[] | undefined;
1058
- jwtid?: string | undefined;
1059
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1060
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1061
- clockTimestamp?: number | undefined;
1062
- clockTolerance?: number | undefined;
1063
- complete?: boolean | undefined;
1064
- ignoreExpiration?: boolean | undefined;
1065
- ignoreNotBefore?: boolean | undefined;
1066
- nonce?: string | undefined;
1067
- maxAge?: string | number | undefined;
1068
- }, {
1069
- audience?: string | RegExp | string[] | undefined;
1070
- subject?: string | undefined;
1071
- issuer?: string | string[] | undefined;
1072
- jwtid?: string | undefined;
1073
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1074
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1075
- clockTimestamp?: number | undefined;
1076
- clockTolerance?: number | undefined;
1077
- complete?: boolean | undefined;
1078
- ignoreExpiration?: boolean | undefined;
1079
- ignoreNotBefore?: boolean | undefined;
1080
- nonce?: string | undefined;
1081
- maxAge?: string | number | undefined;
1082
- }>]>>], zod.ZodUnknown>, zod.ZodUnion<[zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>, zod.ZodObject<{
1083
- type: zod.ZodString;
1084
- }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
1085
- type: zod.ZodString;
1086
- }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
1087
- type: zod.ZodString;
1088
- }, zod.ZodTypeAny, "passthrough">>, zod.ZodObject<{
1089
- key: zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
1090
- passphrase: zod.ZodString;
1091
- }, "strip", zod.ZodTypeAny, {
1092
- key: string | Buffer<ArrayBufferLike>;
1093
- passphrase: string;
1094
- }, {
1095
- key: string | Buffer<ArrayBufferLike>;
1096
- passphrase: string;
1097
- }>]>, zod.ZodPromise<zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>, zod.ZodObject<{
1098
- type: zod.ZodString;
1099
- }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
1100
- type: zod.ZodString;
1101
- }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
1102
- type: zod.ZodString;
1103
- }, zod.ZodTypeAny, "passthrough">>, zod.ZodObject<{
1104
- key: zod.ZodUnion<[zod.ZodString, zod.ZodType<Buffer<ArrayBufferLike>, zod.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
1105
- passphrase: zod.ZodString;
1106
- }, "strip", zod.ZodTypeAny, {
1107
- key: string | Buffer<ArrayBufferLike>;
1108
- passphrase: string;
1109
- }, {
1110
- key: string | Buffer<ArrayBufferLike>;
1111
- passphrase: string;
1112
- }>]>>]>>>;
1113
- }, "strip", zod.ZodTypeAny, {
1114
- signOptions?: {
1115
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1116
- keyid?: string | undefined;
1117
- expiresIn?: string | number | undefined;
1118
- notBefore?: string | number | undefined;
1119
- audience?: string | string[] | undefined;
1120
- subject?: string | undefined;
1121
- issuer?: string | undefined;
1122
- jwtid?: string | undefined;
1123
- mutatePayload?: boolean | undefined;
1124
- noTimestamp?: boolean | undefined;
1125
- header?: {
1126
- alg: string;
1127
- typ?: string | undefined;
1128
- cty?: string | undefined;
1129
- crit?: string[] | undefined;
1130
- kid?: string | undefined;
1131
- jku?: string | undefined;
1132
- x5u?: string | string[] | undefined;
1133
- 'x5t#S256'?: string | undefined;
1134
- x5t?: string | undefined;
1135
- x5c?: string | string[] | undefined;
1136
- } | undefined;
1137
- encoding?: string | undefined;
1138
- allowInsecureKeySizes?: boolean | undefined;
1139
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1140
- } | undefined;
1141
- secret?: string | undefined;
1142
- publicKey?: string | Buffer<ArrayBufferLike> | undefined;
1143
- privateKey?: string | Buffer<ArrayBufferLike> | zod.objectOutputType<{
1144
- type: zod.ZodString;
1145
- }, zod.ZodTypeAny, "passthrough"> | {
1146
- key: string | Buffer<ArrayBufferLike>;
1147
- passphrase: string;
1148
- } | undefined;
1149
- verifyOptions?: {
1150
- audience?: string | RegExp | string[] | undefined;
1151
- subject?: string | undefined;
1152
- issuer?: string | string[] | undefined;
1153
- jwtid?: string | undefined;
1154
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1155
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1156
- clockTimestamp?: number | undefined;
1157
- clockTolerance?: number | undefined;
1158
- complete?: boolean | undefined;
1159
- ignoreExpiration?: boolean | undefined;
1160
- ignoreNotBefore?: boolean | undefined;
1161
- nonce?: string | undefined;
1162
- maxAge?: string | number | undefined;
1163
- } | undefined;
1164
- secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
1165
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1166
- keyid?: string | undefined;
1167
- expiresIn?: string | number | undefined;
1168
- notBefore?: string | number | undefined;
1169
- audience?: string | string[] | undefined;
1170
- subject?: string | undefined;
1171
- issuer?: string | undefined;
1172
- jwtid?: string | undefined;
1173
- mutatePayload?: boolean | undefined;
1174
- noTimestamp?: boolean | undefined;
1175
- header?: {
1176
- alg: string;
1177
- typ?: string | undefined;
1178
- cty?: string | undefined;
1179
- crit?: string[] | undefined;
1180
- kid?: string | undefined;
1181
- jku?: string | undefined;
1182
- x5u?: string | string[] | undefined;
1183
- 'x5t#S256'?: string | undefined;
1184
- x5t?: string | undefined;
1185
- x5c?: string | string[] | undefined;
1186
- } | undefined;
1187
- encoding?: string | undefined;
1188
- allowInsecureKeySizes?: boolean | undefined;
1189
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1190
- } | {
1191
- audience?: string | RegExp | string[] | undefined;
1192
- subject?: string | undefined;
1193
- issuer?: string | string[] | undefined;
1194
- jwtid?: string | undefined;
1195
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1196
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1197
- clockTimestamp?: number | undefined;
1198
- clockTolerance?: number | undefined;
1199
- complete?: boolean | undefined;
1200
- ignoreExpiration?: boolean | undefined;
1201
- ignoreNotBefore?: boolean | undefined;
1202
- nonce?: string | undefined;
1203
- maxAge?: string | number | undefined;
1204
- } | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | zod.objectOutputType<{
1205
- type: zod.ZodString;
1206
- }, zod.ZodTypeAny, "passthrough"> | {
1207
- key: string | Buffer<ArrayBufferLike>;
1208
- passphrase: string;
1209
- } | Promise<string | Buffer<ArrayBufferLike> | zod.objectOutputType<{
1210
- type: zod.ZodString;
1211
- }, zod.ZodTypeAny, "passthrough"> | {
1212
- key: string | Buffer<ArrayBufferLike>;
1213
- passphrase: string;
1214
- }>) | undefined;
1215
+ declare type Secret = z.infer<typeof SecretSchema>;
1216
+ export { Secret }
1217
+ export { Secret as Secret_alias_1 }
1218
+
1219
+ declare const SecretSchema: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodObject<{
1220
+ type: z.ZodString;
1221
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1222
+ type: z.ZodString;
1223
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1224
+ type: z.ZodString;
1225
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1226
+ key: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
1227
+ passphrase: z.ZodString;
1228
+ }, "strip", z.ZodTypeAny, {
1229
+ key: string | Buffer<ArrayBufferLike>;
1230
+ passphrase: string;
1215
1231
  }, {
1216
- signOptions?: {
1217
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1218
- keyid?: string | undefined;
1219
- expiresIn?: string | number | undefined;
1220
- notBefore?: string | number | undefined;
1221
- audience?: string | string[] | undefined;
1222
- subject?: string | undefined;
1223
- issuer?: string | undefined;
1224
- jwtid?: string | undefined;
1225
- mutatePayload?: boolean | undefined;
1226
- noTimestamp?: boolean | undefined;
1227
- header?: {
1228
- alg: string;
1229
- typ?: string | undefined;
1230
- cty?: string | undefined;
1231
- crit?: string[] | undefined;
1232
- kid?: string | undefined;
1233
- jku?: string | undefined;
1234
- x5u?: string | string[] | undefined;
1235
- 'x5t#S256'?: string | undefined;
1236
- x5t?: string | undefined;
1237
- x5c?: string | string[] | undefined;
1238
- } | undefined;
1239
- encoding?: string | undefined;
1240
- allowInsecureKeySizes?: boolean | undefined;
1241
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1242
- } | undefined;
1243
- secret?: string | undefined;
1244
- publicKey?: string | Buffer<ArrayBufferLike> | undefined;
1245
- privateKey?: string | Buffer<ArrayBufferLike> | zod.objectInputType<{
1246
- type: zod.ZodString;
1247
- }, zod.ZodTypeAny, "passthrough"> | {
1248
- key: string | Buffer<ArrayBufferLike>;
1249
- passphrase: string;
1232
+ key: string | Buffer<ArrayBufferLike>;
1233
+ passphrase: string;
1234
+ }>]>;
1235
+ export { SecretSchema }
1236
+ export { SecretSchema as SecretSchema_alias_1 }
1237
+
1238
+ declare type SignOptions = z.infer<typeof SignOptionsSchema>;
1239
+ export { SignOptions }
1240
+ export { SignOptions as SignOptions_alias_1 }
1241
+
1242
+ declare const SignOptionsSchema: z.ZodObject<{
1243
+ algorithm: z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>>;
1244
+ keyid: z.ZodOptional<z.ZodString>;
1245
+ expiresIn: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1246
+ notBefore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1247
+ audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1248
+ subject: z.ZodOptional<z.ZodString>;
1249
+ issuer: z.ZodOptional<z.ZodString>;
1250
+ jwtid: z.ZodOptional<z.ZodString>;
1251
+ mutatePayload: z.ZodOptional<z.ZodBoolean>;
1252
+ noTimestamp: z.ZodOptional<z.ZodBoolean>;
1253
+ header: z.ZodOptional<z.ZodObject<{
1254
+ alg: z.ZodUnion<[z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, z.ZodString]>;
1255
+ typ: z.ZodOptional<z.ZodString>;
1256
+ cty: z.ZodOptional<z.ZodString>;
1257
+ crit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1258
+ kid: z.ZodOptional<z.ZodString>;
1259
+ jku: z.ZodOptional<z.ZodString>;
1260
+ x5u: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1261
+ 'x5t#S256': z.ZodOptional<z.ZodString>;
1262
+ x5t: z.ZodOptional<z.ZodString>;
1263
+ x5c: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1264
+ }, "strip", z.ZodTypeAny, {
1265
+ alg: string;
1266
+ typ?: string | undefined;
1267
+ cty?: string | undefined;
1268
+ crit?: string[] | undefined;
1269
+ kid?: string | undefined;
1270
+ jku?: string | undefined;
1271
+ x5u?: string | string[] | undefined;
1272
+ 'x5t#S256'?: string | undefined;
1273
+ x5t?: string | undefined;
1274
+ x5c?: string | string[] | undefined;
1275
+ }, {
1276
+ alg: string;
1277
+ typ?: string | undefined;
1278
+ cty?: string | undefined;
1279
+ crit?: string[] | undefined;
1280
+ kid?: string | undefined;
1281
+ jku?: string | undefined;
1282
+ x5u?: string | string[] | undefined;
1283
+ 'x5t#S256'?: string | undefined;
1284
+ x5t?: string | undefined;
1285
+ x5c?: string | string[] | undefined;
1286
+ }>>;
1287
+ encoding: z.ZodOptional<z.ZodString>;
1288
+ allowInsecureKeySizes: z.ZodOptional<z.ZodBoolean>;
1289
+ allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
1290
+ }, "strip", z.ZodTypeAny, {
1291
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1292
+ keyid?: string | undefined;
1293
+ expiresIn?: string | number | undefined;
1294
+ notBefore?: string | number | undefined;
1295
+ audience?: string | string[] | undefined;
1296
+ subject?: string | undefined;
1297
+ issuer?: string | undefined;
1298
+ jwtid?: string | undefined;
1299
+ mutatePayload?: boolean | undefined;
1300
+ noTimestamp?: boolean | undefined;
1301
+ header?: {
1302
+ alg: string;
1303
+ typ?: string | undefined;
1304
+ cty?: string | undefined;
1305
+ crit?: string[] | undefined;
1306
+ kid?: string | undefined;
1307
+ jku?: string | undefined;
1308
+ x5u?: string | string[] | undefined;
1309
+ 'x5t#S256'?: string | undefined;
1310
+ x5t?: string | undefined;
1311
+ x5c?: string | string[] | undefined;
1250
1312
  } | undefined;
1251
- verifyOptions?: {
1252
- audience?: string | RegExp | string[] | undefined;
1253
- subject?: string | undefined;
1254
- issuer?: string | string[] | undefined;
1255
- jwtid?: string | undefined;
1256
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1257
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1258
- clockTimestamp?: number | undefined;
1259
- clockTolerance?: number | undefined;
1260
- complete?: boolean | undefined;
1261
- ignoreExpiration?: boolean | undefined;
1262
- ignoreNotBefore?: boolean | undefined;
1263
- nonce?: string | undefined;
1264
- maxAge?: string | number | undefined;
1313
+ encoding?: string | undefined;
1314
+ allowInsecureKeySizes?: boolean | undefined;
1315
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1316
+ }, {
1317
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1318
+ keyid?: string | undefined;
1319
+ expiresIn?: string | number | undefined;
1320
+ notBefore?: string | number | undefined;
1321
+ audience?: string | string[] | undefined;
1322
+ subject?: string | undefined;
1323
+ issuer?: string | undefined;
1324
+ jwtid?: string | undefined;
1325
+ mutatePayload?: boolean | undefined;
1326
+ noTimestamp?: boolean | undefined;
1327
+ header?: {
1328
+ alg: string;
1329
+ typ?: string | undefined;
1330
+ cty?: string | undefined;
1331
+ crit?: string[] | undefined;
1332
+ kid?: string | undefined;
1333
+ jku?: string | undefined;
1334
+ x5u?: string | string[] | undefined;
1335
+ 'x5t#S256'?: string | undefined;
1336
+ x5t?: string | undefined;
1337
+ x5c?: string | string[] | undefined;
1265
1338
  } | undefined;
1266
- secretOrKeyProvider?: ((args_0: RequestType, args_1: any, args_2: {
1267
- algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none" | undefined;
1268
- keyid?: string | undefined;
1269
- expiresIn?: string | number | undefined;
1270
- notBefore?: string | number | undefined;
1271
- audience?: string | string[] | undefined;
1272
- subject?: string | undefined;
1273
- issuer?: string | undefined;
1274
- jwtid?: string | undefined;
1275
- mutatePayload?: boolean | undefined;
1276
- noTimestamp?: boolean | undefined;
1277
- header?: {
1278
- alg: string;
1279
- typ?: string | undefined;
1280
- cty?: string | undefined;
1281
- crit?: string[] | undefined;
1282
- kid?: string | undefined;
1283
- jku?: string | undefined;
1284
- x5u?: string | string[] | undefined;
1285
- 'x5t#S256'?: string | undefined;
1286
- x5t?: string | undefined;
1287
- x5c?: string | string[] | undefined;
1288
- } | undefined;
1289
- encoding?: string | undefined;
1290
- allowInsecureKeySizes?: boolean | undefined;
1291
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1292
- } | {
1293
- audience?: string | RegExp | string[] | undefined;
1294
- subject?: string | undefined;
1295
- issuer?: string | string[] | undefined;
1296
- jwtid?: string | undefined;
1297
- allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1298
- algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1299
- clockTimestamp?: number | undefined;
1300
- clockTolerance?: number | undefined;
1301
- complete?: boolean | undefined;
1302
- ignoreExpiration?: boolean | undefined;
1303
- ignoreNotBefore?: boolean | undefined;
1304
- nonce?: string | undefined;
1305
- maxAge?: string | number | undefined;
1306
- } | undefined, ...args: unknown[]) => string | Buffer<ArrayBufferLike> | zod.objectInputType<{
1307
- type: zod.ZodString;
1308
- }, zod.ZodTypeAny, "passthrough"> | {
1309
- key: string | Buffer<ArrayBufferLike>;
1310
- passphrase: string;
1311
- } | Promise<string | Buffer<ArrayBufferLike> | zod.objectInputType<{
1312
- type: zod.ZodString;
1313
- }, zod.ZodTypeAny, "passthrough"> | {
1314
- key: string | Buffer<ArrayBufferLike>;
1315
- passphrase: string;
1316
- }>) | undefined;
1317
- }>>;
1318
- declare class JwtServiceFactory {
1319
- create(ctx: ServiceLocatorAbstractFactoryContext, args: JwtServiceOptions): Promise<JwtService>;
1320
- }
1321
- declare function provideJwtService(config: JwtServiceOptions | (() => Promise<JwtServiceOptions>)): InjectionToken<JwtService, undefined>;
1339
+ encoding?: string | undefined;
1340
+ allowInsecureKeySizes?: boolean | undefined;
1341
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1342
+ }>;
1343
+ export { SignOptionsSchema }
1344
+ export { SignOptionsSchema as SignOptionsSchema_alias_1 }
1345
+
1346
+ export declare const TokenExpiredError: typeof jwt.TokenExpiredError;
1322
1347
 
1323
- declare const TokenExpiredError: typeof jwt.TokenExpiredError;
1324
- declare const NotBeforeError: typeof jwt.NotBeforeError;
1325
- declare const JsonWebTokenError: typeof jwt.JsonWebTokenError;
1348
+ declare type VerifyOptions = z.infer<typeof VerifyOptionsSchema>;
1349
+ export { VerifyOptions }
1350
+ export { VerifyOptions as VerifyOptions_alias_1 }
1351
+
1352
+ declare const VerifyOptionsSchema: z.ZodObject<{
1353
+ algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "none"]>, "many">>;
1354
+ audience: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodArray<z.ZodString, "many">]>>;
1355
+ clockTimestamp: z.ZodOptional<z.ZodNumber>;
1356
+ clockTolerance: z.ZodOptional<z.ZodNumber>;
1357
+ complete: z.ZodOptional<z.ZodBoolean>;
1358
+ issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1359
+ ignoreExpiration: z.ZodOptional<z.ZodBoolean>;
1360
+ ignoreNotBefore: z.ZodOptional<z.ZodBoolean>;
1361
+ jwtid: z.ZodOptional<z.ZodString>;
1362
+ nonce: z.ZodOptional<z.ZodString>;
1363
+ subject: z.ZodOptional<z.ZodString>;
1364
+ maxAge: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1365
+ allowInvalidAsymmetricKeyTypes: z.ZodOptional<z.ZodBoolean>;
1366
+ }, "strip", z.ZodTypeAny, {
1367
+ audience?: string | RegExp | string[] | undefined;
1368
+ subject?: string | undefined;
1369
+ issuer?: string | string[] | undefined;
1370
+ jwtid?: string | undefined;
1371
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1372
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1373
+ clockTimestamp?: number | undefined;
1374
+ clockTolerance?: number | undefined;
1375
+ complete?: boolean | undefined;
1376
+ ignoreExpiration?: boolean | undefined;
1377
+ ignoreNotBefore?: boolean | undefined;
1378
+ nonce?: string | undefined;
1379
+ maxAge?: string | number | undefined;
1380
+ }, {
1381
+ audience?: string | RegExp | string[] | undefined;
1382
+ subject?: string | undefined;
1383
+ issuer?: string | string[] | undefined;
1384
+ jwtid?: string | undefined;
1385
+ allowInvalidAsymmetricKeyTypes?: boolean | undefined;
1386
+ algorithms?: ("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "none")[] | undefined;
1387
+ clockTimestamp?: number | undefined;
1388
+ clockTolerance?: number | undefined;
1389
+ complete?: boolean | undefined;
1390
+ ignoreExpiration?: boolean | undefined;
1391
+ ignoreNotBefore?: boolean | undefined;
1392
+ nonce?: string | undefined;
1393
+ maxAge?: string | number | undefined;
1394
+ }>;
1395
+ export { VerifyOptionsSchema }
1396
+ export { VerifyOptionsSchema as VerifyOptionsSchema_alias_1 }
1326
1397
 
1327
- export { AlgorithmType, type GetSecretKeyResult, JsonWebTokenError, type JwtHeader, JwtHeaderSchema, JwtService, JwtServiceFactory, type JwtServiceOptions, JwtServiceOptionsSchema, JwtServiceToken, type JwtSignOptions, type JwtVerifyOptions, NotBeforeError, RequestType, type Secret, SecretSchema, type SignOptions, SignOptionsSchema, TokenExpiredError, type VerifyOptions, VerifyOptionsSchema, provideJwtService };
1398
+ export { }