unjwt 0.7.3 → 0.8.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.
Files changed (39) hide show
  1. package/README.md +4 -4
  2. package/dist/THIRD-PARTY-LICENSES.md.gz +0 -0
  3. package/dist/_chunks/_codec-jwe.d.mts +170 -0
  4. package/dist/_chunks/_codec-jws.mjs +878 -0
  5. package/dist/_chunks/_internal.d.mts +7 -0
  6. package/dist/_chunks/_jwt-internal.mjs +388 -0
  7. package/dist/_chunks/algorithms.mjs +186 -0
  8. package/dist/_chunks/index.d.mts +500 -808
  9. package/dist/_chunks/index2.d.mts +11 -0
  10. package/dist/_chunks/index3.d.mts +108 -0
  11. package/dist/_chunks/jwe.d.mts +43 -66
  12. package/dist/_chunks/jwe.mjs +384 -252
  13. package/dist/_chunks/jwk.mjs +1374 -607
  14. package/dist/_chunks/jws.d.mts +48 -103
  15. package/dist/_chunks/jws.mjs +372 -184
  16. package/dist/_chunks/jwt.d.mts +56 -0
  17. package/dist/_chunks/libs/unsecure.d.mts +164 -85
  18. package/dist/_chunks/libs/unsecure.mjs +390 -123
  19. package/dist/adapters/elysia/index.d.mts +33 -171
  20. package/dist/adapters/elysia/index.mjs +106 -575
  21. package/dist/adapters/h3v1/index.d.mts +59 -344
  22. package/dist/adapters/h3v1/index.mjs +114 -619
  23. package/dist/adapters/h3v2/index.d.mts +58 -326
  24. package/dist/adapters/h3v2/index.mjs +108 -611
  25. package/dist/core/internal.d.mts +2 -0
  26. package/dist/core/internal.mjs +1 -0
  27. package/dist/core/jwe.d.mts +4 -2
  28. package/dist/core/jwe.mjs +4 -2
  29. package/dist/core/jwk.d.mts +183 -371
  30. package/dist/core/jwk.mjs +4 -3
  31. package/dist/core/jws.d.mts +4 -2
  32. package/dist/core/jws.mjs +4 -2
  33. package/dist/core/utils/index.d.mts +5 -158
  34. package/dist/core/utils/index.mjs +12 -3
  35. package/dist/index.d.mts +8 -4
  36. package/dist/index.mjs +6 -3
  37. package/package.json +29 -30
  38. package/dist/_chunks/_internal.mjs +0 -88
  39. package/dist/_chunks/utils.mjs +0 -392
