@absolutejs/auth 0.65.0 → 0.65.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/dist/index.js +7 -3
  2. package/dist/index.js.map +3 -3
  3. package/dist/server.js +7 -3
  4. package/dist/server.js.map +3 -3
  5. package/package.json +1 -1
  6. package/dist/abuse/captcha.d.ts +0 -11
  7. package/dist/abuse/config.d.ts +0 -29
  8. package/dist/actions.d.ts +0 -27
  9. package/dist/adaptive/config.d.ts +0 -34
  10. package/dist/adaptive/fingerprint.d.ts +0 -2
  11. package/dist/adaptive/inMemoryStores.d.ts +0 -3
  12. package/dist/adaptive/postgresStores.d.ts +0 -245
  13. package/dist/adaptive/types.d.ts +0 -62
  14. package/dist/agents/config.d.ts +0 -49
  15. package/dist/agents/context.d.ts +0 -46
  16. package/dist/agents/idJag.d.ts +0 -49
  17. package/dist/agents/inMemoryStores.d.ts +0 -4
  18. package/dist/agents/index.d.ts +0 -13
  19. package/dist/agents/oauthGuide.d.ts +0 -18
  20. package/dist/agents/oidcAdapter.d.ts +0 -20
  21. package/dist/agents/postgresStores.d.ts +0 -1176
  22. package/dist/agents/principal.d.ts +0 -4
  23. package/dist/agents/registration.d.ts +0 -162
  24. package/dist/agents/registrationClient.d.ts +0 -50
  25. package/dist/agents/routes.d.ts +0 -256
  26. package/dist/agents/types.d.ts +0 -129
  27. package/dist/apikeys/config.d.ts +0 -64
  28. package/dist/apikeys/inMemoryStores.d.ts +0 -4
  29. package/dist/apikeys/postgresStores.d.ts +0 -359
  30. package/dist/apikeys/routes.d.ts +0 -83
  31. package/dist/apikeys/types.d.ts +0 -53
  32. package/dist/audit/config.d.ts +0 -9
  33. package/dist/audit/export.d.ts +0 -2
  34. package/dist/audit/inMemoryAuditStore.d.ts +0 -2
  35. package/dist/audit/integrity.d.ts +0 -19
  36. package/dist/audit/postgresAuditStore.d.ts +0 -116
  37. package/dist/audit/siem.d.ts +0 -11
  38. package/dist/audit/types.d.ts +0 -21
  39. package/dist/audit/wrap.d.ts +0 -11
  40. package/dist/authContext.d.ts +0 -193
  41. package/dist/authorization/config.d.ts +0 -19
  42. package/dist/authorization/protectPermission.d.ts +0 -52
  43. package/dist/cli/import/auth0.d.ts +0 -2
  44. package/dist/cli/import/clerk.d.ts +0 -2
  45. package/dist/cli/import/index.d.ts +0 -10
  46. package/dist/cli/import/lucia.d.ts +0 -2
  47. package/dist/cli/import/nextauth.d.ts +0 -2
  48. package/dist/cli/import/supabase.d.ts +0 -2
  49. package/dist/cli/import/types.d.ts +0 -27
  50. package/dist/cli/migrate.d.ts +0 -2
  51. package/dist/client/components/react/SignIn.d.ts +0 -32
  52. package/dist/client/components/react/SignUp.d.ts +0 -29
  53. package/dist/client/components/react/UserButton.d.ts +0 -36
  54. package/dist/client/createAuthClient.d.ts +0 -285
  55. package/dist/client/index.d.ts +0 -4
  56. package/dist/client/passkeyHelpers.d.ts +0 -19
  57. package/dist/client/react.d.ts +0 -87
  58. package/dist/client/sessionExpiry.d.ts +0 -37
  59. package/dist/client/solid.d.ts +0 -86
  60. package/dist/client/svelte.d.ts +0 -86
  61. package/dist/client/vue.d.ts +0 -88
  62. package/dist/compliance/cipher.d.ts +0 -11
  63. package/dist/compliance/config.d.ts +0 -18
  64. package/dist/compliance/redaction.d.ts +0 -8
  65. package/dist/compliance/routes.d.ts +0 -89
  66. package/dist/constants.d.ts +0 -10
  67. package/dist/credentials/backgroundOps.d.ts +0 -45
  68. package/dist/credentials/config.d.ts +0 -94
  69. package/dist/credentials/emailValidation.d.ts +0 -9
  70. package/dist/credentials/emailVerification.d.ts +0 -83
  71. package/dist/credentials/import.d.ts +0 -49
  72. package/dist/credentials/inMemoryCredentialStore.d.ts +0 -2
  73. package/dist/credentials/legacyHashers.d.ts +0 -3
  74. package/dist/credentials/login.d.ts +0 -76
  75. package/dist/credentials/passwordPolicy.d.ts +0 -15
  76. package/dist/credentials/passwordReset.d.ts +0 -87
  77. package/dist/credentials/postgresCredentialStore.d.ts +0 -235
  78. package/dist/credentials/register.d.ts +0 -54
  79. package/dist/credentials/routes.d.ts +0 -201
  80. package/dist/credentials/types.d.ts +0 -26
  81. package/dist/crypto.d.ts +0 -32
  82. package/dist/csrf.d.ts +0 -10
  83. package/dist/errors.d.ts +0 -12
  84. package/dist/federation/tokenStore.d.ts +0 -29
  85. package/dist/fga/config.d.ts +0 -53
  86. package/dist/fga/inMemoryStores.d.ts +0 -3
  87. package/dist/fga/postgresStores.d.ts +0 -116
  88. package/dist/fga/redisCheckCache.d.ts +0 -11
  89. package/dist/fga/schema.d.ts +0 -2
  90. package/dist/fga/types.d.ts +0 -28
  91. package/dist/fingerprint-client/index.d.ts +0 -26
  92. package/dist/htmx/configuredRoutes.d.ts +0 -542
  93. package/dist/htmx/index.d.ts +0 -2
  94. package/dist/htmx/renderers.d.ts +0 -8
  95. package/dist/htmx/routes.d.ts +0 -514
  96. package/dist/htmx/types.d.ts +0 -129
  97. package/dist/index.d.ts +0 -3647
  98. package/dist/linkedProviders/inMemoryStores.d.ts +0 -9
  99. package/dist/linkedProviders/index.d.ts +0 -3
  100. package/dist/linkedProviders/neonStores.d.ts +0 -484
  101. package/dist/linkedProviders/oauthAccountResolver.d.ts +0 -28
  102. package/dist/linkedProviders/oauthResolver.d.ts +0 -9
  103. package/dist/linkedProviders/resolver.d.ts +0 -22
  104. package/dist/lockout/config.d.ts +0 -17
  105. package/dist/lockout/inMemoryLockoutStore.d.ts +0 -2
  106. package/dist/lockout/postgresLockoutStore.d.ts +0 -71
  107. package/dist/lockout/redisLockoutStore.d.ts +0 -3
  108. package/dist/lockout/types.d.ts +0 -12
  109. package/dist/manifest.d.ts +0 -18
  110. package/dist/manifest.json +0 -373
  111. package/dist/mfa/backupCodes.d.ts +0 -5
  112. package/dist/mfa/challenge.d.ts +0 -72
  113. package/dist/mfa/config.d.ts +0 -59
  114. package/dist/mfa/gate.d.ts +0 -2
  115. package/dist/mfa/inMemoryMfaStore.d.ts +0 -2
  116. package/dist/mfa/management.d.ts +0 -106
  117. package/dist/mfa/postgresMfaStore.d.ts +0 -266
  118. package/dist/mfa/recentAuth.d.ts +0 -2
  119. package/dist/mfa/rotation.d.ts +0 -17
  120. package/dist/mfa/routes.d.ts +0 -239
  121. package/dist/mfa/secret.d.ts +0 -2
  122. package/dist/mfa/sms.d.ts +0 -143
  123. package/dist/mfa/totp.d.ts +0 -91
  124. package/dist/mfa/types.d.ts +0 -58
  125. package/dist/migrations/generate.d.ts +0 -2
  126. package/dist/migrations/index.d.ts +0 -6
  127. package/dist/migrations/runner.d.ts +0 -22
  128. package/dist/migrations/types.d.ts +0 -14
  129. package/dist/oidc/clientAuth.d.ts +0 -19
  130. package/dist/oidc/clientIdMetadata.d.ts +0 -28
  131. package/dist/oidc/config.d.ts +0 -307
  132. package/dist/oidc/dpop.d.ts +0 -23
  133. package/dist/oidc/inMemoryStores.d.ts +0 -11
  134. package/dist/oidc/inMemoryVciStores.d.ts +0 -3
  135. package/dist/oidc/index.d.ts +0 -12
  136. package/dist/oidc/jar.d.ts +0 -14
  137. package/dist/oidc/keys.d.ts +0 -50
  138. package/dist/oidc/logout.d.ts +0 -38
  139. package/dist/oidc/mtls.d.ts +0 -11
  140. package/dist/oidc/operator.d.ts +0 -14
  141. package/dist/oidc/par.d.ts +0 -28
  142. package/dist/oidc/postgresStores.d.ts +0 -1217
  143. package/dist/oidc/registration.d.ts +0 -138
  144. package/dist/oidc/routes.d.ts +0 -569
  145. package/dist/oidc/types.d.ts +0 -157
  146. package/dist/oidc/userinfo.d.ts +0 -21
  147. package/dist/oidc/vci.d.ts +0 -159
  148. package/dist/oidc/vciRoutes.d.ts +0 -92
  149. package/dist/organizations/config.d.ts +0 -46
  150. package/dist/organizations/inMemoryOrganizationStore.d.ts +0 -2
  151. package/dist/organizations/operations.d.ts +0 -39
  152. package/dist/organizations/postgresOrganizationStore.d.ts +0 -340
  153. package/dist/organizations/routes.d.ts +0 -299
  154. package/dist/organizations/types.d.ts +0 -45
  155. package/dist/passwordless/config.d.ts +0 -43
  156. package/dist/passwordless/inMemoryPasswordlessTokenStore.d.ts +0 -2
  157. package/dist/passwordless/postgresPasswordlessTokenStore.d.ts +0 -56
  158. package/dist/passwordless/routes.d.ts +0 -163
  159. package/dist/passwordless/types.d.ts +0 -9
  160. package/dist/pluginIdentity.d.ts +0 -2
  161. package/dist/plugins/denyDisposableEmail.d.ts +0 -7
  162. package/dist/plugins/discordAlert.d.ts +0 -7
  163. package/dist/plugins/geoBlock.d.ts +0 -8
  164. package/dist/plugins/index.d.ts +0 -12
  165. package/dist/plugins/pagerdutyAlert.d.ts +0 -9
  166. package/dist/plugins/posthogIdentify.d.ts +0 -7
  167. package/dist/plugins/slackAlert.d.ts +0 -7
  168. package/dist/portal/config.d.ts +0 -34
  169. package/dist/portal/inMemorySetupSessionStore.d.ts +0 -2
  170. package/dist/portal/operations.d.ts +0 -10
  171. package/dist/portal/postgresSetupSessionStore.d.ts +0 -116
  172. package/dist/portal/routes.d.ts +0 -160
  173. package/dist/portal/types.d.ts +0 -16
  174. package/dist/providers/clients.d.ts +0 -1831
  175. package/dist/providers/index.d.ts +0 -2
  176. package/dist/providersFromEnv.d.ts +0 -19
  177. package/dist/redirect.d.ts +0 -2
  178. package/dist/roles/config.d.ts +0 -27
  179. package/dist/roles/inMemoryRoleStore.d.ts +0 -2
  180. package/dist/roles/operations.d.ts +0 -8
  181. package/dist/roles/postgresRoleStore.d.ts +0 -86
  182. package/dist/roles/resolver.d.ts +0 -17
  183. package/dist/roles/routes.d.ts +0 -106
  184. package/dist/roles/types.d.ts +0 -14
  185. package/dist/routes/authorize.d.ts +0 -102
  186. package/dist/routes/callback.d.ts +0 -64
  187. package/dist/routes/profile.d.ts +0 -73
  188. package/dist/routes/protectRoute.d.ts +0 -51
  189. package/dist/routes/refresh.d.ts +0 -74
  190. package/dist/routes/requireAuth.d.ts +0 -43
  191. package/dist/routes/revoke.d.ts +0 -73
  192. package/dist/routes/sessions.d.ts +0 -103
  193. package/dist/routes/signout.d.ts +0 -70
  194. package/dist/routes/stepUp.d.ts +0 -48
  195. package/dist/routes/userStatus.d.ts +0 -72
  196. package/dist/saml.d.ts +0 -1
  197. package/dist/scim/config.d.ts +0 -57
  198. package/dist/scim/extensions.d.ts +0 -30
  199. package/dist/scim/inMemoryScimTokenStore.d.ts +0 -2
  200. package/dist/scim/postgresScimTokenStore.d.ts +0 -86
  201. package/dist/scim/routes.d.ts +0 -366
  202. package/dist/scim/serialize.d.ts +0 -83
  203. package/dist/scim/types.d.ts +0 -54
  204. package/dist/server.d.ts +0 -34
  205. package/dist/session/access.d.ts +0 -33
  206. package/dist/session/anonymous.d.ts +0 -12
  207. package/dist/session/cleanup.d.ts +0 -45
  208. package/dist/session/cookieReader.d.ts +0 -10
  209. package/dist/session/impersonation.d.ts +0 -34
  210. package/dist/session/inMemoryStore.d.ts +0 -7
  211. package/dist/session/multiSession.d.ts +0 -27
  212. package/dist/session/neonStore.d.ts +0 -573
  213. package/dist/session/promote.d.ts +0 -23
  214. package/dist/session/redisStore.d.ts +0 -6
  215. package/dist/session/sessionsConfig.d.ts +0 -9
  216. package/dist/session/state.d.ts +0 -33
  217. package/dist/session/types.d.ts +0 -23
  218. package/dist/session/userSessions.d.ts +0 -19
  219. package/dist/sso/config.d.ts +0 -149
  220. package/dist/sso/discoveryRoute.d.ts +0 -63
  221. package/dist/sso/inMemorySamlServiceProviderStore.d.ts +0 -2
  222. package/dist/sso/inMemorySsoConnectionStore.d.ts +0 -2
  223. package/dist/sso/nodeSamlAdapter.d.ts +0 -8
  224. package/dist/sso/oidcRoutes.d.ts +0 -98
  225. package/dist/sso/postgresSamlServiceProviderStore.d.ts +0 -101
  226. package/dist/sso/postgresSsoConnectionStore.d.ts +0 -117
  227. package/dist/sso/samlIdpRoutes.d.ts +0 -139
  228. package/dist/sso/samlRoutes.d.ts +0 -179
  229. package/dist/sso/types.d.ts +0 -53
  230. package/dist/stores/postgres.d.ts +0 -5
  231. package/dist/stores/redis.d.ts +0 -5
  232. package/dist/telemetry/tracing.d.ts +0 -15
  233. package/dist/tenancy.d.ts +0 -9
  234. package/dist/typeGuards.d.ts +0 -6
  235. package/dist/typebox.d.ts +0 -4
  236. package/dist/types.d.ts +0 -431
  237. package/dist/utils.d.ts +0 -45
  238. package/dist/vault/config.d.ts +0 -20
  239. package/dist/vault/inMemoryVaultStore.d.ts +0 -2
  240. package/dist/vault/index.d.ts +0 -5
  241. package/dist/vault/postgresVaultStore.d.ts +0 -86
  242. package/dist/vault/types.d.ts +0 -14
  243. package/dist/vc/inMemoryVpStores.d.ts +0 -2
  244. package/dist/vc/openid4vp.d.ts +0 -82
  245. package/dist/vc/postgresVcStores.d.ts +0 -300
  246. package/dist/vc/sdJwt.d.ts +0 -37
  247. package/dist/vc/statusList.d.ts +0 -29
  248. package/dist/vc/statusListRoutes.d.ts +0 -63
  249. package/dist/vc/vpRoutes.d.ts +0 -120
  250. package/dist/verification/types.d.ts +0 -58
  251. package/dist/webauthn/adapter.d.ts +0 -59
  252. package/dist/webauthn/config.d.ts +0 -36
  253. package/dist/webauthn/inMemoryWebAuthnCredentialStore.d.ts +0 -2
  254. package/dist/webauthn/postgresWebAuthnCredentialStore.d.ts +0 -146
  255. package/dist/webauthn/routes.d.ts +0 -155
  256. package/dist/webauthn/simpleWebAuthnAdapter.d.ts +0 -3
  257. package/dist/webauthn/types.d.ts +0 -17
  258. package/dist/webauthn.d.ts +0 -1
  259. package/dist/webhooks/config.d.ts +0 -34
  260. package/dist/webhooks/dispatcher.d.ts +0 -3
  261. package/dist/webhooks/inMemoryStore.d.ts +0 -2
  262. package/dist/webhooks/postgresStore.d.ts +0 -116
  263. package/dist/webhooks/sign.d.ts +0 -11
  264. package/dist/webhooks/types.d.ts +0 -25
