@openvtc/trust-tasks 0.21.13 → 0.21.15

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 (70) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/_shared/components.d.ts +91 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/_shared/0.3/session.d.ts +16 -0
  5. package/dist/auth/_shared/0.3/session.d.ts.map +1 -0
  6. package/dist/auth/_shared/0.3/session.js +6 -0
  7. package/dist/auth/_shared/0.3/session.js.map +1 -0
  8. package/dist/auth/authenticate/0.3/payload.d.ts +852 -0
  9. package/dist/auth/authenticate/0.3/payload.d.ts.map +1 -0
  10. package/dist/auth/authenticate/0.3/payload.js +442 -0
  11. package/dist/auth/authenticate/0.3/payload.js.map +1 -0
  12. package/dist/auth/refresh/0.2/payload.d.ts +729 -0
  13. package/dist/auth/refresh/0.2/payload.d.ts.map +1 -0
  14. package/dist/auth/refresh/0.2/payload.js +392 -0
  15. package/dist/auth/refresh/0.2/payload.js.map +1 -0
  16. package/dist/git-ns/_shared/0.5/git-ns.d.ts +16 -0
  17. package/dist/git-ns/_shared/0.5/git-ns.d.ts.map +1 -0
  18. package/dist/git-ns/_shared/0.5/git-ns.js +6 -0
  19. package/dist/git-ns/_shared/0.5/git-ns.js.map +1 -0
  20. package/dist/git-ns/account/list/0.1/payload.d.ts +598 -0
  21. package/dist/git-ns/account/list/0.1/payload.d.ts.map +1 -0
  22. package/dist/git-ns/account/list/0.1/payload.js +317 -0
  23. package/dist/git-ns/account/list/0.1/payload.js.map +1 -0
  24. package/dist/git-ns/activity/list/0.1/payload.d.ts +642 -0
  25. package/dist/git-ns/activity/list/0.1/payload.d.ts.map +1 -0
  26. package/dist/git-ns/activity/list/0.1/payload.js +343 -0
  27. package/dist/git-ns/activity/list/0.1/payload.js.map +1 -0
  28. package/dist/git-ns/bridge/job/list/0.1/payload.d.ts +697 -0
  29. package/dist/git-ns/bridge/job/list/0.1/payload.d.ts.map +1 -0
  30. package/dist/git-ns/bridge/job/list/0.1/payload.js +386 -0
  31. package/dist/git-ns/bridge/job/list/0.1/payload.js.map +1 -0
  32. package/dist/git-ns/projection/show/0.1/payload.d.ts +705 -0
  33. package/dist/git-ns/projection/show/0.1/payload.d.ts.map +1 -0
  34. package/dist/git-ns/projection/show/0.1/payload.js +377 -0
  35. package/dist/git-ns/projection/show/0.1/payload.js.map +1 -0
  36. package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts +862 -0
  37. package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts.map +1 -0
  38. package/dist/git-ns/right/issued-by-departed/0.1/payload.js +487 -0
  39. package/dist/git-ns/right/issued-by-departed/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/right/list/0.1/payload.d.ts +773 -0
  41. package/dist/git-ns/right/list/0.1/payload.d.ts.map +1 -0
  42. package/dist/git-ns/right/list/0.1/payload.js +439 -0
  43. package/dist/git-ns/right/list/0.1/payload.js.map +1 -0
  44. package/dist/index.d.ts +12 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +12 -0
  47. package/dist/index.js.map +1 -1
  48. package/dist/vtc/relationships/revoke/0.2/payload.d.ts +287 -0
  49. package/dist/vtc/relationships/revoke/0.2/payload.d.ts.map +1 -0
  50. package/dist/vtc/relationships/revoke/0.2/payload.js +159 -0
  51. package/dist/vtc/relationships/revoke/0.2/payload.js.map +1 -0
  52. package/dist/vtc/vetting/vetters/resend/0.2/payload.d.ts +254 -0
  53. package/dist/vtc/vetting/vetters/resend/0.2/payload.d.ts.map +1 -0
  54. package/dist/vtc/vetting/vetters/resend/0.2/payload.js +142 -0
  55. package/dist/vtc/vetting/vetters/resend/0.2/payload.js.map +1 -0
  56. package/package.json +1 -1
  57. package/src/_shared/components.ts +91 -0
  58. package/src/auth/_shared/0.3/session.ts +17 -0
  59. package/src/auth/authenticate/0.3/payload.ts +527 -0
  60. package/src/auth/refresh/0.2/payload.ts +444 -0
  61. package/src/git-ns/_shared/0.5/git-ns.ts +17 -0
  62. package/src/git-ns/account/list/0.1/payload.ts +392 -0
  63. package/src/git-ns/activity/list/0.1/payload.ts +430 -0
  64. package/src/git-ns/bridge/job/list/0.1/payload.ts +490 -0
  65. package/src/git-ns/projection/show/0.1/payload.ts +479 -0
  66. package/src/git-ns/right/issued-by-departed/0.1/payload.ts +550 -0
  67. package/src/git-ns/right/list/0.1/payload.ts +493 -0
  68. package/src/index.ts +12 -0
  69. package/src/vtc/relationships/revoke/0.2/payload.ts +209 -0
  70. package/src/vtc/vetting/vetters/resend/0.2/payload.ts +183 -0