@@ -1,4 +1,6 @@
1
- import { CompositeKey, ContentEncryptionAlgorithm, DeriveKeyOptions, DeriveKeyReturn, Duration, ExpiresIn, GenerateJWKOptions, GenerateJWKReturn, GenerateKeyAlgorithm, GenerateKeyOptions, GenerateKeyReturn, JOSEPayload, JWEAsymmetricPrivateJWK, JWEAsymmetricPublicJWK, JWEDecryptJWK, JWEDecryptOptions, JWEDecryptResult, JWEEncryptJWK, JWEEncryptOptions, JWEFlattenedSerialization, JWEGeneralRecipient, JWEGeneralSerialization, JWEHeaderParameters, JWEKeyManagementHeaderParameters, JWEMultiDecryptOptions, JWEMultiDecryptResult, JWEMultiEncryptOptions, JWEMultiRecipient, JWEProtectedHeader, JWK, JWKAlgorithm, JWKCacheAdapter, JWKLookupFunction, JWKLookupFunctionHeader, JWKPEMAlgorithm, JWKParameters, JWKSet, JWK_AES_CBC_HMAC, JWK_AES_GCM, JWK_AES_GCM_KW, JWK_AES_KW, JWK_Asymmetric, JWK_Asymmetric_Algorithm, JWK_EC, JWK_ECDH_ES, JWK_ECDSA, JWK_EC_Private, JWK_EC_Public, JWK_HMAC, JWK_OKP, JWK_OKP_Private, JWK_OKP_Public, JWK_OKP_SIGN, JWK_PBES2, JWK_Pair, JWK_Private, JWK_Public, JWK_RSA, JWK_RSA_ENC, JWK_RSA_PSS, JWK_RSA_Private, JWK_RSA_Public, JWK_RSA_SIGN, JWK_Symmetric, JWK_Symmetric_Algorithm, JWK_oct, JWSAlgorithm, JWSAsymmetricPrivateJWK, JWSAsymmetricPublicJWK, JWSFlattenedSerialization, JWSGeneralSerialization, JWSGeneralSignature, JWSHeaderParameters, JWSMultiSignOptions, JWSMultiSigner, JWSMultiVerifyAllOptions, JWSMultiVerifyOptions, JWSMultiVerifyOutcome, JWSMultiVerifyResult, JWSProtectedHeader, JWSSignJWK, JWSSignOptions, JWSVerifyJWK, JWSVerifyOptions, JWSVerifyResult, JWT, JWTClaimValidationOptions, JWTClaims, JoseHeaderParameters, KeyManagementAlgorithm, MaxTokenAge, NotBeforeIn, StrictOmit, UnwrapKeyOptions, UnwrappingKeyFor, WrapKeyOptions, WrapKeyResult, WrappingKeyFor } from "../../_chunks/index.mjs";
1
+ import { CompositeKey, ContentEncryptionAlgorithm, DeriveKeyOptions, DeriveKeyReturn, Duration, ECDHEphemeralKeyInput, ExpiresIn, GenerateJWKOptions, GenerateJWKReturn, GenerateKeyAlgorithm, GenerateKeyOptions, GenerateKeyReturn, GeneratedJWKMap, GeneratedKeyMap, ImportedKey, ImportedKeyMap, JOSEConsumerOptions, JOSELimits, JOSEPayload, JOSEPayloadMode, JOSEPayloadTypeMap, JWEAsymmetricPrivateJWK, JWEAsymmetricPublicJWK, JWEDecryptJWK, JWEDecryptOptions, JWEDecryptResult, JWEEncryptJWK, JWEEncryptOptions, JWEFlattenedSerialization, JWEGeneralRecipient, JWEGeneralSerialization, JWEHeaderParameters, JWEKeyManagementHeaderParameters, JWELibraryHeaderName, JWEMultiDecryptKey, JWEMultiDecryptOptions, JWEMultiDecryptResult, JWEMultiEncryptOptions, JWEMultiRecipient, JWEProtectedHeader, JWK, JWKAlgorithm, JWKCacheAdapter, JWKLookupFunction, JWKLookupFunctionHeader, JWKMetadata, JWKPEMAlgorithm, JWKParameters, JWKSet, JWK_AES_CBC_HMAC, JWK_AES_GCM, JWK_AES_GCM_KW, JWK_AES_KW, JWK_Asymmetric, JWK_Asymmetric_Algorithm, JWK_EC, JWK_ECDH_ES, JWK_ECDSA, JWK_EC_Private, JWK_EC_Public, JWK_HMAC, JWK_OKP, JWK_OKP_Private, JWK_OKP_Public, JWK_OKP_SIGN, JWK_PBES2, JWK_Pair, JWK_Private, JWK_Public, JWK_RSA, JWK_RSA_ENC, JWK_RSA_PSS, JWK_RSA_Private, JWK_RSA_Public, JWK_RSA_SIGN, JWK_Symmetric, JWK_Symmetric_Algorithm, JWK_oct, JWSAlgorithm, JWSAsymmetricPrivateJWK, JWSAsymmetricPublicJWK, JWSFlattenedSerialization, JWSGeneralSerialization, JWSGeneralSignature, JWSHeaderParameters, JWSMultiSignOptions, JWSMultiSigner, JWSMultiVerifyAllOptions, JWSMultiVerifyOptions, JWSMultiVerifyOutcome, JWSMultiVerifyResult, JWSProtectedHeader, JWSSignJWK, JWSSignOptions, JWSVerifyJWK, JWSVerifyOptions, JWSVerifyResult, JWT, JWTClaimValidationOptions, JWTClaims, JWTTimeClaimOptions, JoseHeaderParameters, KeyManagementAlgorithm, MaxTokenAge, NotBeforeIn, PayloadOf, UnwrapKeyOptions, UnwrapKeyResult, UnwrappingKeyFor, WrapKeyOptions, WrapKeyResult, WrappingKeyFor } from "../../_chunks/index.mjs";
2
+ import { JWESessionConfig, JWESessionHooks, JWSSessionConfig, JWSSessionHooks, SessionClaims, SessionData, SessionDecryptOptions, SessionEncryptOptions, SessionIssueOptions, SessionManager, SessionRecord, SessionSignOptions, SessionState, SessionUpdate, SessionUpdateTrigger, SessionVerifyOptions } from "../../_chunks/_codec-jwe.mjs";
3
+ import { thumbprint } from "../../_chunks/index2.mjs";
2
4
  import { deriveJWKFromPassword, exportPEM, generateJWK, importPEM } from "../../core/jwk.mjs";