@@ -1,82 +0,0 @@
1
- import { type SigningKey } from '../oidc/keys';
2
- export type PresentationResponseInput = {
3
- requestId: string;
4
- vpToken: string;
5
- };
6
- export type PresentationRequest = {
7
- clientId: string;
8
- createdAt: number;
9
- expectedIssuerPublicJwk: JsonWebKey;
10
- expiresAt: number;
11
- nonce: string;
12
- requestedClaims: string[];
13
- requestId: string;
14
- responseUri: string;
15
- state: string | undefined;
16
- };
17
- export type PresentationRequestStore = {
18
- consumeRequest: (requestId: string) => Promise<PresentationRequest | undefined>;
19
- getRequest: (requestId: string) => Promise<PresentationRequest | undefined>;
20
- saveRequest: (request: PresentationRequest) => Promise<void>;
21
- };
22
- export type Vp4Config = {
23
- clientSigningKey: SigningKey;
24
- defaultExpectedIssuerPublicJwk: JsonWebKey;
25
- getResponseUri: (requestId: string) => string;
26
- requestStore: PresentationRequestStore;
27
- requestTtlMs?: number;
28
- statusListResolver?: (uri: string) => Promise<string | undefined>;
29
- statusListPublicJwk?: JsonWebKey;
30
- };
31
- export type CreatePresentationRequestInput = {
32
- clientId: string;
33
- now?: number;
34
- requestedClaims: string[];
35
- state?: string;
36
- };
37
- export declare const createPresentationRequest: ({ config, getRequestUri, input, issuer }: {
38
- config: Vp4Config;
39
- getRequestUri: (requestId: string) => string;
40
- input: CreatePresentationRequestInput;
41
- issuer: string;
42
- }) => Promise<{
43
- nonce: string;
44
- request: PresentationRequest;
45
- requestObject: string;
46
- requestUri: string;
47
- }>;
48
- export type VerifiedPresentation = {
49
- disclosedClaims: Record<string, unknown>;
50
- holderJwk: JsonWebKey | undefined;
51
- missingClaims: string[];
52
- protectedClaims: Record<string, unknown>;
53
- requestId: string;
54
- statusValid: boolean;
55
- };
56
- export type PresentationVerifyError = 'expired_request' | 'invalid_holder_binding' | 'invalid_signature' | 'missing_claims' | 'revoked_credential' | 'unknown_request';
57
- export type PresentationVerifyResult = {
58
- error: PresentationVerifyError;
59
- ok: false;
60
- } | {
61
- ok: true;
62
- verified: VerifiedPresentation;
63
- };
64
- export declare const verifyPresentationResponse: ({ config, input, now }: {
65
- config: Vp4Config;
66
- input: PresentationResponseInput;
67
- now?: number;
68
- }) => Promise<{
69
- error: PresentationVerifyError;
70
- ok: false;
71
- } | {
72
- ok: true;
73
- verified: VerifiedPresentation;
74
- }>;
75
- export declare const buildHolderKeyBindingJwt: ({ audience, holderKey, nonce, now, sdHash }: {
76
- audience: string;
77
- holderKey: SigningKey;
78
- nonce: string;
79
- now?: number;
80
- sdHash?: string;
81
- }) => Promise<string>;
82
- export declare const parsePresentationToken: (vpToken: string) => import("./sdJwt").ParsedSdJwtVc;
@@ -1,300 +0,0 @@
1
- import { type AnyPgDatabase } from '../stores/postgres';
2
- import type { CredentialNonceStore, CredentialOfferStore } from '../oidc/vci';
3
- import type { PresentationRequestStore } from './openid4vp';
4
- export declare const vcCredentialNoncesTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
5
- name: "auth_vc_credential_nonces";
6
- schema: undefined;
7
- columns: {
8
- expires_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_nonces", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
9
- name: string;
10
- tableName: "auth_vc_credential_nonces";
11
- dataType: "number int53";
12
- data: number;
13
- driverParam: string | number;
14
- notNull: true;
15
- hasDefault: false;
16
- isPrimaryKey: false;
17
- isAutoincrement: false;
18
- hasRuntimeDefault: false;
19
- enumValues: undefined;
20
- identity: undefined;
21
- generated: undefined;
22
- }>;
23
- nonce_hash: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_nonces", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
24
- name: string;
25
- tableName: "auth_vc_credential_nonces";
26
- dataType: "string";
27
- data: string;
28
- driverParam: string;
29
- notNull: true;
30
- hasDefault: false;
31
- isPrimaryKey: false;
32
- isAutoincrement: false;
33
- hasRuntimeDefault: false;
34
- enumValues: undefined;
35
- identity: undefined;
36
- generated: undefined;
37
- }>;
38
- };
39
- dialect: "pg";
40
- }>;
41
- export declare const vcCredentialOffersTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
42
- name: "auth_vc_credential_offers";
43
- schema: undefined;
44
- columns: {
45
- client_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_offers", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
46
- name: string;
47
- tableName: "auth_vc_credential_offers";
48
- dataType: "string";
49
- data: string;
50
- driverParam: string;
51
- notNull: true;
52
- hasDefault: false;
53
- isPrimaryKey: false;
54
- isAutoincrement: false;
55
- hasRuntimeDefault: false;
56
- enumValues: undefined;
57
- identity: undefined;
58
- generated: undefined;
59
- }>;
60
- configuration_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_offers", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
61
- name: string;
62
- tableName: "auth_vc_credential_offers";
63
- dataType: "string";
64
- data: string;
65
- driverParam: string;
66
- notNull: true;
67
- hasDefault: false;
68
- isPrimaryKey: false;
69
- isAutoincrement: false;
70
- hasRuntimeDefault: false;
71
- enumValues: undefined;
72
- identity: undefined;
73
- generated: undefined;
74
- }>;
75
- created_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_offers", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
76
- name: string;
77
- tableName: "auth_vc_credential_offers";
78
- dataType: "number int53";
79
- data: number;
80
- driverParam: string | number;
81
- notNull: true;
82
- hasDefault: false;
83
- isPrimaryKey: false;
84
- isAutoincrement: false;
85
- hasRuntimeDefault: false;
86
- enumValues: undefined;
87
- identity: undefined;
88
- generated: undefined;
89
- }>;
90
- expires_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_offers", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
91
- name: string;
92
- tableName: "auth_vc_credential_offers";
93
- dataType: "number int53";
94
- data: number;
95
- driverParam: string | number;
96
- notNull: true;
97
- hasDefault: false;
98
- isPrimaryKey: false;
99
- isAutoincrement: false;
100
- hasRuntimeDefault: false;
101
- enumValues: undefined;
102
- identity: undefined;
103
- generated: undefined;
104
- }>;
105
- pre_authorized_code_hash: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_offers", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
106
- name: string;
107
- tableName: "auth_vc_credential_offers";
108
- dataType: "string";
109
- data: string;
110
- driverParam: string;
111
- notNull: true;
112
- hasDefault: false;
113
- isPrimaryKey: false;
114
- isAutoincrement: false;
115
- hasRuntimeDefault: false;
116
- enumValues: undefined;
117
- identity: undefined;
118
- generated: undefined;
119
- }>;
120
- redeemed: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_offers", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBooleanBuilder>, {
121
- name: string;
122
- tableName: "auth_vc_credential_offers";
123
- dataType: "boolean";
124
- data: boolean;
125
- driverParam: boolean;
126
- notNull: true;
127
- hasDefault: false;
128
- isPrimaryKey: false;
129
- isAutoincrement: false;
130
- hasRuntimeDefault: false;
131
- enumValues: undefined;
132
- identity: undefined;
133
- generated: undefined;
134
- }>;
135
- user_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_credential_offers", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
136
- name: string;
137
- tableName: "auth_vc_credential_offers";
138
- dataType: "string";
139
- data: string;
140
- driverParam: string;
141
- notNull: true;
142
- hasDefault: false;
143
- isPrimaryKey: false;
144
- isAutoincrement: false;
145
- hasRuntimeDefault: false;
146
- enumValues: undefined;
147
- identity: undefined;
148
- generated: undefined;
149
- }>;
150
- };
151
- dialect: "pg";
152
- }>;
153
- export declare const vcPresentationRequestsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
154
- name: "auth_vc_presentation_requests";
155
- schema: undefined;
156
- columns: {
157
- client_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
158
- name: string;
159
- tableName: "auth_vc_presentation_requests";
160
- dataType: "string";
161
- data: string;
162
- driverParam: string;
163
- notNull: true;
164
- hasDefault: false;
165
- isPrimaryKey: false;
166
- isAutoincrement: false;
167
- hasRuntimeDefault: false;
168
- enumValues: undefined;
169
- identity: undefined;
170
- generated: undefined;
171
- }>;
172
- created_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
173
- name: string;
174
- tableName: "auth_vc_presentation_requests";
175
- dataType: "number int53";
176
- data: number;
177
- driverParam: string | number;
178
- notNull: true;
179
- hasDefault: false;
180
- isPrimaryKey: false;
181
- isAutoincrement: false;
182
- hasRuntimeDefault: false;
183
- enumValues: undefined;
184
- identity: undefined;
185
- generated: undefined;
186
- }>;
187
- expected_issuer_jwk_json: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgJsonbBuilder, JsonWebKey>>, {
188
- name: string;
189
- tableName: "auth_vc_presentation_requests";
190
- dataType: "object json";
191
- data: JsonWebKey;
192
- driverParam: unknown;
193
- notNull: true;
194
- hasDefault: false;
195
- isPrimaryKey: false;
196
- isAutoincrement: false;
197
- hasRuntimeDefault: false;
198
- enumValues: undefined;
199
- identity: undefined;
200
- generated: undefined;
201
- }>;
202
- expires_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
203
- name: string;
204
- tableName: "auth_vc_presentation_requests";
205
- dataType: "number int53";
206
- data: number;
207
- driverParam: string | number;
208
- notNull: true;
209
- hasDefault: false;
210
- isPrimaryKey: false;
211
- isAutoincrement: false;
212
- hasRuntimeDefault: false;
213
- enumValues: undefined;
214
- identity: undefined;
215
- generated: undefined;
216
- }>;
217
- nonce: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
218
- name: string;
219
- tableName: "auth_vc_presentation_requests";
220
- dataType: "string";
221
- data: string;
222
- driverParam: string;
223
- notNull: true;
224
- hasDefault: false;
225
- isPrimaryKey: false;
226
- isAutoincrement: false;
227
- hasRuntimeDefault: false;
228
- enumValues: undefined;
229
- identity: undefined;
230
- generated: undefined;
231
- }>;
232
- request_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
233
- name: string;
234
- tableName: "auth_vc_presentation_requests";
235
- dataType: "string";
236
- data: string;
237
- driverParam: string;
238
- notNull: true;
239
- hasDefault: false;
240
- isPrimaryKey: false;
241
- isAutoincrement: false;
242
- hasRuntimeDefault: false;
243
- enumValues: undefined;
244
- identity: undefined;
245
- generated: undefined;
246
- }>;
247
- requested_claims: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgJsonbBuilder, string[]>>, {
248
- name: string;
249
- tableName: "auth_vc_presentation_requests";
250
- dataType: "object json";
251
- data: string[];
252
- driverParam: unknown;
253
- notNull: true;
254
- hasDefault: false;
255
- isPrimaryKey: false;
256
- isAutoincrement: false;
257
- hasRuntimeDefault: false;
258
- enumValues: undefined;
259
- identity: undefined;
260
- generated: undefined;
261
- }>;
262
- response_uri: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
263
- name: string;
264
- tableName: "auth_vc_presentation_requests";
265
- dataType: "string";
266
- data: string;
267
- driverParam: string;
268
- notNull: true;
269
- hasDefault: false;
270
- isPrimaryKey: false;
271
- isAutoincrement: false;
272
- hasRuntimeDefault: false;
273
- enumValues: undefined;
274
- identity: undefined;
275
- generated: undefined;
276
- }>;
277
- state: import("drizzle-orm/pg-core").PgBuildColumn<"auth_vc_presentation_requests", import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, {
278
- name: string;
279
- tableName: "auth_vc_presentation_requests";
280
- dataType: "string";
281
- data: string;
282
- driverParam: string;
283
- notNull: false;
284
- hasDefault: false;
285
- isPrimaryKey: false;
286
- isAutoincrement: false;
287
- hasRuntimeDefault: false;
288
- enumValues: undefined;
289
- identity: undefined;
290
- generated: undefined;
291
- }>;
292
- };
293
- dialect: "pg";
294
- }>;
295
- export declare const createNeonCredentialNonceStore: (databaseUrl: string) => CredentialNonceStore;
296
- export declare const createNeonCredentialOfferStore: (databaseUrl: string) => CredentialOfferStore;
297
- export declare const createNeonPresentationRequestStore: (databaseUrl: string) => PresentationRequestStore;
298
- export declare const createPostgresCredentialNonceStore: <DB extends AnyPgDatabase>(database: DB) => CredentialNonceStore;
299
- export declare const createPostgresCredentialOfferStore: <DB extends AnyPgDatabase>(database: DB) => CredentialOfferStore;
300
- export declare const createPostgresPresentationRequestStore: <DB extends AnyPgDatabase>(database: DB) => PresentationRequestStore;
@@ -1,37 +0,0 @@
1
- import { type SigningKey } from '../oidc/keys';
2
- declare const toBase64Url: (bytes: ArrayBuffer | Uint8Array) => string;
3
- declare const fromBase64Url: (value: string) => Uint8Array<ArrayBuffer>;
4
- export type SdDisclosure = {
5
- claimName: string;
6
- claimValue: unknown;
7
- encoded: string;
8
- salt: string;
9
- };
10
- export type SdJwtVcIssueInput = {
11
- base: Record<string, unknown>;
12
- holderJwk?: JsonWebKey;
13
- selective: Record<string, unknown>;
14
- signingKey: SigningKey;
15
- };
16
- export declare const issueSdJwtVc: (input: SdJwtVcIssueInput) => Promise<string>;
17
- export type ParsedSdJwtVc = {
18
- disclosures: string[];
19
- jwt: string;
20
- keyBindingJwt: string | undefined;
21
- };
22
- export declare const parseSdJwtVc: (token: string) => ParsedSdJwtVc;
23
- export declare const presentSdJwtVc: (parsed: ParsedSdJwtVc, selectedClaims: string[], keyBindingJwt?: string) => string;
24
- export type VerifiedSdJwtVc = {
25
- cnf: {
26
- jwk: JsonWebKey;
27
- } | undefined;
28
- disclosedClaims: Record<string, unknown>;
29
- keyBindingJwt: string | undefined;
30
- protectedClaims: Record<string, unknown>;
31
- };
32
- export type SdJwtVcVerifyInput = {
33
- issuerPublicJwk: JsonWebKey;
34
- token: string;
35
- };
36
- export declare const verifySdJwtVc: (input: SdJwtVcVerifyInput) => Promise<VerifiedSdJwtVc | undefined>;
37
- export { fromBase64Url, toBase64Url };
@@ -1,29 +0,0 @@
1
- import { type SigningKey } from '../oidc/keys';
2
- declare const STATUS_LIST_TYP = "statuslist+jwt";
3
- declare const STATUS_LIST_SUB_TYP = "application/statuslist+jwt";
4
- export type StatusListBits = Uint8Array;
5
- export declare const createStatusList: (size?: number) => Uint8Array<ArrayBuffer>;
6
- export declare const getCredentialStatus: (bits: StatusListBits, idx: number) => 1 | 0 | undefined;
7
- export declare const setCredentialStatus: (bits: StatusListBits, idx: number, value: 0 | 1) => StatusListBits;
8
- export declare const buildStatusClaim: (idx: number, uri: string) => {
9
- status_list: {
10
- idx: number;
11
- uri: string;
12
- };
13
- };
14
- export declare const signStatusList: ({ bits, issuer, listUri, now, signingKey, ttlSeconds }: {
15
- bits: StatusListBits;
16
- issuer: string;
17
- listUri: string;
18
- now?: number;
19
- signingKey: SigningKey;
20
- ttlSeconds?: number;
21
- }) => Promise<string>;
22
- export declare const verifyStatusListJwt: ({ issuerPublicJwk, token }: {
23
- issuerPublicJwk: JsonWebKey;
24
- token: string;
25
- }) => Promise<{
26
- bits: Uint8Array<ArrayBuffer>;
27
- sub: string | undefined;
28
- } | undefined>;
29
- export { STATUS_LIST_SUB_TYP, STATUS_LIST_TYP };
@@ -1,63 +0,0 @@
1
- import { Elysia } from 'elysia';
2
- import type { SigningKey } from '../oidc/keys';
3
- import { type StatusListBits } from './statusList';
4
- export declare const DEFAULT_STATUS_ROUTE = "/vc/status";
5
- export declare const statusListRoutes: ({ getStatusList, issuerUrl, signingKey, statusRoute, ttlSeconds }: {
6
- getStatusList: (listId: string) => Promise<StatusListBits | undefined> | StatusListBits | undefined;
7
- issuerUrl: string;
8
- signingKey: SigningKey;
9
- statusRoute?: string;
10
- ttlSeconds?: number;
11
- }) => Elysia<"", {
12
- decorator: {};
13
- store: {};
14
- derive: {};
15
- resolve: {};
16
- }, {
17
- typebox: {};
18
- error: {};
19
- }, {
20
- schema: {};
21
- standaloneSchema: {};
22
- macro: {};
23
- macroFn: {};
24
- parser: {};
25
- response: {};
26
- }, {
27
- [x: string]: {
28
- ":listId": {
29
- get: {
30
- body: unknown;
31
- params: {
32
- listId: string;
33
- };
34
- query: unknown;
35
- headers: unknown;
36
- response: {
37
- 200: Response;
38
- 422: {
39
- type: "validation";
40
- on: string;
41
- summary?: string;
42
- message?: string;
43
- found?: unknown;
44
- property?: string;
45
- expected?: string;
46
- };
47
- };
48
- };
49
- };
50
- };
51
- }, {
52
- derive: {};
53
- resolve: {};
54
- schema: {};
55
- standaloneSchema: {};
56
- response: {};
57
- }, {
58
- derive: {};
59
- resolve: {};
60
- schema: {};
61
- standaloneSchema: {};
62
- response: {};
63
- }>;
@@ -1,120 +0,0 @@
1
- import { Elysia } from 'elysia';
2
- import { type VerifiedPresentation, type Vp4Config } from './openid4vp';
3
- export declare const DEFAULT_VP_ROUTE = "/vp";
4
- export declare const vpRoutes: ({ defaultClientId, issuerUrl, onVerifiedPresentation, vpConfig, vpRoute }: {
5
- defaultClientId: string;
6
- issuerUrl: string;
7
- onVerifiedPresentation?: (context: {
8
- verified: VerifiedPresentation;
9
- }) => Promise<void> | void;
10
- vpConfig: Vp4Config;
11
- vpRoute?: string;
12
- }) => Elysia<"", {
13
- decorator: {};
14
- store: {};
15
- derive: {};
16
- resolve: {};
17
- }, {
18
- typebox: {};
19
- error: {};
20
- }, {
21
- schema: {};
22
- standaloneSchema: {};
23
- macro: {};
24
- macroFn: {};
25
- parser: {};
26
- response: {};
27
- }, {
28
- [x: string]: {
29
- authorize: {
30
- post: {
31
- body: {
32
- client_id?: string | undefined;
33
- state?: string | undefined;
34
- requested_claims: string[];
35
- };
36
- params: {};
37
- query: unknown;
38
- headers: unknown;
39
- response: {
40
- 200: Response;
41
- 422: {
42
- type: "validation";
43
- on: string;
44
- summary?: string;
45
- message?: string;
46
- found?: unknown;
47
- property?: string;
48
- expected?: string;
49
- };
50
- };
51
- };
52
- };
53
- };
54
- } & {
55
- [x: string]: {
56
- request: {
57
- ":id": {
58
- get: {
59
- body: unknown;
60
- params: {
61
- id: string;
62
- };
63
- query: unknown;
64
- headers: unknown;
65
- response: {
66
- 200: Response;
67
- 422: {
68
- type: "validation";
69
- on: string;
70
- summary?: string;
71
- message?: string;
72
- found?: unknown;
73
- property?: string;
74
- expected?: string;
75
- };
76
- };
77
- };
78
- };
79
- };
80
- };
81
- } & {
82
- [x: string]: {
83
- response: {
84
- post: {
85
- body: {
86
- state?: string | undefined;
87
- presentation_submission?: unknown;
88
- vp_token: string;
89
- };
90
- params: {};
91
- query: unknown;
92
- headers: unknown;
93
- response: {
94
- 200: Response;
95
- 422: {
96
- type: "validation";
97
- on: string;
98
- summary?: string;
99
- message?: string;
100
- found?: unknown;
101
- property?: string;
102
- expected?: string;
103
- };
104
- };
105
- };
106
- };
107
- };
108
- }, {
109
- derive: {};
110
- resolve: {};
111
- schema: {};
112
- standaloneSchema: {};
113
- response: {};
114
- }, {
115
- derive: {};
116
- resolve: {};
117
- schema: {};
118
- standaloneSchema: {};
119
- response: {};
120
- }>;
@@ -1,58 +0,0 @@
1
- /** Stable purposes let providers apply separate templates, limits, and audit policy. */
2
- export type VerificationPurpose = 'account_recovery' | 'mfa_challenge' | 'mfa_enrollment' | 'phone_change' | 'phone_signup' | 'step_up';
3
- export type VerificationChannel = 'call' | 'sms' | 'whatsapp';
4
- export type VerificationStartInput = {
5
- channel: VerificationChannel;
6
- /** Optional BCP-47 locale used for provider-managed message copy. */
7
- locale?: string;
8
- purpose: VerificationPurpose;
9
- /** Provider-specific, non-secret rate-limit buckets (for example an IP hash). */
10
- rateLimits?: Readonly<Record<string, string>>;
11
- /** Stable application subject. Providers must not include it in message text. */
12
- subject: string;
13
- /** E.164 destination. */
14
- to: string;
15
- /** Stable tenant key used only for provider/service routing. */
16
- tenant?: string;
17
- };
18
- export type VerificationStartResult = {
19
- /** Provider reference safe for audit correlation (for example, a Twilio VE SID). */
20
- reference: string;
21
- /** Provider-authoritative expiry. Auth rejects checks after this time. */
22
- expiresAt: number;
23
- };
24
- export type VerificationCheckStatus = 'approved' | 'canceled' | 'expired' | 'failed' | 'max_attempts_reached' | 'pending';
25
- export type VerificationCheckInput = VerificationStartInput & {
26
- code: string;
27
- /** Exact challenge reference returned by start(). */
28
- reference: string;
29
- };
30
- export type VerificationCancelInput = VerificationStartInput & {
31
- reference: string;
32
- };
33
- export type VerificationCheckResult = {
34
- reference?: string;
35
- status: VerificationCheckStatus;
36
- };
37
- export type VerificationProviderErrorKind = 'invalid_destination' | 'rate_limited' | 'unavailable';
38
- /** Normalized operational failures that auth routes can map safely to HTTP. */
39
- export declare class VerificationProviderError extends Error {
40
- readonly kind: VerificationProviderErrorKind;
41
- readonly provider: string;
42
- constructor(input: {
43
- cause?: unknown;
44
- kind: VerificationProviderErrorKind;
45
- message: string;
46
- provider: string;
47
- });
48
- }
49
- /**
50
- * Provider-owned out-of-band challenge lifecycle. Implementations generate,
51
- * deliver, rate-limit, and check codes; auth owns enrollment and session policy.
52
- */
53
- export type VerificationProvider = {
54
- readonly name: string;
55
- cancel: (input: VerificationCancelInput) => Promise<void>;
56
- check: (input: VerificationCheckInput) => Promise<VerificationCheckResult>;
57
- start: (input: VerificationStartInput) => Promise<VerificationStartResult>;
58
- };