@absolutejs/auth 0.56.2 → 0.56.4

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 (218) hide show
  1. package/dist/cli/migrate.js.map +1 -1
  2. package/dist/index.js +45 -1
  3. package/dist/index.js.map +4 -4
  4. package/dist/oidc/index.js +15 -1
  5. package/dist/oidc/index.js.map +3 -3
  6. package/dist/server.js +45 -1
  7. package/dist/server.js.map +4 -4
  8. package/package.json +1 -1
  9. package/dist/abuse/captcha.d.ts +0 -11
  10. package/dist/abuse/config.d.ts +0 -29
  11. package/dist/actions.d.ts +0 -27
  12. package/dist/adaptive/config.d.ts +0 -34
  13. package/dist/adaptive/fingerprint.d.ts +0 -2
  14. package/dist/adaptive/inMemoryStores.d.ts +0 -3
  15. package/dist/adaptive/postgresStores.d.ts +0 -245
  16. package/dist/adaptive/types.d.ts +0 -62
  17. package/dist/agents/config.d.ts +0 -44
  18. package/dist/agents/context.d.ts +0 -46
  19. package/dist/agents/idJag.d.ts +0 -49
  20. package/dist/agents/inMemoryStores.d.ts +0 -4
  21. package/dist/agents/oidcAdapter.d.ts +0 -12
  22. package/dist/agents/postgresStores.d.ts +0 -569
  23. package/dist/agents/principal.d.ts +0 -4
  24. package/dist/agents/registration.d.ts +0 -162
  25. package/dist/agents/registrationClient.d.ts +0 -50
  26. package/dist/agents/routes.d.ts +0 -321
  27. package/dist/agents/types.d.ts +0 -129
  28. package/dist/apikeys/config.d.ts +0 -64
  29. package/dist/apikeys/inMemoryStores.d.ts +0 -4
  30. package/dist/apikeys/postgresStores.d.ts +0 -359
  31. package/dist/apikeys/routes.d.ts +0 -83
  32. package/dist/apikeys/types.d.ts +0 -53
  33. package/dist/audit/config.d.ts +0 -9
  34. package/dist/audit/export.d.ts +0 -2
  35. package/dist/audit/inMemoryAuditStore.d.ts +0 -2
  36. package/dist/audit/integrity.d.ts +0 -19
  37. package/dist/audit/postgresAuditStore.d.ts +0 -116
  38. package/dist/audit/siem.d.ts +0 -11
  39. package/dist/audit/types.d.ts +0 -19
  40. package/dist/audit/wrap.d.ts +0 -9
  41. package/dist/authContext.d.ts +0 -193
  42. package/dist/authorization/config.d.ts +0 -19
  43. package/dist/authorization/protectPermission.d.ts +0 -52
  44. package/dist/compliance/cipher.d.ts +0 -11
  45. package/dist/compliance/config.d.ts +0 -18
  46. package/dist/compliance/redaction.d.ts +0 -8
  47. package/dist/compliance/routes.d.ts +0 -89
  48. package/dist/constants.d.ts +0 -10
  49. package/dist/credentials/backgroundOps.d.ts +0 -45
  50. package/dist/credentials/config.d.ts +0 -68
  51. package/dist/credentials/emailValidation.d.ts +0 -9
  52. package/dist/credentials/emailVerification.d.ts +0 -83
  53. package/dist/credentials/import.d.ts +0 -34
  54. package/dist/credentials/inMemoryCredentialStore.d.ts +0 -2
  55. package/dist/credentials/legacyHashers.d.ts +0 -3
  56. package/dist/credentials/login.d.ts +0 -76
  57. package/dist/credentials/passwordPolicy.d.ts +0 -15
  58. package/dist/credentials/passwordReset.d.ts +0 -87
  59. package/dist/credentials/postgresCredentialStore.d.ts +0 -235
  60. package/dist/credentials/register.d.ts +0 -54
  61. package/dist/credentials/routes.d.ts +0 -201
  62. package/dist/credentials/types.d.ts +0 -26
  63. package/dist/crypto.d.ts +0 -32
  64. package/dist/errors.d.ts +0 -12
  65. package/dist/federation/tokenStore.d.ts +0 -29
  66. package/dist/fga/config.d.ts +0 -53
  67. package/dist/fga/inMemoryStores.d.ts +0 -3
  68. package/dist/fga/postgresStores.d.ts +0 -116
  69. package/dist/fga/redisCheckCache.d.ts +0 -11
  70. package/dist/fga/schema.d.ts +0 -2
  71. package/dist/fga/types.d.ts +0 -28
  72. package/dist/htmx/configuredRoutes.d.ts +0 -542
  73. package/dist/htmx/renderers.d.ts +0 -8
  74. package/dist/htmx/routes.d.ts +0 -514
  75. package/dist/htmx/types.d.ts +0 -129
  76. package/dist/linkedProviders/inMemoryStores.d.ts +0 -9
  77. package/dist/linkedProviders/neonStores.d.ts +0 -484
  78. package/dist/linkedProviders/oauthAccountResolver.d.ts +0 -28
  79. package/dist/linkedProviders/oauthResolver.d.ts +0 -9
  80. package/dist/linkedProviders/resolver.d.ts +0 -22
  81. package/dist/lockout/config.d.ts +0 -17
  82. package/dist/lockout/inMemoryLockoutStore.d.ts +0 -2
  83. package/dist/lockout/postgresLockoutStore.d.ts +0 -71
  84. package/dist/lockout/redisLockoutStore.d.ts +0 -3
  85. package/dist/lockout/types.d.ts +0 -12
  86. package/dist/mfa/backupCodes.d.ts +0 -5
  87. package/dist/mfa/challenge.d.ts +0 -70
  88. package/dist/mfa/config.d.ts +0 -50
  89. package/dist/mfa/gate.d.ts +0 -2
  90. package/dist/mfa/inMemoryMfaStore.d.ts +0 -2
  91. package/dist/mfa/management.d.ts +0 -106
  92. package/dist/mfa/postgresMfaStore.d.ts +0 -206
  93. package/dist/mfa/rotation.d.ts +0 -17
  94. package/dist/mfa/routes.d.ts +0 -234
  95. package/dist/mfa/secret.d.ts +0 -2
  96. package/dist/mfa/sms.d.ts +0 -105
  97. package/dist/mfa/totp.d.ts +0 -91
  98. package/dist/mfa/types.d.ts +0 -23
  99. package/dist/migrations/generate.d.ts +0 -2
  100. package/dist/migrations/index.d.ts +0 -5
  101. package/dist/migrations/runner.d.ts +0 -13
  102. package/dist/migrations/types.d.ts +0 -14
  103. package/dist/oidc/clientAuth.d.ts +0 -19
  104. package/dist/oidc/clientIdMetadata.d.ts +0 -32
  105. package/dist/oidc/config.d.ts +0 -296
  106. package/dist/oidc/dpop.d.ts +0 -23
  107. package/dist/oidc/inMemoryStores.d.ts +0 -11
  108. package/dist/oidc/inMemoryVciStores.d.ts +0 -3
  109. package/dist/oidc/jar.d.ts +0 -14
  110. package/dist/oidc/keys.d.ts +0 -35
  111. package/dist/oidc/logout.d.ts +0 -38
  112. package/dist/oidc/mtls.d.ts +0 -11
  113. package/dist/oidc/par.d.ts +0 -28
  114. package/dist/oidc/postgresStores.d.ts +0 -1217
  115. package/dist/oidc/registration.d.ts +0 -138
  116. package/dist/oidc/routes.d.ts +0 -569
  117. package/dist/oidc/types.d.ts +0 -145
  118. package/dist/oidc/userinfo.d.ts +0 -21
  119. package/dist/oidc/vci.d.ts +0 -159
  120. package/dist/oidc/vciRoutes.d.ts +0 -92
  121. package/dist/organizations/config.d.ts +0 -46
  122. package/dist/organizations/inMemoryOrganizationStore.d.ts +0 -2
  123. package/dist/organizations/operations.d.ts +0 -39
  124. package/dist/organizations/postgresOrganizationStore.d.ts +0 -340
  125. package/dist/organizations/routes.d.ts +0 -299
  126. package/dist/organizations/types.d.ts +0 -45
  127. package/dist/passwordless/config.d.ts +0 -43
  128. package/dist/passwordless/inMemoryPasswordlessTokenStore.d.ts +0 -2
  129. package/dist/passwordless/postgresPasswordlessTokenStore.d.ts +0 -56
  130. package/dist/passwordless/routes.d.ts +0 -163
  131. package/dist/passwordless/types.d.ts +0 -9
  132. package/dist/pluginIdentity.d.ts +0 -2
  133. package/dist/portal/config.d.ts +0 -34
  134. package/dist/portal/inMemorySetupSessionStore.d.ts +0 -2
  135. package/dist/portal/operations.d.ts +0 -10
  136. package/dist/portal/postgresSetupSessionStore.d.ts +0 -116
  137. package/dist/portal/routes.d.ts +0 -160
  138. package/dist/portal/types.d.ts +0 -16
  139. package/dist/providers/clients.d.ts +0 -1818
  140. package/dist/providersFromEnv.d.ts +0 -19
  141. package/dist/roles/config.d.ts +0 -27
  142. package/dist/roles/inMemoryRoleStore.d.ts +0 -2
  143. package/dist/roles/operations.d.ts +0 -8
  144. package/dist/roles/postgresRoleStore.d.ts +0 -86
  145. package/dist/roles/resolver.d.ts +0 -17
  146. package/dist/roles/routes.d.ts +0 -106
  147. package/dist/roles/types.d.ts +0 -14
  148. package/dist/routes/authorize.d.ts +0 -102
  149. package/dist/routes/callback.d.ts +0 -64
  150. package/dist/routes/profile.d.ts +0 -70
  151. package/dist/routes/protectRoute.d.ts +0 -51
  152. package/dist/routes/refresh.d.ts +0 -74
  153. package/dist/routes/revoke.d.ts +0 -73
  154. package/dist/routes/sessions.d.ts +0 -103
  155. package/dist/routes/signout.d.ts +0 -70
  156. package/dist/routes/stepUp.d.ts +0 -48
  157. package/dist/routes/userStatus.d.ts +0 -72
  158. package/dist/scim/config.d.ts +0 -57
  159. package/dist/scim/extensions.d.ts +0 -30
  160. package/dist/scim/inMemoryScimTokenStore.d.ts +0 -2
  161. package/dist/scim/postgresScimTokenStore.d.ts +0 -86
  162. package/dist/scim/routes.d.ts +0 -366
  163. package/dist/scim/serialize.d.ts +0 -83
  164. package/dist/scim/types.d.ts +0 -54
  165. package/dist/session/access.d.ts +0 -33
  166. package/dist/session/anonymous.d.ts +0 -12
  167. package/dist/session/cleanup.d.ts +0 -45
  168. package/dist/session/impersonation.d.ts +0 -34
  169. package/dist/session/inMemoryStore.d.ts +0 -7
  170. package/dist/session/multiSession.d.ts +0 -27
  171. package/dist/session/neonStore.d.ts +0 -513
  172. package/dist/session/promote.d.ts +0 -23
  173. package/dist/session/redisStore.d.ts +0 -6
  174. package/dist/session/sessionsConfig.d.ts +0 -9
  175. package/dist/session/state.d.ts +0 -33
  176. package/dist/session/types.d.ts +0 -21
  177. package/dist/session/userSessions.d.ts +0 -19
  178. package/dist/sso/config.d.ts +0 -149
  179. package/dist/sso/discoveryRoute.d.ts +0 -63
  180. package/dist/sso/inMemorySamlServiceProviderStore.d.ts +0 -2
  181. package/dist/sso/inMemorySsoConnectionStore.d.ts +0 -2
  182. package/dist/sso/oidcRoutes.d.ts +0 -98
  183. package/dist/sso/postgresSamlServiceProviderStore.d.ts +0 -101
  184. package/dist/sso/postgresSsoConnectionStore.d.ts +0 -116
  185. package/dist/sso/samlIdpRoutes.d.ts +0 -139
  186. package/dist/sso/samlRoutes.d.ts +0 -179
  187. package/dist/sso/types.d.ts +0 -53
  188. package/dist/stores/postgres.d.ts +0 -5
  189. package/dist/stores/redis.d.ts +0 -5
  190. package/dist/telemetry/tracing.d.ts +0 -15
  191. package/dist/tenancy.d.ts +0 -9
  192. package/dist/typeGuards.d.ts +0 -6
  193. package/dist/typebox.d.ts +0 -4
  194. package/dist/types.d.ts +0 -421
  195. package/dist/utils.d.ts +0 -45
  196. package/dist/vault/config.d.ts +0 -20
  197. package/dist/vault/inMemoryVaultStore.d.ts +0 -2
  198. package/dist/vault/postgresVaultStore.d.ts +0 -86
  199. package/dist/vault/types.d.ts +0 -14
  200. package/dist/vc/inMemoryVpStores.d.ts +0 -2
  201. package/dist/vc/openid4vp.d.ts +0 -82
  202. package/dist/vc/postgresVcStores.d.ts +0 -300
  203. package/dist/vc/sdJwt.d.ts +0 -37
  204. package/dist/vc/statusList.d.ts +0 -29
  205. package/dist/vc/statusListRoutes.d.ts +0 -63
  206. package/dist/vc/vpRoutes.d.ts +0 -120
  207. package/dist/webauthn/adapter.d.ts +0 -59
  208. package/dist/webauthn/config.d.ts +0 -36
  209. package/dist/webauthn/inMemoryWebAuthnCredentialStore.d.ts +0 -2
  210. package/dist/webauthn/postgresWebAuthnCredentialStore.d.ts +0 -146
  211. package/dist/webauthn/routes.d.ts +0 -155
  212. package/dist/webauthn/types.d.ts +0 -17
  213. package/dist/webhooks/config.d.ts +0 -34
  214. package/dist/webhooks/dispatcher.d.ts +0 -3
  215. package/dist/webhooks/inMemoryStore.d.ts +0 -2
  216. package/dist/webhooks/postgresStore.d.ts +0 -116
  217. package/dist/webhooks/sign.d.ts +0 -11
  218. 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,59 +0,0 @@