3
5
  import { Elysia } from "elysia";
4
6
  interface CookieAttributes {
@@ -30,31 +32,19 @@ interface SessionContext {
30
32
  };
31
33
  };
32
34
  }
33
- interface SessionClaims extends Required<Pick<JWTClaims, "jti" | "iat">>, StrictOmit<JWTClaims, "jti" | "iat"> {}
34
- type SessionData<T extends Record<string, any> = SessionClaims> = StrictOmit<T, "jti" | "iat" | "exp">;
35
- type SessionUpdate<T extends Record<string, any> = SessionClaims> = Partial<SessionData<T>> | ((oldData: SessionData<T>) => Partial<SessionData<T>> | undefined);
36
- interface SessionManager<T extends Record<string, any> = SessionClaims, ConfigMaxAge extends ExpiresIn | undefined = ExpiresIn | undefined> {
37
- readonly id: string | undefined;
38
- readonly createdAt: number;
39
- readonly expiresAt: ConfigMaxAge extends ExpiresIn ? number : "exp" extends keyof T ? T["exp"] : number | undefined;
40
- readonly data: SessionData<T>;
41
- readonly token: string | undefined;
42
- update: (update?: SessionUpdate<T>) => Promise<SessionManager<T, ConfigMaxAge>>;
43
- clear: () => Promise<SessionManager<T, ConfigMaxAge>>;
44
- }
45
35
  /**
46
- * Explicit return type for the `jwsSession` / `jweSession` plugin factories.
47
- *
48
- * Modelling Elysia's generics by hand is required by `isolatedDeclarations`
49
- * (the factories return an inferred `new Elysia().resolve().macro()` type that
50
- * cannot otherwise be emitted). `Resolved` is the scoped `Ephemeral.resolve`
51
- * augmentation — typically `{ [P in ContextKey]: SessionManager }` — so consumers
52
- * read a typed `ctx[contextKey]`. `GuardName` is the guard macro key (derived
53
- * from the context key, e.g. `requireSession`), so multiple session plugins on
54
- * one app each expose a distinct guard rather than colliding. `macroFn` is left
55
- * `{}`: consumers only need `Metadata.macro` for the `{ [GuardName]: true }`
56
- * route option.
57
- */
36
+ * Explicit return type for the `jwsSession` / `jweSession` plugin factories.
37
+ *
38
+ * Modelling Elysia's generics by hand is required by `isolatedDeclarations`
39
+ * (the factories return an inferred `new Elysia().resolve().macro()` type that
40
+ * cannot otherwise be emitted). `Resolved` is the scoped `Ephemeral.resolve`
41
+ * augmentation — typically `{ [P in ContextKey]: SessionManager }` — so consumers
42
+ * read a typed `ctx[contextKey]`. `GuardName` is the guard macro key (derived
43
+ * from the context key, e.g. `requireSession`), so multiple session plugins on
44
+ * one app each expose a distinct guard rather than colliding. `macroFn` is left
45
+ * `{}`: consumers only need `Metadata.macro` for the `{ [GuardName]: true }`
46
+ * route option.
47
+ */
58
48
  type SessionPlugin<Resolved extends Record<string, unknown>, GuardName extends string = "requireSession"> = Elysia<"", {
59
49
  decorator: {};
60
50
  store: {};
@@ -66,7 +56,7 @@ type SessionPlugin<Resolved extends Record<string, unknown>, GuardName extends s
66
56
  }, {
67
57
  schema: {};
68
58
  standaloneSchema: {};
69
- macro: { [M in GuardName]?: boolean };
59
+ macro: { [M in GuardName]?: boolean; };
70
60
  macroFn: {};
71
61
  parser: {};
72
62
  response: {};
@@ -83,162 +73,34 @@ type SessionPlugin<Resolved extends Record<string, unknown>, GuardName extends s
83
73
  standaloneSchema: {};
84
74
  response: {};
85
75
  }>;