@@ -0,0 +1,852 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/authenticate/0.3/payload.schema.json
4
+ */
5
+ import type { Ext, Session_AuthV0_3 as Session, TokenBundle } from "../../../_shared/components.js";
6
+ /**
7
+ * The subject presents a previously-issued challenge along with the framework `proof` that binds the document to a VID. The proof IS the authentication. 0.3 adds an optional proxied form: `principal` names a party the signer authenticates *as*, distinct from `issuer` (the signer, e.g. a VTA acting on the principal's behalf), together with `delegationEvidence` establishing the entitlement. Absent `principal`, or `principal` equal to `issuer`, is the ordinary auth/authenticate/0.2 form unchanged. 0.3 also carries forward the optional `sessionKey` member from 0.2.
8
+ */
9
+ export interface AuthAuthenticate {
10
+ /**
11
+ * The exact challenge value returned by a prior auth/challenge call. Consumers MUST reject mismatch, expired, or re-used challenges.
12
+ */
13
+ challenge: string;
14
+ /**
15
+ * The sessionId returned alongside the challenge. Consumers use it to look up the server-side challenge binding.
16
+ */
17
+ sessionId: string;
18
+ /**
19
+ * Optional capability tags being requested on the issued tokens. The consumer's authorization layer decides which are granted; the issued TokenBundle's `scope` MAY be a subset.
20
+ */
21
+ scope?: string[];
22
+ /**
23
+ * The VID being authenticated as, when it differs from the signer of this document. Present and unequal to `issuer` marks a *proxied* authenticate: `issuer` is a delegate (typically the principal's VTA) presenting its own proof, and `payload.delegationEvidence` MUST also be present, describing what entitles `issuer` to act for `principal`. Omitted, or equal to `issuer`, is the ordinary case: the signer authenticates as itself, exactly as auth/authenticate/0.2. See Authorization and Security & Privacy.
24
+ */
25
+ principal?: string;
26
+ /**
27
+ * REQUIRED whenever `principal` is present and differs from `issuer`; MUST be omitted otherwise. Describes the evidence that entitles `issuer` to authenticate as `principal`. The framework does not prescribe its shape — see Authorization — but the consumer's policy MUST verify it independently rather than take `issuer`'s claim of entitlement at face value.
28
+ */
29
+ delegationEvidence?: {
30
+ /**
31
+ * Consumer-defined vocabulary naming the evidence class (e.g. "vtaContext", "mandateCredential"). The framework imposes no syntax; an unrecognized `kind` is refused with `auth/authenticate:delegationNotRecognized`.
32
+ */
33
+ kind: string;
34
+ /**
35
+ * The evidence itself, inline — typically a Verifiable Credential or other signed assertion binding `issuer` to `principal`. Opaque to the framework; shape is consumer- or ecosystem-defined by `kind`.
36
+ */
37
+ credential?: {};
38
+ /**
39
+ * Alternative to inlining `credential`: an opaque reference (an id, a URL) to evidence the consumer already holds — for example a previously-registered VTA context binding. Consumer-defined; mutually informative with `credential`, not mutually exclusive — a producer MAY supply both.
40
+ */
41
+ reference?: string;
42
+ /**
43
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
44
+ */
45
+ ext?: Ext;
46
+ };
47
+ /**
48
+ * A did:key VID the producer asks the consumer to bind to the session this authenticate document creates. The producer MUST hold the corresponding private key and SHOULD keep it non-extractable (for example, a WebCrypto non-extractable key). Once bound, the consumer MUST accept a framework `proof` made by this key, with `proofPurpose: authentication`, as the session's `subject` — for this session only, bounded by the session's `expiresAt` and `acr`, and never where a specification requires an `assertionMethod` attestation (SPEC.md §7.2 item 10; see Security & Privacy). Behaves identically whether or not this document is a proxied authenticate. The consumer MAY refuse a key type it does not support with `auth/authenticate:sessionKeyUnsupported`.
49
+ */
50
+ sessionKey?: string;
51
+ /**
52
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
53
+ */
54
+ ext?: Ext;
55
+ }
56
+ /**
57
+ * Issued by the auth service after verifying the proof on the authenticate document (and, for a proxied request, the delegation evidence). Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.3#response.
58
+ */
59
+ export interface AuthAuthenticateResponsePayload {
60
+ /**
61
+ * The session the consumer has just created for this subject. `session.subject` is `principal` for a proxied request, `issuer` otherwise; `session.actor` is present and equal to `issuer` only for a proxied request. Carries `sessionKey` when the request bound one.
62
+ */
63
+ session: Session;
64
+ /**
65
+ * Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.
66
+ */
67
+ tokens: TokenBundle;
68
+ /**
69
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
70
+ */
71
+ ext?: Ext;
72
+ }
73
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
74
+ export type { Ext, Session, TokenBundle };
75
+ /** Trust Task type URI. */
76
+ export declare const TYPE_URI: "https://trusttasks.org/spec/auth/authenticate/0.3";
77
+ /** Stable alias for this specification's request payload shape. */
78
+ export type Payload = AuthAuthenticate;
79
+ /** Trust Task response type URI (request type URI + "#response"). */
80
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/auth/authenticate/0.3#response";
81
+ /** Stable alias for this specification's success-response payload shape. */
82
+ export type Response = AuthAuthenticateResponsePayload;
83
+ /**
84
+ * This specification's payload schema, as a value.
85
+ *
86
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
87
+ * rather than only as a `.json` file because TypeScript types are erased
88
+ * at runtime: without a schema a consumer has nothing to validate, and
89
+ * every REQUIRED payload member is optional in practice. Cross-file
90
+ * `$ref`s are already inlined, so it needs no resolver.
91
+ */
92
+ export declare const PAYLOAD_SCHEMA: {
93
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
94
+ readonly $id: "https://trusttasks.org/spec/auth/authenticate/0.3";
95
+ readonly title: "Auth — Authenticate";
96
+ readonly description: "The subject presents a previously-issued challenge along with the framework `proof` that binds the document to a VID. The proof IS the authentication. 0.3 adds an optional proxied form: `principal` names a party the signer authenticates *as*, distinct from `issuer` (the signer, e.g. a VTA acting on the principal's behalf), together with `delegationEvidence` establishing the entitlement. Absent `principal`, or `principal` equal to `issuer`, is the ordinary auth/authenticate/0.2 form unchanged. 0.3 also carries forward the optional `sessionKey` member from 0.2.";
97
+ readonly type: "object";
98
+ readonly additionalProperties: false;
99
+ readonly required: readonly ["challenge", "sessionId"];
100
+ readonly properties: {
101
+ readonly challenge: {
102
+ readonly type: "string";
103
+ readonly minLength: 16;
104
+ readonly description: "The exact challenge value returned by a prior auth/challenge call. Consumers MUST reject mismatch, expired, or re-used challenges.";
105
+ };
106
+ readonly sessionId: {
107
+ readonly type: "string";
108
+ readonly minLength: 1;
109
+ readonly description: "The sessionId returned alongside the challenge. Consumers use it to look up the server-side challenge binding.";
110
+ };
111
+ readonly scope: {
112
+ readonly type: "array";
113
+ readonly items: {
114
+ readonly type: "string";
115
+ readonly minLength: 1;
116
+ };
117
+ readonly description: "Optional capability tags being requested on the issued tokens. The consumer's authorization layer decides which are granted; the issued TokenBundle's `scope` MAY be a subset.";
118
+ };
119
+ readonly principal: {
120
+ readonly type: "string";
121
+ readonly pattern: "^did:";
122
+ readonly maxLength: 2048;
123
+ readonly description: "The VID being authenticated as, when it differs from the signer of this document. Present and unequal to `issuer` marks a *proxied* authenticate: `issuer` is a delegate (typically the principal's VTA) presenting its own proof, and `payload.delegationEvidence` MUST also be present, describing what entitles `issuer` to act for `principal`. Omitted, or equal to `issuer`, is the ordinary case: the signer authenticates as itself, exactly as auth/authenticate/0.2. See Authorization and Security & Privacy.";
124
+ };
125
+ readonly delegationEvidence: {
126
+ readonly type: "object";
127
+ readonly additionalProperties: false;
128
+ readonly required: readonly ["kind"];
129
+ readonly description: "REQUIRED whenever `principal` is present and differs from `issuer`; MUST be omitted otherwise. Describes the evidence that entitles `issuer` to authenticate as `principal`. The framework does not prescribe its shape — see Authorization — but the consumer's policy MUST verify it independently rather than take `issuer`'s claim of entitlement at face value.";
130
+ readonly properties: {
131
+ readonly kind: {
132
+ readonly type: "string";
133
+ readonly minLength: 1;
134
+ readonly maxLength: 64;
135
+ readonly description: "Consumer-defined vocabulary naming the evidence class (e.g. \"vtaContext\", \"mandateCredential\"). The framework imposes no syntax; an unrecognized `kind` is refused with `auth/authenticate:delegationNotRecognized`.";
136
+ };
137
+ readonly credential: {
138
+ readonly type: "object";
139
+ readonly description: "The evidence itself, inline — typically a Verifiable Credential or other signed assertion binding `issuer` to `principal`. Opaque to the framework; shape is consumer- or ecosystem-defined by `kind`.";
140
+ };
141
+ readonly reference: {
142
+ readonly type: "string";
143
+ readonly minLength: 1;
144
+ readonly maxLength: 2048;
145
+ readonly description: "Alternative to inlining `credential`: an opaque reference (an id, a URL) to evidence the consumer already holds — for example a previously-registered VTA context binding. Consumer-defined; mutually informative with `credential`, not mutually exclusive — a producer MAY supply both.";
146
+ };
147
+ readonly ext: {
148
+ readonly $ref: "#/$defs/Ext";
149
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
150
+ };
151
+ };
152
+ };
153
+ readonly sessionKey: {
154
+ readonly type: "string";
155
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
156
+ readonly maxLength: 512;
157
+ readonly description: "A did:key VID the producer asks the consumer to bind to the session this authenticate document creates. The producer MUST hold the corresponding private key and SHOULD keep it non-extractable (for example, a WebCrypto non-extractable key). Once bound, the consumer MUST accept a framework `proof` made by this key, with `proofPurpose: authentication`, as the session's `subject` — for this session only, bounded by the session's `expiresAt` and `acr`, and never where a specification requires an `assertionMethod` attestation (SPEC.md §7.2 item 10; see Security & Privacy). Behaves identically whether or not this document is a proxied authenticate. The consumer MAY refuse a key type it does not support with `auth/authenticate:sessionKeyUnsupported`.";
158
+ };
159
+ readonly ext: {
160
+ readonly $ref: "#/$defs/Ext";
161
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
162
+ };
163
+ };
164
+ readonly $defs: {
165
+ readonly Response: {
166
+ readonly $anchor: "response";
167
+ readonly title: "Auth Authenticate — response payload";
168
+ readonly description: "Issued by the auth service after verifying the proof on the authenticate document (and, for a proxied request, the delegation evidence). Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.3#response.";
169
+ readonly type: "object";
170
+ readonly additionalProperties: false;
171
+ readonly required: readonly ["session", "tokens"];
172
+ readonly properties: {
173
+ readonly session: {
174
+ readonly $ref: "#/$defs/Session";
175
+ readonly description: "The session the consumer has just created for this subject. `session.subject` is `principal` for a proxied request, `issuer` otherwise; `session.actor` is present and equal to `issuer` only for a proxied request. Carries `sessionKey` when the request bound one.";
176
+ };
177
+ readonly tokens: {
178
+ readonly $ref: "#/$defs/TokenBundle";
179
+ readonly description: "Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.";
180
+ };
181
+ readonly ext: {
182
+ readonly $ref: "#/$defs/Ext";
183
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
184
+ };
185
+ };
186
+ };
187
+ readonly Ext: {
188
+ readonly title: "Ext";
189
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
190
+ readonly type: "object";
191
+ readonly minProperties: 1;
192
+ readonly additionalProperties: true;
193
+ readonly propertyNames: {
194
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
195
+ };
196
+ };
197
+ readonly TokenBundle: {
198
+ readonly $anchor: "tokenBundle";
199
+ readonly title: "TokenBundle";
200
+ readonly description: "An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.";
201
+ readonly type: "object";
202
+ readonly additionalProperties: false;
203
+ readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
204
+ readonly properties: {
205
+ readonly accessToken: {
206
+ readonly type: "string";
207
+ readonly minLength: 1;
208
+ readonly description: "Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.";
209
+ };
210
+ readonly refreshToken: {
211
+ readonly type: "string";
212
+ readonly minLength: 1;
213
+ readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
214
+ };
215
+ readonly tokenType: {
216
+ readonly type: "string";
217
+ readonly minLength: 1;
218
+ readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
219
+ };
220
+ readonly expiresIn: {
221
+ readonly type: "integer";
222
+ readonly minimum: 1;
223
+ readonly description: "Seconds from issuance until the access token expires.";
224
+ };
225
+ readonly refreshExpiresIn: {
226
+ readonly type: "integer";
227
+ readonly minimum: 1;
228
+ readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
229
+ };
230
+ readonly scope: {
231
+ readonly type: "array";
232
+ readonly items: {
233
+ readonly type: "string";
234
+ readonly minLength: 1;
235
+ };
236
+ readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
237
+ };
238
+ readonly ext: {
239
+ readonly $ref: "#/$defs/Ext";
240
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
241
+ };
242
+ };
243
+ };
244
+ readonly Session: {
245
+ readonly $anchor: "session";
246
+ readonly title: "Session";
247
+ readonly description: "A logical authentication context bound to a subject. Producers and consumers exchange Session-shaped data in challenge issuance, authentication responses, and introspection (whoami).";
248
+ readonly type: "object";
249
+ readonly additionalProperties: false;
250
+ readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
251
+ readonly properties: {
252
+ readonly id: {
253
+ readonly type: "string";
254
+ readonly minLength: 1;
255
+ readonly description: "Opaque, server-chosen session identifier. Stable for the lifetime of the session. Consumers MUST treat the value as opaque; no structure is implied.";
256
+ };
257
+ readonly subject: {
258
+ readonly type: "string";
259
+ readonly minLength: 1;
260
+ readonly description: "The authenticated party's VID (typically a DID URL). For a session established by a proxied login (auth/authenticate/0.3), this is the *principal* being authenticated as — never the delegate that signed the authenticate document; see `actor`.";
261
+ };
262
+ readonly issuedAt: {
263
+ readonly type: "string";
264
+ readonly format: "date-time";
265
+ readonly description: "ISO-8601 timestamp when the session was created.";
266
+ };
267
+ readonly expiresAt: {
268
+ readonly type: "string";
269
+ readonly format: "date-time";
270
+ readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after. A consumer honouring `absoluteExpiresAt` MUST NOT advance this value past it, by refresh or any other means.";
271
+ };
272
+ readonly amr: {
273
+ readonly type: "array";
274
+ readonly minItems: 1;
275
+ readonly items: {
276
+ readonly type: "string";
277
+ readonly minLength: 1;
278
+ };
279
+ readonly description: "Authentication Methods References per [RFC 8176]. Typical values: \"did\" (challenge-response), \"passkey\" (WebAuthn), \"vta\" (verifiable-trust agent approval). Multi-factor sessions list every method used.";
280
+ };
281
+ readonly acr: {
282
+ readonly type: "string";
283
+ readonly description: "Authentication Context Class Reference per [OIDC Core §2]. Profiles define their own values; the recommended set is \"aal1\" (single-factor DID auth), \"aal2\" (a second possession-or-biometric factor confirmed), and \"aal3\" (hardware-bound second factor).";
284
+ };
285
+ readonly sessionKey: {
286
+ readonly type: "string";
287
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
288
+ readonly maxLength: 512;
289
+ readonly description: "The did:key VID bound to this session by auth/authenticate/0.2 or 0.3, when the producer registered one. Present here so introspection (auth/whoami, auth/sessions/list) can show the binding a client already holds; it is descriptive, not an additional grant — the binding, its scope and its lifetime are governed entirely by the auth/authenticate specification version that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
290
+ };
291
+ readonly actor: {
292
+ readonly type: "string";
293
+ readonly minLength: 1;
294
+ readonly maxLength: 2048;
295
+ readonly description: "The delegate's VID — the party whose `proof` actually authenticated this session — when this session was established by a *proxied* login (auth/authenticate/0.3, `payload.principal` present and distinct from `issuer`). Absent whenever `subject` authenticated with its own key, including every auth/authenticate/0.1 and /0.2 session and an auth/authenticate/0.3 request where `principal` is absent or equals `issuer`. Carrying `actor` separately from `subject` is what lets an audit trail, a revocation, or a response to a compromised delegate name the true acting party without conflating it with the principal it acted for — see auth/authenticate/0.3 Security & Privacy (Correlation).";
296
+ };
297
+ readonly absoluteExpiresAt: {
298
+ readonly type: "string";
299
+ readonly format: "date-time";
300
+ readonly description: "The instant beyond which this session's `expiresAt` MUST NOT be advanced, by auth/refresh/0.2 or by any other means — an absolute session lifetime set once at authentication and never moved forward. Consumers that impose no such ceiling beyond the session's own rolling `expiresAt` omit this member; its absence is not itself a claim that the session is unbounded, only that this response does not state a bound. See auth/refresh/0.2 Conformance and Security & Privacy for the enforcement rule.";
301
+ };
302
+ readonly ext: {
303
+ readonly $ref: "#/$defs/Ext";
304
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
305
+ };
306
+ };
307
+ };
308
+ };
309
+ };
310
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
311
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
312
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
313
+ readonly $ref: "#/$defs/Response";
314
+ readonly $defs: {
315
+ readonly Response: {
316
+ readonly $anchor: "response";
317
+ readonly title: "Auth Authenticate — response payload";
318
+ readonly description: "Issued by the auth service after verifying the proof on the authenticate document (and, for a proxied request, the delegation evidence). Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.3#response.";
319
+ readonly type: "object";
320
+ readonly additionalProperties: false;
321
+ readonly required: readonly ["session", "tokens"];
322
+ readonly properties: {
323
+ readonly session: {
324
+ readonly $ref: "#/$defs/Session";
325
+ readonly description: "The session the consumer has just created for this subject. `session.subject` is `principal` for a proxied request, `issuer` otherwise; `session.actor` is present and equal to `issuer` only for a proxied request. Carries `sessionKey` when the request bound one.";
326
+ };
327
+ readonly tokens: {
328
+ readonly $ref: "#/$defs/TokenBundle";
329
+ readonly description: "Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.";
330
+ };
331
+ readonly ext: {
332
+ readonly $ref: "#/$defs/Ext";
333
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
334
+ };
335
+ };
336
+ };
337
+ readonly Ext: {
338
+ readonly title: "Ext";
339
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
340
+ readonly type: "object";
341
+ readonly minProperties: 1;
342
+ readonly additionalProperties: true;
343
+ readonly propertyNames: {
344
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
345
+ };
346
+ };
347
+ readonly TokenBundle: {
348
+ readonly $anchor: "tokenBundle";
349
+ readonly title: "TokenBundle";
350
+ readonly description: "An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.";
351
+ readonly type: "object";
352
+ readonly additionalProperties: false;
353
+ readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
354
+ readonly properties: {
355
+ readonly accessToken: {
356
+ readonly type: "string";
357
+ readonly minLength: 1;
358
+ readonly description: "Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.";
359
+ };
360
+ readonly refreshToken: {
361
+ readonly type: "string";
362
+ readonly minLength: 1;
363
+ readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
364
+ };
365
+ readonly tokenType: {
366
+ readonly type: "string";
367
+ readonly minLength: 1;
368
+ readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
369
+ };
370
+ readonly expiresIn: {
371
+ readonly type: "integer";
372
+ readonly minimum: 1;
373
+ readonly description: "Seconds from issuance until the access token expires.";
374
+ };
375
+ readonly refreshExpiresIn: {
376
+ readonly type: "integer";
377
+ readonly minimum: 1;
378
+ readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
379
+ };
380
+ readonly scope: {
381
+ readonly type: "array";
382
+ readonly items: {
383
+ readonly type: "string";
384
+ readonly minLength: 1;
385
+ };
386
+ readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
387
+ };
388
+ readonly ext: {
389
+ readonly $ref: "#/$defs/Ext";
390
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
391
+ };
392
+ };
393
+ };
394
+ readonly Session: {
395
+ readonly $anchor: "session";
396
+ readonly title: "Session";
397
+ readonly description: "A logical authentication context bound to a subject. Producers and consumers exchange Session-shaped data in challenge issuance, authentication responses, and introspection (whoami).";
398
+ readonly type: "object";
399
+ readonly additionalProperties: false;
400
+ readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
401
+ readonly properties: {
402
+ readonly id: {
403
+ readonly type: "string";
404
+ readonly minLength: 1;
405
+ readonly description: "Opaque, server-chosen session identifier. Stable for the lifetime of the session. Consumers MUST treat the value as opaque; no structure is implied.";
406
+ };
407
+ readonly subject: {
408
+ readonly type: "string";
409
+ readonly minLength: 1;
410
+ readonly description: "The authenticated party's VID (typically a DID URL). For a session established by a proxied login (auth/authenticate/0.3), this is the *principal* being authenticated as — never the delegate that signed the authenticate document; see `actor`.";
411
+ };
412
+ readonly issuedAt: {
413
+ readonly type: "string";
414
+ readonly format: "date-time";
415
+ readonly description: "ISO-8601 timestamp when the session was created.";
416
+ };
417
+ readonly expiresAt: {
418
+ readonly type: "string";
419
+ readonly format: "date-time";
420
+ readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after. A consumer honouring `absoluteExpiresAt` MUST NOT advance this value past it, by refresh or any other means.";
421
+ };
422
+ readonly amr: {
423
+ readonly type: "array";
424
+ readonly minItems: 1;
425
+ readonly items: {
426
+ readonly type: "string";
427
+ readonly minLength: 1;
428
+ };
429
+ readonly description: "Authentication Methods References per [RFC 8176]. Typical values: \"did\" (challenge-response), \"passkey\" (WebAuthn), \"vta\" (verifiable-trust agent approval). Multi-factor sessions list every method used.";
430
+ };
431
+ readonly acr: {
432
+ readonly type: "string";
433
+ readonly description: "Authentication Context Class Reference per [OIDC Core §2]. Profiles define their own values; the recommended set is \"aal1\" (single-factor DID auth), \"aal2\" (a second possession-or-biometric factor confirmed), and \"aal3\" (hardware-bound second factor).";
434
+ };
435
+ readonly sessionKey: {
436
+ readonly type: "string";
437
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
438
+ readonly maxLength: 512;
439
+ readonly description: "The did:key VID bound to this session by auth/authenticate/0.2 or 0.3, when the producer registered one. Present here so introspection (auth/whoami, auth/sessions/list) can show the binding a client already holds; it is descriptive, not an additional grant — the binding, its scope and its lifetime are governed entirely by the auth/authenticate specification version that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
440
+ };
441
+ readonly actor: {
442
+ readonly type: "string";
443
+ readonly minLength: 1;
444
+ readonly maxLength: 2048;
445
+ readonly description: "The delegate's VID — the party whose `proof` actually authenticated this session — when this session was established by a *proxied* login (auth/authenticate/0.3, `payload.principal` present and distinct from `issuer`). Absent whenever `subject` authenticated with its own key, including every auth/authenticate/0.1 and /0.2 session and an auth/authenticate/0.3 request where `principal` is absent or equals `issuer`. Carrying `actor` separately from `subject` is what lets an audit trail, a revocation, or a response to a compromised delegate name the true acting party without conflating it with the principal it acted for — see auth/authenticate/0.3 Security & Privacy (Correlation).";
446
+ };
447
+ readonly absoluteExpiresAt: {
448
+ readonly type: "string";
449
+ readonly format: "date-time";
450
+ readonly description: "The instant beyond which this session's `expiresAt` MUST NOT be advanced, by auth/refresh/0.2 or by any other means — an absolute session lifetime set once at authentication and never moved forward. Consumers that impose no such ceiling beyond the session's own rolling `expiresAt` omit this member; its absence is not itself a claim that the session is unbounded, only that this response does not state a bound. See auth/refresh/0.2 Conformance and Security & Privacy for the enforcement rule.";
451
+ };
452
+ readonly ext: {
453
+ readonly $ref: "#/$defs/Ext";
454
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
455
+ };
456
+ };
457
+ };
458
+ };
459
+ };
460
+ /**
461
+ * SPEC.md §7.2 policy for the request variant, from this specification's
462
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
463
+ * per-specification and cannot be derived from the document alone, and
464
+ * item 2 needs the schema this carries.
465
+ */
466
+ export declare const SPEC: {
467
+ readonly typeUri: "https://trusttasks.org/spec/auth/authenticate/0.3";
468
+ readonly isBearer: false;
469
+ readonly isProofRequired: true;
470
+ readonly isRecipientRequired: true;
471
+ readonly isIssuedAtRequired: true;
472
+ readonly payloadSchema: {
473
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
474
+ readonly $id: "https://trusttasks.org/spec/auth/authenticate/0.3";
475
+ readonly title: "Auth — Authenticate";
476
+ readonly description: "The subject presents a previously-issued challenge along with the framework `proof` that binds the document to a VID. The proof IS the authentication. 0.3 adds an optional proxied form: `principal` names a party the signer authenticates *as*, distinct from `issuer` (the signer, e.g. a VTA acting on the principal's behalf), together with `delegationEvidence` establishing the entitlement. Absent `principal`, or `principal` equal to `issuer`, is the ordinary auth/authenticate/0.2 form unchanged. 0.3 also carries forward the optional `sessionKey` member from 0.2.";
477
+ readonly type: "object";
478
+ readonly additionalProperties: false;
479
+ readonly required: readonly ["challenge", "sessionId"];
480
+ readonly properties: {
481
+ readonly challenge: {
482
+ readonly type: "string";
483
+ readonly minLength: 16;
484
+ readonly description: "The exact challenge value returned by a prior auth/challenge call. Consumers MUST reject mismatch, expired, or re-used challenges.";
485
+ };
486
+ readonly sessionId: {
487
+ readonly type: "string";
488
+ readonly minLength: 1;
489
+ readonly description: "The sessionId returned alongside the challenge. Consumers use it to look up the server-side challenge binding.";
490
+ };
491
+ readonly scope: {
492
+ readonly type: "array";
493
+ readonly items: {
494
+ readonly type: "string";
495
+ readonly minLength: 1;
496
+ };
497
+ readonly description: "Optional capability tags being requested on the issued tokens. The consumer's authorization layer decides which are granted; the issued TokenBundle's `scope` MAY be a subset.";
498
+ };
499
+ readonly principal: {
500
+ readonly type: "string";
501
+ readonly pattern: "^did:";
502
+ readonly maxLength: 2048;
503
+ readonly description: "The VID being authenticated as, when it differs from the signer of this document. Present and unequal to `issuer` marks a *proxied* authenticate: `issuer` is a delegate (typically the principal's VTA) presenting its own proof, and `payload.delegationEvidence` MUST also be present, describing what entitles `issuer` to act for `principal`. Omitted, or equal to `issuer`, is the ordinary case: the signer authenticates as itself, exactly as auth/authenticate/0.2. See Authorization and Security & Privacy.";
504
+ };
505
+ readonly delegationEvidence: {
506
+ readonly type: "object";
507
+ readonly additionalProperties: false;
508
+ readonly required: readonly ["kind"];
509
+ readonly description: "REQUIRED whenever `principal` is present and differs from `issuer`; MUST be omitted otherwise. Describes the evidence that entitles `issuer` to authenticate as `principal`. The framework does not prescribe its shape — see Authorization — but the consumer's policy MUST verify it independently rather than take `issuer`'s claim of entitlement at face value.";
510
+ readonly properties: {
511
+ readonly kind: {
512
+ readonly type: "string";
513
+ readonly minLength: 1;
514
+ readonly maxLength: 64;
515
+ readonly description: "Consumer-defined vocabulary naming the evidence class (e.g. \"vtaContext\", \"mandateCredential\"). The framework imposes no syntax; an unrecognized `kind` is refused with `auth/authenticate:delegationNotRecognized`.";
516
+ };
517
+ readonly credential: {
518
+ readonly type: "object";
519
+ readonly description: "The evidence itself, inline — typically a Verifiable Credential or other signed assertion binding `issuer` to `principal`. Opaque to the framework; shape is consumer- or ecosystem-defined by `kind`.";
520
+ };
521
+ readonly reference: {
522
+ readonly type: "string";
523
+ readonly minLength: 1;
524
+ readonly maxLength: 2048;
525
+ readonly description: "Alternative to inlining `credential`: an opaque reference (an id, a URL) to evidence the consumer already holds — for example a previously-registered VTA context binding. Consumer-defined; mutually informative with `credential`, not mutually exclusive — a producer MAY supply both.";
526
+ };
527
+ readonly ext: {
528
+ readonly $ref: "#/$defs/Ext";
529
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
530
+ };
531
+ };
532
+ };
533
+ readonly sessionKey: {
534
+ readonly type: "string";
535
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
536
+ readonly maxLength: 512;
537
+ readonly description: "A did:key VID the producer asks the consumer to bind to the session this authenticate document creates. The producer MUST hold the corresponding private key and SHOULD keep it non-extractable (for example, a WebCrypto non-extractable key). Once bound, the consumer MUST accept a framework `proof` made by this key, with `proofPurpose: authentication`, as the session's `subject` — for this session only, bounded by the session's `expiresAt` and `acr`, and never where a specification requires an `assertionMethod` attestation (SPEC.md §7.2 item 10; see Security & Privacy). Behaves identically whether or not this document is a proxied authenticate. The consumer MAY refuse a key type it does not support with `auth/authenticate:sessionKeyUnsupported`.";
538
+ };
539
+ readonly ext: {
540
+ readonly $ref: "#/$defs/Ext";
541
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
542
+ };
543
+ };
544
+ readonly $defs: {
545
+ readonly Response: {
546
+ readonly $anchor: "response";
547
+ readonly title: "Auth Authenticate — response payload";
548
+ readonly description: "Issued by the auth service after verifying the proof on the authenticate document (and, for a proxied request, the delegation evidence). Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.3#response.";
549
+ readonly type: "object";
550
+ readonly additionalProperties: false;
551
+ readonly required: readonly ["session", "tokens"];
552
+ readonly properties: {
553
+ readonly session: {
554
+ readonly $ref: "#/$defs/Session";
555
+ readonly description: "The session the consumer has just created for this subject. `session.subject` is `principal` for a proxied request, `issuer` otherwise; `session.actor` is present and equal to `issuer` only for a proxied request. Carries `sessionKey` when the request bound one.";
556
+ };
557
+ readonly tokens: {
558
+ readonly $ref: "#/$defs/TokenBundle";
559
+ readonly description: "Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.";
560
+ };
561
+ readonly ext: {
562
+ readonly $ref: "#/$defs/Ext";
563
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
564
+ };
565
+ };
566
+ };
567
+ readonly Ext: {
568
+ readonly title: "Ext";
569
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
570
+ readonly type: "object";
571
+ readonly minProperties: 1;
572
+ readonly additionalProperties: true;
573
+ readonly propertyNames: {
574
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
575
+ };
576
+ };
577
+ readonly TokenBundle: {
578
+ readonly $anchor: "tokenBundle";
579
+ readonly title: "TokenBundle";
580
+ readonly description: "An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.";
581
+ readonly type: "object";
582
+ readonly additionalProperties: false;
583
+ readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
584
+ readonly properties: {
585
+ readonly accessToken: {
586
+ readonly type: "string";
587
+ readonly minLength: 1;
588
+ readonly description: "Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.";
589
+ };
590
+ readonly refreshToken: {
591
+ readonly type: "string";
592
+ readonly minLength: 1;
593
+ readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
594
+ };
595
+ readonly tokenType: {
596
+ readonly type: "string";
597
+ readonly minLength: 1;
598
+ readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
599
+ };
600
+ readonly expiresIn: {
601
+ readonly type: "integer";
602
+ readonly minimum: 1;
603
+ readonly description: "Seconds from issuance until the access token expires.";
604
+ };
605
+ readonly refreshExpiresIn: {
606
+ readonly type: "integer";
607
+ readonly minimum: 1;
608
+ readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
609
+ };
610
+ readonly scope: {
611
+ readonly type: "array";
612
+ readonly items: {
613
+ readonly type: "string";
614
+ readonly minLength: 1;
615
+ };
616
+ readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
617
+ };
618
+ readonly ext: {
619
+ readonly $ref: "#/$defs/Ext";
620
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
621
+ };
622
+ };
623
+ };
624
+ readonly Session: {
625
+ readonly $anchor: "session";
626
+ readonly title: "Session";
627
+ readonly description: "A logical authentication context bound to a subject. Producers and consumers exchange Session-shaped data in challenge issuance, authentication responses, and introspection (whoami).";
628
+ readonly type: "object";
629
+ readonly additionalProperties: false;
630
+ readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
631
+ readonly properties: {
632
+ readonly id: {
633
+ readonly type: "string";
634
+ readonly minLength: 1;
635
+ readonly description: "Opaque, server-chosen session identifier. Stable for the lifetime of the session. Consumers MUST treat the value as opaque; no structure is implied.";
636
+ };
637
+ readonly subject: {
638
+ readonly type: "string";
639
+ readonly minLength: 1;
640
+ readonly description: "The authenticated party's VID (typically a DID URL). For a session established by a proxied login (auth/authenticate/0.3), this is the *principal* being authenticated as — never the delegate that signed the authenticate document; see `actor`.";
641
+ };
642
+ readonly issuedAt: {
643
+ readonly type: "string";
644
+ readonly format: "date-time";
645
+ readonly description: "ISO-8601 timestamp when the session was created.";
646
+ };
647
+ readonly expiresAt: {
648
+ readonly type: "string";
649
+ readonly format: "date-time";
650
+ readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after. A consumer honouring `absoluteExpiresAt` MUST NOT advance this value past it, by refresh or any other means.";
651
+ };
652
+ readonly amr: {
653
+ readonly type: "array";
654
+ readonly minItems: 1;
655
+ readonly items: {
656
+ readonly type: "string";
657
+ readonly minLength: 1;
658
+ };
659
+ readonly description: "Authentication Methods References per [RFC 8176]. Typical values: \"did\" (challenge-response), \"passkey\" (WebAuthn), \"vta\" (verifiable-trust agent approval). Multi-factor sessions list every method used.";
660
+ };
661
+ readonly acr: {
662
+ readonly type: "string";
663
+ readonly description: "Authentication Context Class Reference per [OIDC Core §2]. Profiles define their own values; the recommended set is \"aal1\" (single-factor DID auth), \"aal2\" (a second possession-or-biometric factor confirmed), and \"aal3\" (hardware-bound second factor).";
664
+ };
665
+ readonly sessionKey: {
666
+ readonly type: "string";
667
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
668
+ readonly maxLength: 512;
669
+ readonly description: "The did:key VID bound to this session by auth/authenticate/0.2 or 0.3, when the producer registered one. Present here so introspection (auth/whoami, auth/sessions/list) can show the binding a client already holds; it is descriptive, not an additional grant — the binding, its scope and its lifetime are governed entirely by the auth/authenticate specification version that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
670
+ };
671
+ readonly actor: {
672
+ readonly type: "string";
673
+ readonly minLength: 1;
674
+ readonly maxLength: 2048;
675
+ readonly description: "The delegate's VID — the party whose `proof` actually authenticated this session — when this session was established by a *proxied* login (auth/authenticate/0.3, `payload.principal` present and distinct from `issuer`). Absent whenever `subject` authenticated with its own key, including every auth/authenticate/0.1 and /0.2 session and an auth/authenticate/0.3 request where `principal` is absent or equals `issuer`. Carrying `actor` separately from `subject` is what lets an audit trail, a revocation, or a response to a compromised delegate name the true acting party without conflating it with the principal it acted for — see auth/authenticate/0.3 Security & Privacy (Correlation).";
676
+ };
677
+ readonly absoluteExpiresAt: {
678
+ readonly type: "string";
679
+ readonly format: "date-time";
680
+ readonly description: "The instant beyond which this session's `expiresAt` MUST NOT be advanced, by auth/refresh/0.2 or by any other means — an absolute session lifetime set once at authentication and never moved forward. Consumers that impose no such ceiling beyond the session's own rolling `expiresAt` omit this member; its absence is not itself a claim that the session is unbounded, only that this response does not state a bound. See auth/refresh/0.2 Conformance and Security & Privacy for the enforcement rule.";
681
+ };
682
+ readonly ext: {
683
+ readonly $ref: "#/$defs/Ext";
684
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
685
+ };
686
+ };
687
+ };
688
+ };
689
+ };
690
+ };
691
+ /**
692
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
693
+ * tracks the *issuer* party's requirement because a response swaps the
694
+ * parties (§7.3 item 5).
695
+ */
696
+ export declare const RESPONSE_SPEC: {
697
+ readonly typeUri: "https://trusttasks.org/spec/auth/authenticate/0.3#response";
698
+ readonly isBearer: false;
699
+ readonly isProofRequired: true;
700
+ readonly isRecipientRequired: true;
701
+ readonly isIssuedAtRequired: true;
702
+ readonly payloadSchema: {
703
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
704
+ readonly $ref: "#/$defs/Response";
705
+ readonly $defs: {
706
+ readonly Response: {
707
+ readonly $anchor: "response";
708
+ readonly title: "Auth Authenticate — response payload";
709
+ readonly description: "Issued by the auth service after verifying the proof on the authenticate document (and, for a proxied request, the delegation evidence). Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.3#response.";
710
+ readonly type: "object";
711
+ readonly additionalProperties: false;
712
+ readonly required: readonly ["session", "tokens"];
713
+ readonly properties: {
714
+ readonly session: {
715
+ readonly $ref: "#/$defs/Session";
716
+ readonly description: "The session the consumer has just created for this subject. `session.subject` is `principal` for a proxied request, `issuer` otherwise; `session.actor` is present and equal to `issuer` only for a proxied request. Carries `sessionKey` when the request bound one.";
717
+ };
718
+ readonly tokens: {
719
+ readonly $ref: "#/$defs/TokenBundle";
720
+ readonly description: "Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.";
721
+ };
722
+ readonly ext: {
723
+ readonly $ref: "#/$defs/Ext";
724
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
725
+ };
726
+ };
727
+ };
728
+ readonly Ext: {
729
+ readonly title: "Ext";
730
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
731
+ readonly type: "object";
732
+ readonly minProperties: 1;
733
+ readonly additionalProperties: true;
734
+ readonly propertyNames: {
735
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
736
+ };
737
+ };
738
+ readonly TokenBundle: {
739
+ readonly $anchor: "tokenBundle";
740
+ readonly title: "TokenBundle";
741
+ readonly description: "An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.";
742
+ readonly type: "object";
743
+ readonly additionalProperties: false;
744
+ readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
745
+ readonly properties: {
746
+ readonly accessToken: {
747
+ readonly type: "string";
748
+ readonly minLength: 1;
749
+ readonly description: "Bearer-style access token. Consumers presenting this token to downstream services prove the holder of the original session. Format is consumer-defined — JWT is common, but opaque strings are also valid.";
750
+ };
751
+ readonly refreshToken: {
752
+ readonly type: "string";
753
+ readonly minLength: 1;
754
+ readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
755
+ };
756
+ readonly tokenType: {
757
+ readonly type: "string";
758
+ readonly minLength: 1;
759
+ readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
760
+ };
761
+ readonly expiresIn: {
762
+ readonly type: "integer";
763
+ readonly minimum: 1;
764
+ readonly description: "Seconds from issuance until the access token expires.";
765
+ };
766
+ readonly refreshExpiresIn: {
767
+ readonly type: "integer";
768
+ readonly minimum: 1;
769
+ readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
770
+ };
771
+ readonly scope: {
772
+ readonly type: "array";
773
+ readonly items: {
774
+ readonly type: "string";
775
+ readonly minLength: 1;
776
+ };
777
+ readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
778
+ };
779
+ readonly ext: {
780
+ readonly $ref: "#/$defs/Ext";
781
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
782
+ };
783
+ };
784
+ };
785
+ readonly Session: {
786
+ readonly $anchor: "session";
787
+ readonly title: "Session";
788
+ readonly description: "A logical authentication context bound to a subject. Producers and consumers exchange Session-shaped data in challenge issuance, authentication responses, and introspection (whoami).";
789
+ readonly type: "object";
790
+ readonly additionalProperties: false;
791
+ readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
792
+ readonly properties: {
793
+ readonly id: {
794
+ readonly type: "string";
795
+ readonly minLength: 1;
796
+ readonly description: "Opaque, server-chosen session identifier. Stable for the lifetime of the session. Consumers MUST treat the value as opaque; no structure is implied.";
797
+ };
798
+ readonly subject: {
799
+ readonly type: "string";
800
+ readonly minLength: 1;
801
+ readonly description: "The authenticated party's VID (typically a DID URL). For a session established by a proxied login (auth/authenticate/0.3), this is the *principal* being authenticated as — never the delegate that signed the authenticate document; see `actor`.";
802
+ };
803
+ readonly issuedAt: {
804
+ readonly type: "string";
805
+ readonly format: "date-time";
806
+ readonly description: "ISO-8601 timestamp when the session was created.";
807
+ };
808
+ readonly expiresAt: {
809
+ readonly type: "string";
810
+ readonly format: "date-time";
811
+ readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after. A consumer honouring `absoluteExpiresAt` MUST NOT advance this value past it, by refresh or any other means.";
812
+ };
813
+ readonly amr: {
814
+ readonly type: "array";
815
+ readonly minItems: 1;
816
+ readonly items: {
817
+ readonly type: "string";
818
+ readonly minLength: 1;
819
+ };
820
+ readonly description: "Authentication Methods References per [RFC 8176]. Typical values: \"did\" (challenge-response), \"passkey\" (WebAuthn), \"vta\" (verifiable-trust agent approval). Multi-factor sessions list every method used.";
821
+ };
822
+ readonly acr: {
823
+ readonly type: "string";
824
+ readonly description: "Authentication Context Class Reference per [OIDC Core §2]. Profiles define their own values; the recommended set is \"aal1\" (single-factor DID auth), \"aal2\" (a second possession-or-biometric factor confirmed), and \"aal3\" (hardware-bound second factor).";
825
+ };
826
+ readonly sessionKey: {
827
+ readonly type: "string";
828
+ readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
829
+ readonly maxLength: 512;
830
+ readonly description: "The did:key VID bound to this session by auth/authenticate/0.2 or 0.3, when the producer registered one. Present here so introspection (auth/whoami, auth/sessions/list) can show the binding a client already holds; it is descriptive, not an additional grant — the binding, its scope and its lifetime are governed entirely by the auth/authenticate specification version that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
831
+ };
832
+ readonly actor: {
833
+ readonly type: "string";
834
+ readonly minLength: 1;
835
+ readonly maxLength: 2048;
836
+ readonly description: "The delegate's VID — the party whose `proof` actually authenticated this session — when this session was established by a *proxied* login (auth/authenticate/0.3, `payload.principal` present and distinct from `issuer`). Absent whenever `subject` authenticated with its own key, including every auth/authenticate/0.1 and /0.2 session and an auth/authenticate/0.3 request where `principal` is absent or equals `issuer`. Carrying `actor` separately from `subject` is what lets an audit trail, a revocation, or a response to a compromised delegate name the true acting party without conflating it with the principal it acted for — see auth/authenticate/0.3 Security & Privacy (Correlation).";
837
+ };
838
+ readonly absoluteExpiresAt: {
839
+ readonly type: "string";
840
+ readonly format: "date-time";
841
+ readonly description: "The instant beyond which this session's `expiresAt` MUST NOT be advanced, by auth/refresh/0.2 or by any other means — an absolute session lifetime set once at authentication and never moved forward. Consumers that impose no such ceiling beyond the session's own rolling `expiresAt` omit this member; its absence is not itself a claim that the session is unbounded, only that this response does not state a bound. See auth/refresh/0.2 Conformance and Security & Privacy for the enforcement rule.";
842
+ };
843
+ readonly ext: {
844
+ readonly $ref: "#/$defs/Ext";
845
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
846
+ };
847
+ };
848
+ };
849
+ };
850
+ };
851
+ };
852
+ //# sourceMappingURL=payload.d.ts.map