1
- export type WebAuthnCredentialDescriptor = {
2
- id: string;
3
- transports?: string[];
4
- };
5
- export type WebAuthnRegistrationOptions = {
6
- challenge: string;
7
- options: Record<string, unknown>;
8
- };
9
- export type WebAuthnAuthenticationOptions = {
10
- challenge: string;
11
- options: Record<string, unknown>;
12
- };
13
- export type WebAuthnRegistrationResult = {
14
- credential?: {
15
- backedUp?: boolean;
16
- counter: number;
17
- credentialId: string;
18
- deviceType?: string;
19
- publicKey: string;
20
- transports?: string[];
21
- };
22
- verified: boolean;
23
- };
24
- export type WebAuthnAuthenticationResult = {
25
- newCounter?: number;
26
- verified: boolean;
27
- };
28
- export type WebAuthnAdapter = {
29
- createAuthenticationOptions: (request: {
30
- allowCredentials: WebAuthnCredentialDescriptor[];
31
- rpId: string;
32
- }) => Promise<WebAuthnAuthenticationOptions> | WebAuthnAuthenticationOptions;
33
- createRegistrationOptions: (request: {
34
- excludeCredentials: WebAuthnCredentialDescriptor[];
35
- rpId: string;
36
- rpName: string;
37
- userDisplayName: string;
38
- userId: string;
39
- userName: string;
40
- }) => Promise<WebAuthnRegistrationOptions> | WebAuthnRegistrationOptions;
41
- verifyAuthentication: (request: {
42
- credential: {
43
- counter: number;
44
- credentialId: string;
45
- publicKey: string;
46
- transports?: string[];
47
- };
48
- expectedChallenge: string;
49
- expectedOrigin: string;
50
- expectedRPID: string;
51
- response: unknown;
52
- }) => Promise<WebAuthnAuthenticationResult>;
53
- verifyRegistration: (request: {
54
- expectedChallenge: string;
55
- expectedOrigin: string;
56
- expectedRPID: string;
57
- response: unknown;
58
- }) => Promise<WebAuthnRegistrationResult>;
59
- };