86
- interface SessionJWS<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined> {
87
- id: string | undefined;
88
- createdAt: number;
89
- expiresAt: MaxAge extends ExpiresIn ? number : T["exp"];
90
- data: SessionData<T>;
91
- token: string | undefined;
92
- }
93
- interface SessionHooksJWS<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext> {
94
- onRead?: (args: {
95
- session: SessionJWS<T, MaxAge> & {
96
- id: string;
97
- token: string;
98
- };
99
- context: TContext;
100
- config: SessionConfigJWS<T, MaxAge, TContext>;
101
- }) => void | Promise<void>;
102
- onUpdate?: (args: {
103
- session: SessionJWS<T, MaxAge> & {
104
- id: string;
105
- token: string;
106
- };
107
- oldSession: SessionJWS<T, MaxAge>;
108
- context: TContext;
109
- config: SessionConfigJWS<T, MaxAge, TContext>;
110
- }) => void | Promise<void>;
111
- onClear?: (args: {
112
- oldSession: SessionJWS<T, MaxAge> | undefined;
113
- context: TContext;
114
- config: SessionConfigJWS<T, MaxAge, TContext>;
115
- }) => void | Promise<void>;
116
- onExpire?: (args: {
117
- session: {
118
- id: string | undefined;
119
- createdAt: number | undefined;
120
- expiresAt: number | undefined;
121
- token: string;
122
- };
123
- context: TContext;
124
- error: Error;
125
- config: SessionConfigJWS<T, MaxAge, TContext>;
126
- }) => void | Promise<void>;
127
- onError?: (args: {
128
- session: SessionJWS<T, MaxAge>;
129
- context: TContext;
130
- error: any;
131
- config: SessionConfigJWS<T, MaxAge, TContext>;
132
- }) => void | Promise<void>;
133
- onVerifyKeyLookup?: (args: {
134
- header: JWKLookupFunctionHeader;
135
- context: TContext;
136
- config: SessionConfigJWS<T, MaxAge, TContext>;
137
- }) => JWKSet | JWSVerifyJWK | Promise<JWKSet | JWSVerifyJWK>;
138
- }
139
- interface SessionConfigJWS<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext> {
140
- key: JWK_oct<JWK_HMAC> | {
141
- privateKey: JWSAsymmetricPrivateJWK;
142
- publicKey: JWSAsymmetricPublicJWK | JWSAsymmetricPublicJWK[] | JWKSet;
143
- };
144
- maxAge?: MaxAge;
145
- name?: string;
76
+ interface SessionJWS<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined> extends SessionState<T, MaxAge> {}
77
+ interface SessionHooksJWS<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext> extends JWSSessionHooks<SessionJWS<T, MaxAge>, SessionManager<T, MaxAge>, {
78
+ context: TContext;
79
+ }, SessionConfigJWS<T, MaxAge, TContext>> {}
80
+ interface SessionConfigJWS<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext> extends JWSSessionConfig<MaxAge, CookieAttributes> {
146
81
  /** Context property the session is exposed under. Default `"session"`. */
147
82
  contextKey?: string;
148
- cookie?: false | (CookieAttributes & {
149
- chunkMaxLength?: number;
150
- });
151
- sessionHeader?: false | string;
152
- generateId?: () => string;
153
- jws?: {
154
- signOptions?: Omit<JWSSignOptions, "expiresIn">;
155
- verifyOptions?: JWTClaimValidationOptions;
156
- };
157
83
  hooks?: SessionHooksJWS<T, MaxAge, TContext>;
158
84
  }
159
- declare function createJWSSession<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext>(context: TContext, config: SessionConfigJWS<T, MaxAge, TContext>): Promise<SessionManager<T, MaxAge>>;
160
- declare function jwsSession<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, K extends string = "session">(config: SessionConfigJWS<T, MaxAge> & (K extends "session" ? {
85
+ export declare function createJWSSession<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext>(context: TContext, config: SessionConfigJWS<T, MaxAge, TContext>): Promise<SessionManager<T, MaxAge>>;
86
+ export declare function jwsSession<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, K extends string = "session">(config: SessionConfigJWS<T, MaxAge> & (K extends "session" ? {
161
87
  contextKey?: K;
162
88
  } : {
163
89
  contextKey: K;
164
- })): SessionPlugin<{ [P in K]: SessionManager<T, MaxAge> }, `require${Capitalize<K>}`>;
165
- interface SessionJWE<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined> {
166
- id: string | undefined;
167
- createdAt: number;
168
- expiresAt: MaxAge extends ExpiresIn ? number : T["exp"];
169
- data: SessionData<T>;
170
- token: string | undefined;
171
- }
172
- interface SessionHooksJWE<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext> {
173
- onRead?: (args: {
174
- session: SessionJWE<T, MaxAge> & {
175
- id: string;
176
- token: string;
177
- };
178
- context: TContext;
179
- config: SessionConfigJWE<T, MaxAge, TContext>;
180
- }) => void | Promise<void>;
181
- onUpdate?: (args: {
182
- session: SessionJWE<T, MaxAge> & {
183
- id: string;
184
- token: string;
185
- };
186
- oldSession: SessionJWE<T, MaxAge>;
187
- context: TContext;
188
- config: SessionConfigJWE<T, MaxAge, TContext>;
189
- }) => void | Promise<void>;
190
- onClear?: (args: {
191
- oldSession: SessionJWE<T, MaxAge> | undefined;
192
- context: TContext;
193
- config: SessionConfigJWE<T, MaxAge, TContext>;
194
- }) => void | Promise<void>;
195
- onExpire?: (args: {
196
- session: {
197
- id: string | undefined;
198
- createdAt: number | undefined;
199
- expiresAt: number | undefined;
200
- token: string;
201
- };
202
- context: TContext;
203
- error: Error;
204
- config: SessionConfigJWE<T, MaxAge, TContext>;
205
- }) => void | Promise<void>;
206
- onError?: (args: {
207
- session: SessionJWE<T, MaxAge>;
208
- context: TContext;
209
- error: any;
210
- config: SessionConfigJWE<T, MaxAge, TContext>;
211
- }) => void | Promise<void>;
212
- onUnsealKeyLookup?: (args: {
213
- header: JWEHeaderParameters;
214
- context: TContext;
215
- config: SessionConfigJWE<T, MaxAge, TContext>;
216
- }) => JWEDecryptJWK | Promise<JWEDecryptJWK>;
217
- }
218
- interface SessionConfigJWE<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext> {
219
- key: string | JWEEncryptJWK | {
220
- privateKey: JWEAsymmetricPrivateJWK;
221
- publicKey?: JWEAsymmetricPublicJWK;
222
- };
223
- maxAge?: MaxAge;
224
- name?: string;
90
+ })): SessionPlugin<{ [P in K]: SessionManager<T, MaxAge>; }, `require${Capitalize<K>}`>;
91
+ interface SessionJWE<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined> extends SessionState<T, MaxAge> {}
92
+ interface SessionHooksJWE<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext> extends JWESessionHooks<SessionJWE<T, MaxAge>, SessionManager<T, MaxAge>, {
93
+ context: TContext;
94
+ }, SessionConfigJWE<T, MaxAge, TContext>> {}
95
+ interface SessionConfigJWE<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext> extends JWESessionConfig<MaxAge, CookieAttributes> {
225
96
  /** Context property the session is exposed under. Default `"session"`. */
226
97
  contextKey?: string;
227
- cookie?: false | (CookieAttributes & {
228
- chunkMaxLength?: number;
229
- });
230
- sessionHeader?: false | string;
231
- generateId?: () => string;
232
- jwe?: {
233
- encryptOptions?: Omit<JWEEncryptOptions, "expiresIn">;
234
- decryptOptions?: JWTClaimValidationOptions;
235
- };
236
98
  hooks?: SessionHooksJWE<T, MaxAge, TContext>;
237
99
  }
238
- declare function createJWESession<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext>(context: TContext, config: SessionConfigJWE<T, MaxAge, TContext>): Promise<SessionManager<T, MaxAge>>;
239
- declare function jweSession<T extends Record<string, any> = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, K extends string = "session">(config: SessionConfigJWE<T, MaxAge> & (K extends "session" ? {
100
+ export declare function createJWESession<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, TContext extends SessionContext = SessionContext>(context: TContext, config: SessionConfigJWE<T, MaxAge, TContext>): Promise<SessionManager<T, MaxAge>>;
101
+ export declare function jweSession<T extends SessionRecord = SessionClaims, MaxAge extends ExpiresIn | undefined = ExpiresIn | undefined, K extends string = "session">(config: SessionConfigJWE<T, MaxAge> & (K extends "session" ? {
240
102
  contextKey?: K;
241
103
  } : {
242
104
  contextKey: K;
243
- })): SessionPlugin<{ [P in K]: SessionManager<T, MaxAge> }, `require${Capitalize<K>}`>;
244
- export { type ChunkableCookie, type ChunkableCookieJar, type CompositeKey, type ContentEncryptionAlgorithm, type CookieAttributes, type DeriveKeyOptions, type DeriveKeyReturn, type Duration, type ExpiresIn, type GenerateJWKOptions, type GenerateJWKReturn, type GenerateKeyAlgorithm, type GenerateKeyOptions, type GenerateKeyReturn, type JOSEPayload, type JWEAsymmetricPrivateJWK, type JWEAsymmetricPublicJWK, type JWEDecryptJWK, type JWEDecryptOptions, type JWEDecryptResult, type JWEEncryptJWK, type JWEEncryptOptions, type JWEFlattenedSerialization, type JWEGeneralRecipient, type JWEGeneralSerialization, type JWEHeaderParameters, type JWEKeyManagementHeaderParameters, type JWEMultiDecryptOptions, type JWEMultiDecryptResult, type JWEMultiEncryptOptions, type JWEMultiRecipient, type JWEProtectedHeader, type JWK, type JWKAlgorithm, type JWKCacheAdapter, type JWKLookupFunction, type JWKLookupFunctionHeader, type JWKPEMAlgorithm, type JWKParameters, type JWKSet, type JWK_AES_CBC_HMAC, type JWK_AES_GCM, type JWK_AES_GCM_KW, type JWK_AES_KW, type JWK_Asymmetric, type JWK_Asymmetric_Algorithm, type JWK_EC, type JWK_ECDH_ES, type JWK_ECDSA, type JWK_EC_Private, type JWK_EC_Public, type JWK_HMAC, type JWK_OKP, type JWK_OKP_Private, type JWK_OKP_Public, type JWK_OKP_SIGN, type JWK_PBES2, type JWK_Pair, type JWK_Private, type JWK_Public, type JWK_RSA, type JWK_RSA_ENC, type JWK_RSA_PSS, type JWK_RSA_Private, type JWK_RSA_Public, type JWK_RSA_SIGN, type JWK_Symmetric, type JWK_Symmetric_Algorithm, type JWK_oct, type JWSAlgorithm, type JWSAsymmetricPrivateJWK, type JWSAsymmetricPublicJWK, type JWSFlattenedSerialization, type JWSGeneralSerialization, type JWSGeneralSignature, type JWSHeaderParameters, type JWSMultiSignOptions, type JWSMultiSigner, type JWSMultiVerifyAllOptions, type JWSMultiVerifyOptions, type JWSMultiVerifyOutcome, type JWSMultiVerifyResult, type JWSProtectedHeader, type JWSSignJWK, type JWSSignOptions, type JWSVerifyJWK, type JWSVerifyOptions, type JWSVerifyResult, type JWT, type JWTClaimValidationOptions, type JWTClaims, type JoseHeaderParameters, type KeyManagementAlgorithm, type MaxTokenAge, type NotBeforeIn, type SessionClaims, type SessionConfigJWE, type SessionConfigJWS, type SessionContext, type SessionData, type SessionHooksJWE, type SessionHooksJWS, type SessionJWE, type SessionJWS, type SessionManager, type SessionPlugin, type SessionUpdate, type UnwrapKeyOptions, type UnwrappingKeyFor, type WrapKeyOptions, type WrapKeyResult, type WrappingKeyFor, type WriteChunkedCookieOptions, createJWESession, createJWSSession, deriveJWKFromPassword, exportPEM, generateJWK, importPEM, jweSession, jwsSession };
105
+ })): SessionPlugin<{ [P in K]: SessionManager<T, MaxAge>; }, `require${Capitalize<K>}`>;
106
+ export { type ChunkableCookie, type ChunkableCookieJar, type CompositeKey, type ContentEncryptionAlgorithm, type CookieAttributes, type DeriveKeyOptions, type DeriveKeyReturn, type Duration, type ECDHEphemeralKeyInput, type ExpiresIn, type GenerateJWKOptions, type GenerateJWKReturn, type GenerateKeyAlgorithm, type GenerateKeyOptions, type GenerateKeyReturn, type GeneratedJWKMap, type GeneratedKeyMap, type ImportedKey, type ImportedKeyMap, type JOSEConsumerOptions, type JOSELimits, type JOSEPayload, type JOSEPayloadMode, type JOSEPayloadTypeMap, type JWEAsymmetricPrivateJWK, type JWEAsymmetricPublicJWK, type JWEDecryptJWK, type JWEDecryptOptions, type JWEDecryptResult, type JWEEncryptJWK, type JWEEncryptOptions, type JWEFlattenedSerialization, type JWEGeneralRecipient, type JWEGeneralSerialization, type JWEHeaderParameters, type JWEKeyManagementHeaderParameters, type JWELibraryHeaderName, type JWEMultiDecryptKey, type JWEMultiDecryptOptions, type JWEMultiDecryptResult, type JWEMultiEncryptOptions, type JWEMultiRecipient, type JWEProtectedHeader, type JWK, type JWKAlgorithm, type JWKCacheAdapter, type JWKLookupFunction, type JWKLookupFunctionHeader, type JWKMetadata, type JWKPEMAlgorithm, type JWKParameters, type JWKSet, type JWK_AES_CBC_HMAC, type JWK_AES_GCM, type JWK_AES_GCM_KW, type JWK_AES_KW, type JWK_Asymmetric, type JWK_Asymmetric_Algorithm, type JWK_EC, type JWK_ECDH_ES, type JWK_ECDSA, type JWK_EC_Private, type JWK_EC_Public, type JWK_HMAC, type JWK_OKP, type JWK_OKP_Private, type JWK_OKP_Public, type JWK_OKP_SIGN, type JWK_PBES2, type JWK_Pair, type JWK_Private, type JWK_Public, type JWK_RSA, type JWK_RSA_ENC, type JWK_RSA_PSS, type JWK_RSA_Private, type JWK_RSA_Public, type JWK_RSA_SIGN, type JWK_Symmetric, type JWK_Symmetric_Algorithm, type JWK_oct, type JWSAlgorithm, type JWSAsymmetricPrivateJWK, type JWSAsymmetricPublicJWK, type JWSFlattenedSerialization, type JWSGeneralSerialization, type JWSGeneralSignature, type JWSHeaderParameters, type JWSMultiSignOptions, type JWSMultiSigner, type JWSMultiVerifyAllOptions, type JWSMultiVerifyOptions, type JWSMultiVerifyOutcome, type JWSMultiVerifyResult, type JWSProtectedHeader, type JWSSignJWK, type JWSSignOptions, type JWSVerifyJWK, type JWSVerifyOptions, type JWSVerifyResult, type JWT, type JWTClaimValidationOptions, type JWTClaims, type JWTTimeClaimOptions, type JoseHeaderParameters, type KeyManagementAlgorithm, type MaxTokenAge, type NotBeforeIn, type PayloadOf, type SessionClaims, type SessionConfigJWE, type SessionConfigJWS, type SessionContext, type SessionData, type SessionDecryptOptions, type SessionEncryptOptions, type SessionHooksJWE, type SessionHooksJWS, type SessionIssueOptions, type SessionJWE, type SessionJWS, type SessionManager, type SessionPlugin, type SessionSignOptions, type SessionUpdate, type SessionUpdateTrigger, type SessionVerifyOptions, type UnwrapKeyOptions, type UnwrapKeyResult, type UnwrappingKeyFor, type WrapKeyOptions, type WrapKeyResult, type WrappingKeyFor, type WriteChunkedCookieOptions, deriveJWKFromPassword, exportPEM, generateJWK, importPEM, thumbprint };