@openvtc/trust-tasks 0.21.8 → 0.21.10
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.
- package/CHANGELOG.md +86 -0
- package/dist/_shared/components.d.ts +40 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/_shared/0.1/session.d.ts +1 -1
- package/dist/auth/_shared/0.1/session.d.ts.map +1 -1
- package/dist/auth/_shared/0.2/session.d.ts +16 -0
- package/dist/auth/_shared/0.2/session.d.ts.map +1 -0
- package/dist/auth/_shared/0.2/session.js +6 -0
- package/dist/auth/_shared/0.2/session.js.map +1 -0
- package/dist/auth/authenticate/0.1/payload.d.ts +1 -1
- package/dist/auth/authenticate/0.1/payload.d.ts.map +1 -1
- package/dist/auth/authenticate/0.2/payload.d.ts +715 -0
- package/dist/auth/authenticate/0.2/payload.d.ts.map +1 -0
- package/dist/auth/authenticate/0.2/payload.js +384 -0
- package/dist/auth/authenticate/0.2/payload.js.map +1 -0
- package/dist/auth/passkey/login/finish/0.1/payload.d.ts +1 -1
- package/dist/auth/passkey/login/finish/0.1/payload.d.ts.map +1 -1
- package/dist/auth/passkey/login/finish/0.2/payload.d.ts +1 -1
- package/dist/auth/passkey/login/finish/0.2/payload.d.ts.map +1 -1
- package/dist/auth/refresh/0.1/payload.d.ts +1 -1
- package/dist/auth/refresh/0.1/payload.d.ts.map +1 -1
- package/dist/auth/sessions/list/0.1/payload.d.ts +1 -1
- package/dist/auth/sessions/list/0.1/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.1/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.1/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.2/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.2/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.3/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.3/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.4/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.4/payload.d.ts.map +1 -1
- package/dist/auth/step-up/approve-response/0.5/payload.d.ts +1 -1
- package/dist/auth/step-up/approve-response/0.5/payload.d.ts.map +1 -1
- package/dist/auth/whoami/0.1/payload.d.ts +1 -1
- package/dist/auth/whoami/0.1/payload.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/services/rollback/1.1/payload.d.ts +433 -0
- package/dist/vta/services/rollback/1.1/payload.d.ts.map +1 -0
- package/dist/vta/services/rollback/1.1/payload.js +258 -0
- package/dist/vta/services/rollback/1.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +40 -1
- package/src/auth/_shared/0.1/session.ts +1 -1
- package/src/auth/_shared/0.2/session.ts +17 -0
- package/src/auth/authenticate/0.1/payload.ts +1 -1
- package/src/auth/authenticate/0.2/payload.ts +444 -0
- package/src/auth/passkey/login/finish/0.1/payload.ts +1 -1
- package/src/auth/passkey/login/finish/0.2/payload.ts +1 -1
- package/src/auth/refresh/0.1/payload.ts +1 -1
- package/src/auth/sessions/list/0.1/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.1/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.2/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.3/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.4/payload.ts +1 -1
- package/src/auth/step-up/approve-response/0.5/payload.ts +1 -1
- package/src/auth/whoami/0.1/payload.ts +1 -1
- package/src/index.ts +3 -0
- package/src/vta/services/rollback/1.1/payload.ts +294 -0
|
@@ -0,0 +1,715 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/authenticate/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext, Session_AuthV0_2 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 their VID. The proof IS the authentication. 0.2 adds the optional `sessionKey` member, a did:key VID the consumer binds to the created session so later documents in that session can be signed with it instead of the subject's own key.
|
|
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 the subject is requesting 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
|
+
* 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 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). The consumer MAY refuse a key type it does not support with `auth/authenticate:sessionKeyUnsupported`. It sits inside `payload`, so the subject's own `authentication` proof on this document covers it — a party cannot bind a session key without signing for it.
|
|
24
|
+
*/
|
|
25
|
+
sessionKey?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
28
|
+
*/
|
|
29
|
+
ext?: Ext;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Issued by the auth service after verifying the proof on the authenticate document. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.2#response.
|
|
33
|
+
*/
|
|
34
|
+
export interface AuthAuthenticateResponsePayload {
|
|
35
|
+
/**
|
|
36
|
+
* The session the consumer has just created or refreshed for this subject. Carries `sessionKey` when the request bound one.
|
|
37
|
+
*/
|
|
38
|
+
session: Session;
|
|
39
|
+
/**
|
|
40
|
+
* Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.
|
|
41
|
+
*/
|
|
42
|
+
tokens: TokenBundle;
|
|
43
|
+
/**
|
|
44
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
45
|
+
*/
|
|
46
|
+
ext?: Ext;
|
|
47
|
+
}
|
|
48
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
49
|
+
export type { Ext, Session, TokenBundle };
|
|
50
|
+
/** Trust Task type URI. */
|
|
51
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/auth/authenticate/0.2";
|
|
52
|
+
/** Stable alias for this specification's request payload shape. */
|
|
53
|
+
export type Payload = AuthAuthenticate;
|
|
54
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
55
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/auth/authenticate/0.2#response";
|
|
56
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
57
|
+
export type Response = AuthAuthenticateResponsePayload;
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
68
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
69
|
+
readonly $id: "https://trusttasks.org/spec/auth/authenticate/0.2";
|
|
70
|
+
readonly title: "Auth — Authenticate";
|
|
71
|
+
readonly description: "The subject presents a previously-issued challenge along with the framework `proof` that binds the document to their VID. The proof IS the authentication. 0.2 adds the optional `sessionKey` member, a did:key VID the consumer binds to the created session so later documents in that session can be signed with it instead of the subject's own key.";
|
|
72
|
+
readonly type: "object";
|
|
73
|
+
readonly additionalProperties: false;
|
|
74
|
+
readonly required: readonly ["challenge", "sessionId"];
|
|
75
|
+
readonly properties: {
|
|
76
|
+
readonly challenge: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly minLength: 16;
|
|
79
|
+
readonly description: "The exact challenge value returned by a prior auth/challenge call. Consumers MUST reject mismatch, expired, or re-used challenges.";
|
|
80
|
+
};
|
|
81
|
+
readonly sessionId: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
readonly minLength: 1;
|
|
84
|
+
readonly description: "The sessionId returned alongside the challenge. Consumers use it to look up the server-side challenge binding.";
|
|
85
|
+
};
|
|
86
|
+
readonly scope: {
|
|
87
|
+
readonly type: "array";
|
|
88
|
+
readonly items: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
readonly minLength: 1;
|
|
91
|
+
};
|
|
92
|
+
readonly description: "Optional capability tags the subject is requesting on the issued tokens. The consumer's authorization layer decides which are granted; the issued TokenBundle's `scope` MAY be a subset.";
|
|
93
|
+
};
|
|
94
|
+
readonly sessionKey: {
|
|
95
|
+
readonly type: "string";
|
|
96
|
+
readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
|
|
97
|
+
readonly maxLength: 512;
|
|
98
|
+
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 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). The consumer MAY refuse a key type it does not support with `auth/authenticate:sessionKeyUnsupported`. It sits inside `payload`, so the subject's own `authentication` proof on this document covers it — a party cannot bind a session key without signing for it.";
|
|
99
|
+
};
|
|
100
|
+
readonly ext: {
|
|
101
|
+
readonly $ref: "#/$defs/Ext";
|
|
102
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly $defs: {
|
|
106
|
+
readonly Response: {
|
|
107
|
+
readonly $anchor: "response";
|
|
108
|
+
readonly title: "Auth Authenticate — response payload";
|
|
109
|
+
readonly description: "Issued by the auth service after verifying the proof on the authenticate document. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.2#response.";
|
|
110
|
+
readonly type: "object";
|
|
111
|
+
readonly additionalProperties: false;
|
|
112
|
+
readonly required: readonly ["session", "tokens"];
|
|
113
|
+
readonly properties: {
|
|
114
|
+
readonly session: {
|
|
115
|
+
readonly $ref: "#/$defs/Session";
|
|
116
|
+
readonly description: "The session the consumer has just created or refreshed for this subject. Carries `sessionKey` when the request bound one.";
|
|
117
|
+
};
|
|
118
|
+
readonly tokens: {
|
|
119
|
+
readonly $ref: "#/$defs/TokenBundle";
|
|
120
|
+
readonly description: "Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.";
|
|
121
|
+
};
|
|
122
|
+
readonly ext: {
|
|
123
|
+
readonly $ref: "#/$defs/Ext";
|
|
124
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly Ext: {
|
|
129
|
+
readonly title: "Ext";
|
|
130
|
+
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.";
|
|
131
|
+
readonly type: "object";
|
|
132
|
+
readonly minProperties: 1;
|
|
133
|
+
readonly additionalProperties: true;
|
|
134
|
+
readonly propertyNames: {
|
|
135
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
readonly TokenBundle: {
|
|
139
|
+
readonly $anchor: "tokenBundle";
|
|
140
|
+
readonly title: "TokenBundle";
|
|
141
|
+
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.";
|
|
142
|
+
readonly type: "object";
|
|
143
|
+
readonly additionalProperties: false;
|
|
144
|
+
readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
|
|
145
|
+
readonly properties: {
|
|
146
|
+
readonly accessToken: {
|
|
147
|
+
readonly type: "string";
|
|
148
|
+
readonly minLength: 1;
|
|
149
|
+
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.";
|
|
150
|
+
};
|
|
151
|
+
readonly refreshToken: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
readonly minLength: 1;
|
|
154
|
+
readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
|
|
155
|
+
};
|
|
156
|
+
readonly tokenType: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
readonly minLength: 1;
|
|
159
|
+
readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
|
|
160
|
+
};
|
|
161
|
+
readonly expiresIn: {
|
|
162
|
+
readonly type: "integer";
|
|
163
|
+
readonly minimum: 1;
|
|
164
|
+
readonly description: "Seconds from issuance until the access token expires.";
|
|
165
|
+
};
|
|
166
|
+
readonly refreshExpiresIn: {
|
|
167
|
+
readonly type: "integer";
|
|
168
|
+
readonly minimum: 1;
|
|
169
|
+
readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
|
|
170
|
+
};
|
|
171
|
+
readonly scope: {
|
|
172
|
+
readonly type: "array";
|
|
173
|
+
readonly items: {
|
|
174
|
+
readonly type: "string";
|
|
175
|
+
readonly minLength: 1;
|
|
176
|
+
};
|
|
177
|
+
readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
|
|
178
|
+
};
|
|
179
|
+
readonly ext: {
|
|
180
|
+
readonly $ref: "#/$defs/Ext";
|
|
181
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly Session: {
|
|
186
|
+
readonly $anchor: "session";
|
|
187
|
+
readonly title: "Session";
|
|
188
|
+
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).";
|
|
189
|
+
readonly type: "object";
|
|
190
|
+
readonly additionalProperties: false;
|
|
191
|
+
readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
|
|
192
|
+
readonly properties: {
|
|
193
|
+
readonly id: {
|
|
194
|
+
readonly type: "string";
|
|
195
|
+
readonly minLength: 1;
|
|
196
|
+
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.";
|
|
197
|
+
};
|
|
198
|
+
readonly subject: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
readonly minLength: 1;
|
|
201
|
+
readonly description: "The authenticated party's VID (typically a DID URL).";
|
|
202
|
+
};
|
|
203
|
+
readonly issuedAt: {
|
|
204
|
+
readonly type: "string";
|
|
205
|
+
readonly format: "date-time";
|
|
206
|
+
readonly description: "ISO-8601 timestamp when the session was created.";
|
|
207
|
+
};
|
|
208
|
+
readonly expiresAt: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly format: "date-time";
|
|
211
|
+
readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after.";
|
|
212
|
+
};
|
|
213
|
+
readonly amr: {
|
|
214
|
+
readonly type: "array";
|
|
215
|
+
readonly minItems: 1;
|
|
216
|
+
readonly items: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
readonly minLength: 1;
|
|
219
|
+
};
|
|
220
|
+
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.";
|
|
221
|
+
};
|
|
222
|
+
readonly acr: {
|
|
223
|
+
readonly type: "string";
|
|
224
|
+
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).";
|
|
225
|
+
};
|
|
226
|
+
readonly sessionKey: {
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
|
|
229
|
+
readonly maxLength: 512;
|
|
230
|
+
readonly description: "The did:key VID bound to this session by auth/authenticate/0.2, 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/0.2 specification that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
|
|
231
|
+
};
|
|
232
|
+
readonly ext: {
|
|
233
|
+
readonly $ref: "#/$defs/Ext";
|
|
234
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
241
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
242
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
243
|
+
readonly $ref: "#/$defs/Response";
|
|
244
|
+
readonly $defs: {
|
|
245
|
+
readonly Response: {
|
|
246
|
+
readonly $anchor: "response";
|
|
247
|
+
readonly title: "Auth Authenticate — response payload";
|
|
248
|
+
readonly description: "Issued by the auth service after verifying the proof on the authenticate document. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.2#response.";
|
|
249
|
+
readonly type: "object";
|
|
250
|
+
readonly additionalProperties: false;
|
|
251
|
+
readonly required: readonly ["session", "tokens"];
|
|
252
|
+
readonly properties: {
|
|
253
|
+
readonly session: {
|
|
254
|
+
readonly $ref: "#/$defs/Session";
|
|
255
|
+
readonly description: "The session the consumer has just created or refreshed for this subject. Carries `sessionKey` when the request bound one.";
|
|
256
|
+
};
|
|
257
|
+
readonly tokens: {
|
|
258
|
+
readonly $ref: "#/$defs/TokenBundle";
|
|
259
|
+
readonly description: "Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.";
|
|
260
|
+
};
|
|
261
|
+
readonly ext: {
|
|
262
|
+
readonly $ref: "#/$defs/Ext";
|
|
263
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
readonly Ext: {
|
|
268
|
+
readonly title: "Ext";
|
|
269
|
+
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.";
|
|
270
|
+
readonly type: "object";
|
|
271
|
+
readonly minProperties: 1;
|
|
272
|
+
readonly additionalProperties: true;
|
|
273
|
+
readonly propertyNames: {
|
|
274
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
readonly TokenBundle: {
|
|
278
|
+
readonly $anchor: "tokenBundle";
|
|
279
|
+
readonly title: "TokenBundle";
|
|
280
|
+
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.";
|
|
281
|
+
readonly type: "object";
|
|
282
|
+
readonly additionalProperties: false;
|
|
283
|
+
readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
|
|
284
|
+
readonly properties: {
|
|
285
|
+
readonly accessToken: {
|
|
286
|
+
readonly type: "string";
|
|
287
|
+
readonly minLength: 1;
|
|
288
|
+
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.";
|
|
289
|
+
};
|
|
290
|
+
readonly refreshToken: {
|
|
291
|
+
readonly type: "string";
|
|
292
|
+
readonly minLength: 1;
|
|
293
|
+
readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
|
|
294
|
+
};
|
|
295
|
+
readonly tokenType: {
|
|
296
|
+
readonly type: "string";
|
|
297
|
+
readonly minLength: 1;
|
|
298
|
+
readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
|
|
299
|
+
};
|
|
300
|
+
readonly expiresIn: {
|
|
301
|
+
readonly type: "integer";
|
|
302
|
+
readonly minimum: 1;
|
|
303
|
+
readonly description: "Seconds from issuance until the access token expires.";
|
|
304
|
+
};
|
|
305
|
+
readonly refreshExpiresIn: {
|
|
306
|
+
readonly type: "integer";
|
|
307
|
+
readonly minimum: 1;
|
|
308
|
+
readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
|
|
309
|
+
};
|
|
310
|
+
readonly scope: {
|
|
311
|
+
readonly type: "array";
|
|
312
|
+
readonly items: {
|
|
313
|
+
readonly type: "string";
|
|
314
|
+
readonly minLength: 1;
|
|
315
|
+
};
|
|
316
|
+
readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
|
|
317
|
+
};
|
|
318
|
+
readonly ext: {
|
|
319
|
+
readonly $ref: "#/$defs/Ext";
|
|
320
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
readonly Session: {
|
|
325
|
+
readonly $anchor: "session";
|
|
326
|
+
readonly title: "Session";
|
|
327
|
+
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).";
|
|
328
|
+
readonly type: "object";
|
|
329
|
+
readonly additionalProperties: false;
|
|
330
|
+
readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
|
|
331
|
+
readonly properties: {
|
|
332
|
+
readonly id: {
|
|
333
|
+
readonly type: "string";
|
|
334
|
+
readonly minLength: 1;
|
|
335
|
+
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.";
|
|
336
|
+
};
|
|
337
|
+
readonly subject: {
|
|
338
|
+
readonly type: "string";
|
|
339
|
+
readonly minLength: 1;
|
|
340
|
+
readonly description: "The authenticated party's VID (typically a DID URL).";
|
|
341
|
+
};
|
|
342
|
+
readonly issuedAt: {
|
|
343
|
+
readonly type: "string";
|
|
344
|
+
readonly format: "date-time";
|
|
345
|
+
readonly description: "ISO-8601 timestamp when the session was created.";
|
|
346
|
+
};
|
|
347
|
+
readonly expiresAt: {
|
|
348
|
+
readonly type: "string";
|
|
349
|
+
readonly format: "date-time";
|
|
350
|
+
readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after.";
|
|
351
|
+
};
|
|
352
|
+
readonly amr: {
|
|
353
|
+
readonly type: "array";
|
|
354
|
+
readonly minItems: 1;
|
|
355
|
+
readonly items: {
|
|
356
|
+
readonly type: "string";
|
|
357
|
+
readonly minLength: 1;
|
|
358
|
+
};
|
|
359
|
+
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.";
|
|
360
|
+
};
|
|
361
|
+
readonly acr: {
|
|
362
|
+
readonly type: "string";
|
|
363
|
+
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).";
|
|
364
|
+
};
|
|
365
|
+
readonly sessionKey: {
|
|
366
|
+
readonly type: "string";
|
|
367
|
+
readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
|
|
368
|
+
readonly maxLength: 512;
|
|
369
|
+
readonly description: "The did:key VID bound to this session by auth/authenticate/0.2, 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/0.2 specification that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
|
|
370
|
+
};
|
|
371
|
+
readonly ext: {
|
|
372
|
+
readonly $ref: "#/$defs/Ext";
|
|
373
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
381
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
382
|
+
* per-specification and cannot be derived from the document alone, and
|
|
383
|
+
* item 2 needs the schema this carries.
|
|
384
|
+
*/
|
|
385
|
+
export declare const SPEC: {
|
|
386
|
+
readonly typeUri: "https://trusttasks.org/spec/auth/authenticate/0.2";
|
|
387
|
+
readonly isBearer: false;
|
|
388
|
+
readonly isProofRequired: true;
|
|
389
|
+
readonly isRecipientRequired: true;
|
|
390
|
+
readonly isIssuedAtRequired: true;
|
|
391
|
+
readonly payloadSchema: {
|
|
392
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
393
|
+
readonly $id: "https://trusttasks.org/spec/auth/authenticate/0.2";
|
|
394
|
+
readonly title: "Auth — Authenticate";
|
|
395
|
+
readonly description: "The subject presents a previously-issued challenge along with the framework `proof` that binds the document to their VID. The proof IS the authentication. 0.2 adds the optional `sessionKey` member, a did:key VID the consumer binds to the created session so later documents in that session can be signed with it instead of the subject's own key.";
|
|
396
|
+
readonly type: "object";
|
|
397
|
+
readonly additionalProperties: false;
|
|
398
|
+
readonly required: readonly ["challenge", "sessionId"];
|
|
399
|
+
readonly properties: {
|
|
400
|
+
readonly challenge: {
|
|
401
|
+
readonly type: "string";
|
|
402
|
+
readonly minLength: 16;
|
|
403
|
+
readonly description: "The exact challenge value returned by a prior auth/challenge call. Consumers MUST reject mismatch, expired, or re-used challenges.";
|
|
404
|
+
};
|
|
405
|
+
readonly sessionId: {
|
|
406
|
+
readonly type: "string";
|
|
407
|
+
readonly minLength: 1;
|
|
408
|
+
readonly description: "The sessionId returned alongside the challenge. Consumers use it to look up the server-side challenge binding.";
|
|
409
|
+
};
|
|
410
|
+
readonly scope: {
|
|
411
|
+
readonly type: "array";
|
|
412
|
+
readonly items: {
|
|
413
|
+
readonly type: "string";
|
|
414
|
+
readonly minLength: 1;
|
|
415
|
+
};
|
|
416
|
+
readonly description: "Optional capability tags the subject is requesting on the issued tokens. The consumer's authorization layer decides which are granted; the issued TokenBundle's `scope` MAY be a subset.";
|
|
417
|
+
};
|
|
418
|
+
readonly sessionKey: {
|
|
419
|
+
readonly type: "string";
|
|
420
|
+
readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
|
|
421
|
+
readonly maxLength: 512;
|
|
422
|
+
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 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). The consumer MAY refuse a key type it does not support with `auth/authenticate:sessionKeyUnsupported`. It sits inside `payload`, so the subject's own `authentication` proof on this document covers it — a party cannot bind a session key without signing for it.";
|
|
423
|
+
};
|
|
424
|
+
readonly ext: {
|
|
425
|
+
readonly $ref: "#/$defs/Ext";
|
|
426
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
readonly $defs: {
|
|
430
|
+
readonly Response: {
|
|
431
|
+
readonly $anchor: "response";
|
|
432
|
+
readonly title: "Auth Authenticate — response payload";
|
|
433
|
+
readonly description: "Issued by the auth service after verifying the proof on the authenticate document. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.2#response.";
|
|
434
|
+
readonly type: "object";
|
|
435
|
+
readonly additionalProperties: false;
|
|
436
|
+
readonly required: readonly ["session", "tokens"];
|
|
437
|
+
readonly properties: {
|
|
438
|
+
readonly session: {
|
|
439
|
+
readonly $ref: "#/$defs/Session";
|
|
440
|
+
readonly description: "The session the consumer has just created or refreshed for this subject. Carries `sessionKey` when the request bound one.";
|
|
441
|
+
};
|
|
442
|
+
readonly tokens: {
|
|
443
|
+
readonly $ref: "#/$defs/TokenBundle";
|
|
444
|
+
readonly description: "Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.";
|
|
445
|
+
};
|
|
446
|
+
readonly ext: {
|
|
447
|
+
readonly $ref: "#/$defs/Ext";
|
|
448
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
readonly Ext: {
|
|
453
|
+
readonly title: "Ext";
|
|
454
|
+
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.";
|
|
455
|
+
readonly type: "object";
|
|
456
|
+
readonly minProperties: 1;
|
|
457
|
+
readonly additionalProperties: true;
|
|
458
|
+
readonly propertyNames: {
|
|
459
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
readonly TokenBundle: {
|
|
463
|
+
readonly $anchor: "tokenBundle";
|
|
464
|
+
readonly title: "TokenBundle";
|
|
465
|
+
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.";
|
|
466
|
+
readonly type: "object";
|
|
467
|
+
readonly additionalProperties: false;
|
|
468
|
+
readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
|
|
469
|
+
readonly properties: {
|
|
470
|
+
readonly accessToken: {
|
|
471
|
+
readonly type: "string";
|
|
472
|
+
readonly minLength: 1;
|
|
473
|
+
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.";
|
|
474
|
+
};
|
|
475
|
+
readonly refreshToken: {
|
|
476
|
+
readonly type: "string";
|
|
477
|
+
readonly minLength: 1;
|
|
478
|
+
readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
|
|
479
|
+
};
|
|
480
|
+
readonly tokenType: {
|
|
481
|
+
readonly type: "string";
|
|
482
|
+
readonly minLength: 1;
|
|
483
|
+
readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
|
|
484
|
+
};
|
|
485
|
+
readonly expiresIn: {
|
|
486
|
+
readonly type: "integer";
|
|
487
|
+
readonly minimum: 1;
|
|
488
|
+
readonly description: "Seconds from issuance until the access token expires.";
|
|
489
|
+
};
|
|
490
|
+
readonly refreshExpiresIn: {
|
|
491
|
+
readonly type: "integer";
|
|
492
|
+
readonly minimum: 1;
|
|
493
|
+
readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
|
|
494
|
+
};
|
|
495
|
+
readonly scope: {
|
|
496
|
+
readonly type: "array";
|
|
497
|
+
readonly items: {
|
|
498
|
+
readonly type: "string";
|
|
499
|
+
readonly minLength: 1;
|
|
500
|
+
};
|
|
501
|
+
readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
|
|
502
|
+
};
|
|
503
|
+
readonly ext: {
|
|
504
|
+
readonly $ref: "#/$defs/Ext";
|
|
505
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
readonly Session: {
|
|
510
|
+
readonly $anchor: "session";
|
|
511
|
+
readonly title: "Session";
|
|
512
|
+
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).";
|
|
513
|
+
readonly type: "object";
|
|
514
|
+
readonly additionalProperties: false;
|
|
515
|
+
readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
|
|
516
|
+
readonly properties: {
|
|
517
|
+
readonly id: {
|
|
518
|
+
readonly type: "string";
|
|
519
|
+
readonly minLength: 1;
|
|
520
|
+
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.";
|
|
521
|
+
};
|
|
522
|
+
readonly subject: {
|
|
523
|
+
readonly type: "string";
|
|
524
|
+
readonly minLength: 1;
|
|
525
|
+
readonly description: "The authenticated party's VID (typically a DID URL).";
|
|
526
|
+
};
|
|
527
|
+
readonly issuedAt: {
|
|
528
|
+
readonly type: "string";
|
|
529
|
+
readonly format: "date-time";
|
|
530
|
+
readonly description: "ISO-8601 timestamp when the session was created.";
|
|
531
|
+
};
|
|
532
|
+
readonly expiresAt: {
|
|
533
|
+
readonly type: "string";
|
|
534
|
+
readonly format: "date-time";
|
|
535
|
+
readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after.";
|
|
536
|
+
};
|
|
537
|
+
readonly amr: {
|
|
538
|
+
readonly type: "array";
|
|
539
|
+
readonly minItems: 1;
|
|
540
|
+
readonly items: {
|
|
541
|
+
readonly type: "string";
|
|
542
|
+
readonly minLength: 1;
|
|
543
|
+
};
|
|
544
|
+
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.";
|
|
545
|
+
};
|
|
546
|
+
readonly acr: {
|
|
547
|
+
readonly type: "string";
|
|
548
|
+
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).";
|
|
549
|
+
};
|
|
550
|
+
readonly sessionKey: {
|
|
551
|
+
readonly type: "string";
|
|
552
|
+
readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
|
|
553
|
+
readonly maxLength: 512;
|
|
554
|
+
readonly description: "The did:key VID bound to this session by auth/authenticate/0.2, 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/0.2 specification that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
|
|
555
|
+
};
|
|
556
|
+
readonly ext: {
|
|
557
|
+
readonly $ref: "#/$defs/Ext";
|
|
558
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
/**
|
|
566
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
567
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
568
|
+
* parties (§7.3 item 5).
|
|
569
|
+
*/
|
|
570
|
+
export declare const RESPONSE_SPEC: {
|
|
571
|
+
readonly typeUri: "https://trusttasks.org/spec/auth/authenticate/0.2#response";
|
|
572
|
+
readonly isBearer: false;
|
|
573
|
+
readonly isProofRequired: true;
|
|
574
|
+
readonly isRecipientRequired: true;
|
|
575
|
+
readonly isIssuedAtRequired: true;
|
|
576
|
+
readonly payloadSchema: {
|
|
577
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
578
|
+
readonly $ref: "#/$defs/Response";
|
|
579
|
+
readonly $defs: {
|
|
580
|
+
readonly Response: {
|
|
581
|
+
readonly $anchor: "response";
|
|
582
|
+
readonly title: "Auth Authenticate — response payload";
|
|
583
|
+
readonly description: "Issued by the auth service after verifying the proof on the authenticate document. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/authenticate/0.2#response.";
|
|
584
|
+
readonly type: "object";
|
|
585
|
+
readonly additionalProperties: false;
|
|
586
|
+
readonly required: readonly ["session", "tokens"];
|
|
587
|
+
readonly properties: {
|
|
588
|
+
readonly session: {
|
|
589
|
+
readonly $ref: "#/$defs/Session";
|
|
590
|
+
readonly description: "The session the consumer has just created or refreshed for this subject. Carries `sessionKey` when the request bound one.";
|
|
591
|
+
};
|
|
592
|
+
readonly tokens: {
|
|
593
|
+
readonly $ref: "#/$defs/TokenBundle";
|
|
594
|
+
readonly description: "Access + optional refresh tokens. Consumers MAY omit a refresh token when their policy doesn't support refresh.";
|
|
595
|
+
};
|
|
596
|
+
readonly ext: {
|
|
597
|
+
readonly $ref: "#/$defs/Ext";
|
|
598
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
readonly Ext: {
|
|
603
|
+
readonly title: "Ext";
|
|
604
|
+
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.";
|
|
605
|
+
readonly type: "object";
|
|
606
|
+
readonly minProperties: 1;
|
|
607
|
+
readonly additionalProperties: true;
|
|
608
|
+
readonly propertyNames: {
|
|
609
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
readonly TokenBundle: {
|
|
613
|
+
readonly $anchor: "tokenBundle";
|
|
614
|
+
readonly title: "TokenBundle";
|
|
615
|
+
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.";
|
|
616
|
+
readonly type: "object";
|
|
617
|
+
readonly additionalProperties: false;
|
|
618
|
+
readonly required: readonly ["accessToken", "tokenType", "expiresIn"];
|
|
619
|
+
readonly properties: {
|
|
620
|
+
readonly accessToken: {
|
|
621
|
+
readonly type: "string";
|
|
622
|
+
readonly minLength: 1;
|
|
623
|
+
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.";
|
|
624
|
+
};
|
|
625
|
+
readonly refreshToken: {
|
|
626
|
+
readonly type: "string";
|
|
627
|
+
readonly minLength: 1;
|
|
628
|
+
readonly description: "Long-lived token redeemable via auth/refresh for a new access token. MAY be absent when the issuer does not support refresh.";
|
|
629
|
+
};
|
|
630
|
+
readonly tokenType: {
|
|
631
|
+
readonly type: "string";
|
|
632
|
+
readonly minLength: 1;
|
|
633
|
+
readonly description: "Token presentation scheme. Almost always \"Bearer\"; reserved for future schemes.";
|
|
634
|
+
};
|
|
635
|
+
readonly expiresIn: {
|
|
636
|
+
readonly type: "integer";
|
|
637
|
+
readonly minimum: 1;
|
|
638
|
+
readonly description: "Seconds from issuance until the access token expires.";
|
|
639
|
+
};
|
|
640
|
+
readonly refreshExpiresIn: {
|
|
641
|
+
readonly type: "integer";
|
|
642
|
+
readonly minimum: 1;
|
|
643
|
+
readonly description: "Seconds from issuance until the refresh token expires, when one was issued.";
|
|
644
|
+
};
|
|
645
|
+
readonly scope: {
|
|
646
|
+
readonly type: "array";
|
|
647
|
+
readonly items: {
|
|
648
|
+
readonly type: "string";
|
|
649
|
+
readonly minLength: 1;
|
|
650
|
+
};
|
|
651
|
+
readonly description: "Capability tags effective on this token. Format is consumer-defined; the framework imposes no syntax.";
|
|
652
|
+
};
|
|
653
|
+
readonly ext: {
|
|
654
|
+
readonly $ref: "#/$defs/Ext";
|
|
655
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
656
|
+
};
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
readonly Session: {
|
|
660
|
+
readonly $anchor: "session";
|
|
661
|
+
readonly title: "Session";
|
|
662
|
+
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).";
|
|
663
|
+
readonly type: "object";
|
|
664
|
+
readonly additionalProperties: false;
|
|
665
|
+
readonly required: readonly ["id", "subject", "issuedAt", "expiresAt"];
|
|
666
|
+
readonly properties: {
|
|
667
|
+
readonly id: {
|
|
668
|
+
readonly type: "string";
|
|
669
|
+
readonly minLength: 1;
|
|
670
|
+
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.";
|
|
671
|
+
};
|
|
672
|
+
readonly subject: {
|
|
673
|
+
readonly type: "string";
|
|
674
|
+
readonly minLength: 1;
|
|
675
|
+
readonly description: "The authenticated party's VID (typically a DID URL).";
|
|
676
|
+
};
|
|
677
|
+
readonly issuedAt: {
|
|
678
|
+
readonly type: "string";
|
|
679
|
+
readonly format: "date-time";
|
|
680
|
+
readonly description: "ISO-8601 timestamp when the session was created.";
|
|
681
|
+
};
|
|
682
|
+
readonly expiresAt: {
|
|
683
|
+
readonly type: "string";
|
|
684
|
+
readonly format: "date-time";
|
|
685
|
+
readonly description: "ISO-8601 timestamp when the session ceases to be valid. Producers SHOULD refresh before this time; consumers MUST reject after.";
|
|
686
|
+
};
|
|
687
|
+
readonly amr: {
|
|
688
|
+
readonly type: "array";
|
|
689
|
+
readonly minItems: 1;
|
|
690
|
+
readonly items: {
|
|
691
|
+
readonly type: "string";
|
|
692
|
+
readonly minLength: 1;
|
|
693
|
+
};
|
|
694
|
+
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.";
|
|
695
|
+
};
|
|
696
|
+
readonly acr: {
|
|
697
|
+
readonly type: "string";
|
|
698
|
+
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).";
|
|
699
|
+
};
|
|
700
|
+
readonly sessionKey: {
|
|
701
|
+
readonly type: "string";
|
|
702
|
+
readonly pattern: "^did:key:z[1-9A-HJ-NP-Za-km-z]+$";
|
|
703
|
+
readonly maxLength: 512;
|
|
704
|
+
readonly description: "The did:key VID bound to this session by auth/authenticate/0.2, 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/0.2 specification that established it. Absent when the session was established without a session key, or by a specification version that does not carry one.";
|
|
705
|
+
};
|
|
706
|
+
readonly ext: {
|
|
707
|
+
readonly $ref: "#/$defs/Ext";
|
|
708
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
};
|
|
715
|
+
//# sourceMappingURL=payload.d.ts.map
|