@effect-auth/core 0.1.0-alpha.3 → 0.1.0-alpha.5

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 (158) hide show
  1. package/README.md +148 -13
  2. package/dist/ApiKey.d.ts +207 -0
  3. package/dist/ApiKey.d.ts.map +1 -0
  4. package/dist/ApiKey.js +275 -0
  5. package/dist/ApiKey.js.map +1 -0
  6. package/dist/AuditLog.d.ts +204 -1
  7. package/dist/AuditLog.d.ts.map +1 -1
  8. package/dist/AuditLog.js +170 -0
  9. package/dist/AuditLog.js.map +1 -1
  10. package/dist/AuthConfig.d.ts +0 -9
  11. package/dist/AuthConfig.d.ts.map +1 -1
  12. package/dist/AuthConfig.js +1 -14
  13. package/dist/AuthConfig.js.map +1 -1
  14. package/dist/AuthFlow.d.ts +220 -51
  15. package/dist/AuthFlow.d.ts.map +1 -1
  16. package/dist/AuthFlow.js +550 -22
  17. package/dist/AuthFlow.js.map +1 -1
  18. package/dist/AuthKernel.d.ts +1 -1
  19. package/dist/Challenge.d.ts +5 -1
  20. package/dist/Challenge.d.ts.map +1 -1
  21. package/dist/Challenge.js +58 -48
  22. package/dist/Challenge.js.map +1 -1
  23. package/dist/Client.d.ts +263 -1
  24. package/dist/Client.d.ts.map +1 -1
  25. package/dist/Client.js +533 -1
  26. package/dist/Client.js.map +1 -1
  27. package/dist/D1Kysely.d.ts +1 -1
  28. package/dist/D1Kysely.d.ts.map +1 -1
  29. package/dist/EffectQbSqliteStorage.d.ts +115 -3
  30. package/dist/EffectQbSqliteStorage.d.ts.map +1 -1
  31. package/dist/EffectQbSqliteStorage.js +314 -4
  32. package/dist/EffectQbSqliteStorage.js.map +1 -1
  33. package/dist/EmailOtp.d.ts +5 -2
  34. package/dist/EmailOtp.d.ts.map +1 -1
  35. package/dist/EmailOtp.js +11 -4
  36. package/dist/EmailOtp.js.map +1 -1
  37. package/dist/EmailVerification.d.ts +2 -2
  38. package/dist/EmailVerification.d.ts.map +1 -1
  39. package/dist/EmailVerification.js +2 -3
  40. package/dist/EmailVerification.js.map +1 -1
  41. package/dist/HttpApi/Api.d.ts +1363 -19
  42. package/dist/HttpApi/Api.d.ts.map +1 -1
  43. package/dist/HttpApi/Api.js +1625 -20
  44. package/dist/HttpApi/Api.js.map +1 -1
  45. package/dist/HttpApi/Endpoints.d.ts +682 -0
  46. package/dist/HttpApi/Endpoints.d.ts.map +1 -1
  47. package/dist/HttpApi/Endpoints.js +252 -1
  48. package/dist/HttpApi/Endpoints.js.map +1 -1
  49. package/dist/HttpApi/Schemas.d.ts +841 -0
  50. package/dist/HttpApi/Schemas.d.ts.map +1 -1
  51. package/dist/HttpApi/Schemas.js +513 -1
  52. package/dist/HttpApi/Schemas.js.map +1 -1
  53. package/dist/HttpApi/Security.d.ts +13 -1
  54. package/dist/HttpApi/Security.d.ts.map +1 -1
  55. package/dist/HttpApi/Security.js +107 -16
  56. package/dist/HttpApi/Security.js.map +1 -1
  57. package/dist/HttpApi/Transport.d.ts +36 -2
  58. package/dist/HttpApi/Transport.d.ts.map +1 -1
  59. package/dist/HttpApi/Transport.js +151 -9
  60. package/dist/HttpApi/Transport.js.map +1 -1
  61. package/dist/Jwt.d.ts +271 -0
  62. package/dist/Jwt.d.ts.map +1 -0
  63. package/dist/Jwt.js +512 -0
  64. package/dist/Jwt.js.map +1 -0
  65. package/dist/KyselyStorage.d.ts +151 -1
  66. package/dist/KyselyStorage.d.ts.map +1 -1
  67. package/dist/KyselyStorage.js +1021 -4
  68. package/dist/KyselyStorage.js.map +1 -1
  69. package/dist/LoginApproval.d.ts +314 -0
  70. package/dist/LoginApproval.d.ts.map +1 -0
  71. package/dist/LoginApproval.js +551 -0
  72. package/dist/LoginApproval.js.map +1 -0
  73. package/dist/LoginNotification.d.ts +183 -0
  74. package/dist/LoginNotification.d.ts.map +1 -0
  75. package/dist/LoginNotification.js +329 -0
  76. package/dist/LoginNotification.js.map +1 -0
  77. package/dist/LoginRisk.d.ts +73 -0
  78. package/dist/LoginRisk.d.ts.map +1 -0
  79. package/dist/LoginRisk.js +57 -0
  80. package/dist/LoginRisk.js.map +1 -0
  81. package/dist/MagicLink.d.ts +85 -0
  82. package/dist/MagicLink.d.ts.map +1 -0
  83. package/dist/MagicLink.js +206 -0
  84. package/dist/MagicLink.js.map +1 -0
  85. package/dist/Mailer.d.ts +33 -2
  86. package/dist/Mailer.d.ts.map +1 -1
  87. package/dist/Mailer.js +107 -0
  88. package/dist/Mailer.js.map +1 -1
  89. package/dist/OAuth.d.ts +742 -0
  90. package/dist/OAuth.d.ts.map +1 -0
  91. package/dist/OAuth.js +1387 -0
  92. package/dist/OAuth.js.map +1 -0
  93. package/dist/Passkey.d.ts +334 -0
  94. package/dist/Passkey.d.ts.map +1 -0
  95. package/dist/Passkey.js +422 -0
  96. package/dist/Passkey.js.map +1 -0
  97. package/dist/Password.d.ts +138 -8
  98. package/dist/Password.d.ts.map +1 -1
  99. package/dist/Password.js +397 -8
  100. package/dist/Password.js.map +1 -1
  101. package/dist/RecoveryCode.d.ts +169 -0
  102. package/dist/RecoveryCode.d.ts.map +1 -0
  103. package/dist/RecoveryCode.js +299 -0
  104. package/dist/RecoveryCode.js.map +1 -0
  105. package/dist/RefreshToken.d.ts +222 -0
  106. package/dist/RefreshToken.d.ts.map +1 -0
  107. package/dist/RefreshToken.js +342 -0
  108. package/dist/RefreshToken.js.map +1 -0
  109. package/dist/Sessions.d.ts +52 -2
  110. package/dist/Sessions.d.ts.map +1 -1
  111. package/dist/Sessions.js +123 -1
  112. package/dist/Sessions.js.map +1 -1
  113. package/dist/StepUp.d.ts +44 -0
  114. package/dist/StepUp.d.ts.map +1 -0
  115. package/dist/StepUp.js +82 -0
  116. package/dist/StepUp.js.map +1 -0
  117. package/dist/Storage.d.ts +14 -1
  118. package/dist/Storage.d.ts.map +1 -1
  119. package/dist/Storage.js.map +1 -1
  120. package/dist/StorageMigrations.d.ts +10 -1
  121. package/dist/StorageMigrations.d.ts.map +1 -1
  122. package/dist/StorageMigrations.js +179 -0
  123. package/dist/StorageMigrations.js.map +1 -1
  124. package/dist/Testing.d.ts +1 -1
  125. package/dist/Totp.d.ts +220 -0
  126. package/dist/Totp.d.ts.map +1 -0
  127. package/dist/Totp.js +477 -0
  128. package/dist/Totp.js.map +1 -0
  129. package/dist/TrustedDevice.d.ts +115 -0
  130. package/dist/TrustedDevice.d.ts.map +1 -0
  131. package/dist/TrustedDevice.js +222 -0
  132. package/dist/TrustedDevice.js.map +1 -0
  133. package/dist/Webhook.d.ts +72 -0
  134. package/dist/Webhook.d.ts.map +1 -0
  135. package/dist/Webhook.js +82 -0
  136. package/dist/Webhook.js.map +1 -0
  137. package/dist/alchemy/cloudflare/Email.d.ts +25 -0
  138. package/dist/alchemy/cloudflare/Email.d.ts.map +1 -0
  139. package/dist/alchemy/cloudflare/Email.js +117 -0
  140. package/dist/alchemy/cloudflare/Email.js.map +1 -0
  141. package/dist/cloudflare/Email.d.ts +25 -0
  142. package/dist/cloudflare/Email.d.ts.map +1 -0
  143. package/dist/cloudflare/Email.js +153 -0
  144. package/dist/cloudflare/Email.js.map +1 -0
  145. package/dist/index.d.ts +14 -0
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +14 -0
  148. package/dist/index.js.map +1 -1
  149. package/migrations/0003_auth_login_approval_review.sql +22 -0
  150. package/migrations/0004_auth_trusted_device.sql +12 -0
  151. package/migrations/0005_auth_passkey.sql +17 -0
  152. package/migrations/0006_auth_totp_factor.sql +17 -0
  153. package/migrations/0007_auth_recovery_code.sql +13 -0
  154. package/migrations/0008_auth_api_key.sql +17 -0
  155. package/migrations/0009_auth_refresh_token.sql +21 -0
  156. package/migrations/0010_auth_jwt_revocation.sql +8 -0
  157. package/migrations/0011_auth_oauth_account.sql +16 -0
  158. package/package.json +65 -1
package/dist/Jwt.d.ts ADDED
@@ -0,0 +1,271 @@
1
+ import { Brand, Context, Duration, Effect, Layer, Redacted } from "effect";
2
+ import type * as OptionTypes from "effect/Option";
3
+ import { Crypto } from "./Crypto.js";
4
+ import type { CryptoKey, CryptoService } from "./Crypto.js";
5
+ import { UnixMillis } from "./Identifiers.js";
6
+ export type JwtKeyId = Brand.Branded<string, "auth/JwtKeyId">;
7
+ export declare const JwtKeyId: Brand.Constructor<JwtKeyId>;
8
+ export type JwtToken = Brand.Branded<string, "auth/JwtToken">;
9
+ export declare const JwtToken: Brand.Constructor<JwtToken>;
10
+ export declare const JwtAlgorithms: readonly ["HS256", "RS256", "ES256", "EdDSA"];
11
+ export type JwtAlgorithm = (typeof JwtAlgorithms)[number];
12
+ export type JwtKeyStatus = "active" | "retired" | "disabled";
13
+ export type JwtAudience = string | readonly string[];
14
+ export interface JwtClaims extends Readonly<Record<string, unknown>> {
15
+ readonly iss?: string;
16
+ readonly sub?: string;
17
+ readonly aud?: JwtAudience;
18
+ readonly exp?: number;
19
+ readonly nbf?: number;
20
+ readonly iat?: number;
21
+ readonly jti?: string;
22
+ }
23
+ export interface JwtHeader extends Readonly<Record<string, unknown>> {
24
+ readonly typ: "JWT";
25
+ readonly alg: JwtAlgorithm;
26
+ readonly kid: JwtKeyId;
27
+ }
28
+ export interface JwtPublicJwk extends Readonly<Record<string, unknown>> {
29
+ readonly kty: string;
30
+ readonly kid?: string;
31
+ readonly use?: string;
32
+ readonly key_ops?: readonly string[];
33
+ readonly alg?: string;
34
+ }
35
+ export interface JwtPrivateJwk extends JwtPublicJwk {
36
+ }
37
+ export interface JwksDocument {
38
+ readonly keys: readonly JwtPublicJwk[];
39
+ }
40
+ export interface JwtKeyRecord {
41
+ readonly id: JwtKeyId;
42
+ readonly alg: JwtAlgorithm;
43
+ readonly status: JwtKeyStatus;
44
+ readonly secret?: CryptoKey;
45
+ readonly publicJwk?: JwtPublicJwk;
46
+ readonly privateJwk?: JwtPrivateJwk;
47
+ readonly createdAt?: UnixMillis;
48
+ readonly expiresAt?: UnixMillis;
49
+ readonly metadata?: Readonly<Record<string, unknown>>;
50
+ }
51
+ export interface JwtKeyInfo {
52
+ readonly id: JwtKeyId;
53
+ readonly alg: JwtAlgorithm;
54
+ readonly status: JwtKeyStatus;
55
+ readonly createdAt?: UnixMillis;
56
+ readonly expiresAt?: UnixMillis;
57
+ readonly metadata?: Readonly<Record<string, unknown>>;
58
+ }
59
+ export interface JwtSelectSigningKeyInput {
60
+ readonly alg?: JwtAlgorithm;
61
+ readonly now?: UnixMillis;
62
+ }
63
+ export interface JwtFindVerificationKeyInput extends JwtSelectSigningKeyInput {
64
+ readonly kid: JwtKeyId;
65
+ }
66
+ export interface JwtListPublicJwksInput {
67
+ readonly now?: UnixMillis;
68
+ }
69
+ export type JwtOperation = "issue" | "verify" | "keys" | "jwks" | "revocation" | "signature";
70
+ declare const JwtError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
71
+ readonly _tag: "JwtError";
72
+ } & Readonly<A>;
73
+ export declare class JwtError extends JwtError_base<{
74
+ readonly operation: JwtOperation;
75
+ readonly message: string;
76
+ readonly cause?: unknown;
77
+ }> {
78
+ }
79
+ export interface JwtKeysService {
80
+ readonly selectSigningKey: (input?: JwtSelectSigningKeyInput) => Effect.Effect<OptionTypes.Option<JwtKeyRecord>, JwtError>;
81
+ readonly findVerificationKey: (input: JwtFindVerificationKeyInput) => Effect.Effect<OptionTypes.Option<JwtKeyRecord>, JwtError>;
82
+ readonly listPublicJwks: (input?: JwtListPublicJwksInput) => Effect.Effect<readonly JwtPublicJwk[], JwtError>;
83
+ }
84
+ declare const JwtKeys_base: Context.ServiceClass<JwtKeys, "auth/JwtKeys", JwtKeysService>;
85
+ export declare class JwtKeys extends JwtKeys_base {
86
+ }
87
+ export declare namespace JwtKeys {
88
+ const make: (service: JwtKeysService) => JwtKeysService;
89
+ }
90
+ export interface JwtIssueInput {
91
+ readonly alg?: JwtAlgorithm;
92
+ readonly issuer?: string;
93
+ readonly subject?: string;
94
+ readonly audience?: JwtAudience;
95
+ readonly expiresAt?: UnixMillis;
96
+ readonly expiresIn?: Duration.Duration;
97
+ readonly notBefore?: UnixMillis;
98
+ readonly issuedAt?: UnixMillis;
99
+ readonly jwtId?: string;
100
+ readonly claims?: Readonly<Record<string, unknown>>;
101
+ }
102
+ export interface IssuedJwt {
103
+ readonly token: Redacted.Redacted<JwtToken>;
104
+ readonly header: JwtHeader;
105
+ readonly claims: JwtClaims;
106
+ readonly key: JwtKeyInfo;
107
+ }
108
+ export interface JwtIssuerService {
109
+ readonly issue: (input: JwtIssueInput) => Effect.Effect<IssuedJwt, JwtError>;
110
+ }
111
+ declare const JwtIssuer_base: Context.ServiceClass<JwtIssuer, "auth/JwtIssuer", JwtIssuerService>;
112
+ export declare class JwtIssuer extends JwtIssuer_base {
113
+ }
114
+ export declare namespace JwtIssuer {
115
+ const make: (service: JwtIssuerService) => JwtIssuerService;
116
+ }
117
+ export type JwtVerificationFailureReason = "malformed" | "unsupported_alg" | "unknown_key" | "invalid_signature" | "expired" | "not_yet_valid" | "issuer_mismatch" | "audience_mismatch";
118
+ export interface JwtVerifyInput {
119
+ readonly token: Redacted.Redacted<string>;
120
+ readonly issuer?: string;
121
+ readonly audience?: JwtAudience;
122
+ readonly now?: UnixMillis;
123
+ readonly clockTolerance?: Duration.Duration;
124
+ }
125
+ export type JwtVerificationResult = {
126
+ readonly valid: true;
127
+ readonly header: JwtHeader;
128
+ readonly claims: JwtClaims;
129
+ readonly key: JwtKeyInfo;
130
+ } | {
131
+ readonly valid: false;
132
+ readonly reason: JwtVerificationFailureReason;
133
+ };
134
+ export interface JwtVerifierService {
135
+ readonly verify: (input: JwtVerifyInput) => Effect.Effect<JwtVerificationResult, JwtError>;
136
+ }
137
+ declare const JwtVerifier_base: Context.ServiceClass<JwtVerifier, "auth/JwtVerifier", JwtVerifierService>;
138
+ export declare class JwtVerifier extends JwtVerifier_base {
139
+ }
140
+ export declare namespace JwtVerifier {
141
+ const make: (service: JwtVerifierService) => JwtVerifierService;
142
+ }
143
+ export interface JwtSignatureKeyInput {
144
+ readonly alg: JwtAlgorithm;
145
+ readonly key: JwtKeyRecord;
146
+ }
147
+ export interface JwtSignatureSignInput extends JwtSignatureKeyInput {
148
+ readonly signingInput: string;
149
+ }
150
+ export interface JwtSignatureVerifyInput extends JwtSignatureSignInput {
151
+ readonly signature: string;
152
+ }
153
+ export interface JwtSignatureService {
154
+ readonly supports: (alg: JwtAlgorithm) => boolean;
155
+ readonly canSign: (input: JwtSignatureKeyInput) => boolean;
156
+ readonly canVerify: (input: JwtSignatureKeyInput) => boolean;
157
+ readonly sign: (input: JwtSignatureSignInput) => Effect.Effect<string, JwtError>;
158
+ readonly verify: (input: JwtSignatureVerifyInput) => Effect.Effect<boolean, JwtError>;
159
+ }
160
+ declare const JwtSignature_base: Context.ServiceClass<JwtSignature, "auth/JwtSignature", JwtSignatureService>;
161
+ export declare class JwtSignature extends JwtSignature_base {
162
+ }
163
+ export declare namespace JwtSignature {
164
+ const make: (service: JwtSignatureService) => JwtSignatureService;
165
+ }
166
+ export interface JwksService {
167
+ readonly document: (input?: JwtListPublicJwksInput) => Effect.Effect<JwksDocument, JwtError>;
168
+ }
169
+ declare const Jwks_base: Context.ServiceClass<Jwks, "auth/Jwks", JwksService>;
170
+ export declare class Jwks extends Jwks_base {
171
+ }
172
+ export declare namespace Jwks {
173
+ const make: (service: JwksService) => JwksService;
174
+ }
175
+ export interface JwtRevocationRecord {
176
+ readonly jwtId: string;
177
+ readonly revokedAt: UnixMillis;
178
+ readonly expiresAt?: UnixMillis;
179
+ readonly reason?: string;
180
+ }
181
+ export interface JwtRevocationStoreService {
182
+ readonly revoke: (record: JwtRevocationRecord) => Effect.Effect<void, JwtError>;
183
+ readonly find: (jwtId: string) => Effect.Effect<OptionTypes.Option<JwtRevocationRecord>, JwtError>;
184
+ }
185
+ declare const JwtRevocationStore_base: Context.ServiceClass<JwtRevocationStore, "auth/JwtRevocationStore", JwtRevocationStoreService>;
186
+ export declare class JwtRevocationStore extends JwtRevocationStore_base {
187
+ }
188
+ export declare namespace JwtRevocationStore {
189
+ const make: (service: JwtRevocationStoreService) => JwtRevocationStoreService;
190
+ }
191
+ export interface JwtRevokeJwtIdInput {
192
+ readonly jwtId: string;
193
+ readonly revokedAt?: UnixMillis;
194
+ readonly expiresAt?: UnixMillis;
195
+ readonly reason?: string;
196
+ }
197
+ export interface JwtIsRevokedInput {
198
+ readonly jwtId: string;
199
+ readonly now?: UnixMillis;
200
+ }
201
+ export type JwtIntrospectionInactiveReason = JwtVerificationFailureReason | "revoked";
202
+ export type JwtIntrospectionResult = {
203
+ readonly active: true;
204
+ readonly header: JwtHeader;
205
+ readonly claims: JwtClaims;
206
+ readonly key: JwtKeyInfo;
207
+ readonly jwtId?: string;
208
+ readonly expiresAt?: UnixMillis;
209
+ readonly revoked: false;
210
+ } | {
211
+ readonly active: false;
212
+ readonly reason: JwtIntrospectionInactiveReason;
213
+ readonly jwtId?: string;
214
+ readonly expiresAt?: UnixMillis;
215
+ readonly revokedAt?: UnixMillis;
216
+ readonly revokedReason?: string;
217
+ };
218
+ export interface JwtRevocationService {
219
+ readonly revokeJwtId: (input: JwtRevokeJwtIdInput) => Effect.Effect<JwtRevocationRecord, JwtError>;
220
+ readonly isRevoked: (input: JwtIsRevokedInput) => Effect.Effect<boolean, JwtError>;
221
+ readonly introspect: (input: JwtVerifyInput) => Effect.Effect<JwtIntrospectionResult, JwtError>;
222
+ }
223
+ declare const JwtRevocation_base: Context.ServiceClass<JwtRevocation, "auth/JwtRevocation", JwtRevocationService>;
224
+ export declare class JwtRevocation extends JwtRevocation_base {
225
+ }
226
+ export declare namespace JwtRevocation {
227
+ const make: (service: JwtRevocationService) => JwtRevocationService;
228
+ }
229
+ export type JwtServiceDependencies = {
230
+ readonly keys: JwtKeysService;
231
+ } & ({
232
+ readonly crypto: CryptoService;
233
+ readonly signature?: JwtSignatureService;
234
+ } | {
235
+ readonly crypto?: CryptoService;
236
+ readonly signature: JwtSignatureService;
237
+ });
238
+ export interface JwtSignatureDependencies {
239
+ readonly crypto: CryptoService;
240
+ }
241
+ export interface JwtWebCryptoRs256SignatureOptions {
242
+ readonly crypto?: typeof globalThis.crypto;
243
+ }
244
+ export interface JwtRevocationDependencies {
245
+ readonly verifier: JwtVerifierService;
246
+ readonly store: JwtRevocationStoreService;
247
+ }
248
+ export declare const makeJwtKeysMemory: (records: readonly JwtKeyRecord[]) => JwtKeysService;
249
+ export declare const JwtKeysMemoryLive: (records: readonly JwtKeyRecord[]) => Layer.Layer<JwtKeys, never, never>;
250
+ export declare const makeJwtRevocationStoreMemory: () => JwtRevocationStoreService;
251
+ export declare const JwtRevocationStoreMemoryLive: Layer.Layer<JwtRevocationStore, never, never>;
252
+ export declare const makeJwtRevocation: (dependencies: JwtRevocationDependencies) => JwtRevocationService;
253
+ export declare const makeJwtSignature: (dependencies: JwtSignatureDependencies) => JwtSignatureService;
254
+ export declare const makeJwtWebCryptoRs256Signature: (options?: JwtWebCryptoRs256SignatureOptions) => JwtSignatureService;
255
+ export declare const makeJwtIssuer: (dependencies: JwtServiceDependencies) => JwtIssuerService;
256
+ export declare const makeJwtVerifier: (dependencies: JwtServiceDependencies) => JwtVerifierService;
257
+ export declare const makeJwks: (dependencies: {
258
+ readonly keys: JwtKeysService;
259
+ }) => JwksService;
260
+ export declare const JwtSignatureLive: Layer.Layer<JwtSignature, never, Crypto>;
261
+ export declare const JwtWebCryptoRs256SignatureLive: (options?: JwtWebCryptoRs256SignatureOptions) => Layer.Layer<JwtSignature, never, never>;
262
+ export declare const JwtIssuerWithSignatureLive: Layer.Layer<JwtIssuer, never, JwtKeys | JwtSignature>;
263
+ export declare const JwtVerifierWithSignatureLive: Layer.Layer<JwtVerifier, never, JwtKeys | JwtSignature>;
264
+ export declare const JwtIssuerLive: Layer.Layer<JwtIssuer, never, Crypto | JwtKeys>;
265
+ export declare const JwtVerifierLive: Layer.Layer<JwtVerifier, never, Crypto | JwtKeys>;
266
+ export declare const JwksLive: Layer.Layer<Jwks, never, JwtKeys>;
267
+ export declare const JwtRevocationLive: Layer.Layer<JwtRevocation, never, JwtVerifier | JwtRevocationStore>;
268
+ export declare const JwtWithSignatureLive: Layer.Layer<JwtIssuer | JwtVerifier | Jwks, never, JwtKeys | JwtSignature>;
269
+ export declare const JwtLive: Layer.Layer<JwtIssuer | JwtVerifier | Jwks, never, Crypto | JwtKeys>;
270
+ export {};
271
+ //# sourceMappingURL=Jwt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Jwt.d.ts","sourceRoot":"","sources":["../src/Jwt.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EAEP,QAAQ,EACR,MAAM,EAEN,KAAK,EAEL,QAAQ,EAET,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,KAAK,WAAW,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAC9D,eAAO,MAAM,QAAQ,6BAA4B,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAC9D,eAAO,MAAM,QAAQ,6BAA4B,CAAC;AAElD,eAAO,MAAM,aAAa,+CAAgD,CAAC;AAC3E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7D,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;AAErD,MAAM,WAAW,SAAU,SAAQ,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