@aep-foundation/conformance 0.1.0
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 +16 -0
- package/LICENSE +21 -0
- package/README.md +72 -0
- package/dist/index.cjs +473 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +110 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.js +406 -0
- package/dist/index.js.map +1 -0
- package/fixtures/aep-specs/manifest.json +61 -0
- package/fixtures/aep-specs/schemas/README.md +57 -0
- package/fixtures/aep-specs/schemas/api-key-grant-response.schema.json +32 -0
- package/fixtures/aep-specs/schemas/basic-grant-response.schema.json +36 -0
- package/fixtures/aep-specs/schemas/client-assertion-claims.schema.json +36 -0
- package/fixtures/aep-specs/schemas/enroll-request.schema.json +22 -0
- package/fixtures/aep-specs/schemas/enroll-response.schema.json +24 -0
- package/fixtures/aep-specs/schemas/grant-request.schema.json +20 -0
- package/fixtures/aep-specs/schemas/idempotency-metadata.schema.json +26 -0
- package/fixtures/aep-specs/schemas/inspect-document.schema.json +136 -0
- package/fixtures/aep-specs/schemas/oauth-bearer-grant-response.schema.json +32 -0
- package/fixtures/aep-specs/schemas/platform-agent-identity-list-response.schema.json +78 -0
- package/fixtures/aep-specs/schemas/platform-agent-identity.schema.json +60 -0
- package/fixtures/aep-specs/schemas/platform-discovery.schema.json +107 -0
- package/fixtures/aep-specs/schemas/platform-lifecycle-request.schema.json +14 -0
- package/fixtures/aep-specs/schemas/platform-lifecycle-response.schema.json +60 -0
- package/fixtures/aep-specs/schemas/platform-provision-request.schema.json +18 -0
- package/fixtures/aep-specs/schemas/platform-sign-request.schema.json +26 -0
- package/fixtures/aep-specs/schemas/platform-sign-response.schema.json +34 -0
- package/fixtures/aep-specs/schemas/platform-verification-request.schema.json +22 -0
- package/fixtures/aep-specs/schemas/platform-verification-response.schema.json +37 -0
- package/fixtures/aep-specs/schemas/problem.schema.json +25 -0
- package/fixtures/aep-specs/schemas/revoke-request.schema.json +32 -0
- package/fixtures/aep-specs/schemas/revoke-response.schema.json +7 -0
- package/fixtures/aep-specs/schemas/status-response.schema.json +28 -0
- package/fixtures/aep-specs/test-vectors/README.md +100 -0
- package/fixtures/aep-specs/test-vectors/client-assertion/enroll-claims.json +26 -0
- package/fixtures/aep-specs/test-vectors/credentials/api-key/grant-response.json +20 -0
- package/fixtures/aep-specs/test-vectors/credentials/basic/grant-response.json +21 -0
- package/fixtures/aep-specs/test-vectors/credentials/oauth-bearer/grant-response.json +20 -0
- package/fixtures/aep-specs/test-vectors/enroll/request-minimal.json +24 -0
- package/fixtures/aep-specs/test-vectors/enroll/response-active.json +19 -0
- package/fixtures/aep-specs/test-vectors/errors/not-recognized-problem.json +22 -0
- package/fixtures/aep-specs/test-vectors/grant-revoke/grant-request-oauth-bearer.json +25 -0
- package/fixtures/aep-specs/test-vectors/grant-revoke/revoke-request-all-grant-types.json +23 -0
- package/fixtures/aep-specs/test-vectors/grant-revoke/revoke-request-oauth-bearer.json +25 -0
- package/fixtures/aep-specs/test-vectors/grant-revoke/revoke-response-empty.json +17 -0
- package/fixtures/aep-specs/test-vectors/idempotency/enroll-conflict.json +25 -0
- package/fixtures/aep-specs/test-vectors/inspect/minimal-http.json +45 -0
- package/fixtures/aep-specs/test-vectors/platform/discovery.json +36 -0
- package/fixtures/aep-specs/test-vectors/platform/lifecycle-request.json +13 -0
- package/fixtures/aep-specs/test-vectors/platform/lifecycle-response.json +21 -0
- package/fixtures/aep-specs/test-vectors/platform/list-response.json +35 -0
- package/fixtures/aep-specs/test-vectors/platform/provision-request.json +14 -0
- package/fixtures/aep-specs/test-vectors/platform/provision-response-distinct-services.json +44 -0
- package/fixtures/aep-specs/test-vectors/platform/provision-response.json +21 -0
- package/fixtures/aep-specs/test-vectors/platform/sign-request.json +16 -0
- package/fixtures/aep-specs/test-vectors/platform/sign-response.json +18 -0
- package/fixtures/aep-specs/test-vectors/platform/verification-request.json +15 -0
- package/fixtures/aep-specs/test-vectors/platform/verification-response-recognized.json +19 -0
- package/fixtures/aep-specs/test-vectors/platform/verification-response-unrecognized.json +15 -0
- package/fixtures/aep-specs/test-vectors/status/response-active.json +22 -0
- package/package.json +56 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\n\nimport {\n parseBuiltInGrantResponse,\n parseEnrollRequest,\n parseEnrollResponse,\n parseGrantRequest,\n parseInspectDocument,\n parseProblemDetails,\n parseRevokeRequest,\n parseRevokeResponse,\n parseStatusResponse,\n validateBuiltInGrantResponse,\n validateEnrollRequest,\n validateEnrollResponse,\n validateGrantRequest,\n validateInspectDocument,\n validateProblemDetails,\n validateRevokeRequest,\n validateRevokeResponse,\n validateStatusResponse\n} from \"@aep-foundation/core\";\nimport type {\n AepBuiltInGrantResponse,\n AepGrantType,\n AepProblemDetails,\n EnrollRequest,\n EnrollResponse,\n GrantRequest,\n InspectDocument,\n RevokeRequest,\n RevokeResponse,\n StatusResponse,\n ValidationIssue,\n ValidationResult\n} from \"@aep-foundation/core\";\n\nconst requireFromCwd = createRequire(`${process.cwd()}/`);\nconst packageRoot = path.dirname(\n requireFromCwd.resolve(\"@aep-foundation/conformance/package.json\")\n);\n\nexport const specArtifactsRoot = path.join(packageRoot, \"fixtures/aep-specs\");\nexport const schemaArtifactsRoot = path.join(specArtifactsRoot, \"schemas\");\nexport const testVectorArtifactsRoot = path.join(specArtifactsRoot, \"test-vectors\");\nexport const specArtifactManifestPath = path.join(specArtifactsRoot, \"manifest.json\");\n\nexport interface SpecArtifactManifest {\n source: string;\n generated_by: string;\n artifacts: {\n schemas: string[];\n \"test-vectors\": string[];\n };\n}\n\nexport interface AepTestVector<TInput = unknown, TExpected = unknown> {\n id: string;\n title?: string;\n description?: string;\n drafts?: string[];\n category?: string;\n applies_to?: string[];\n profile?: string;\n input: TInput;\n expected: TExpected;\n [key: string]: unknown;\n}\n\nexport class AepConformanceError extends Error {\n readonly issues: ValidationIssue[];\n\n constructor(message: string, issues: ValidationIssue[]) {\n super(message);\n this.name = \"AepConformanceError\";\n this.issues = issues;\n }\n}\n\nexport async function loadSpecArtifactManifest(): Promise<SpecArtifactManifest> {\n return readJson<SpecArtifactManifest>(specArtifactManifestPath);\n}\n\nexport function schemaArtifactPath(relativePath: string): string {\n return path.join(schemaArtifactsRoot, relativePath);\n}\n\nexport function testVectorArtifactPath(relativePath: string): string {\n return path.join(testVectorArtifactsRoot, relativePath);\n}\n\nexport async function loadSchemaArtifact<T = unknown>(relativePath: string): Promise<T> {\n return readJson<T>(schemaArtifactPath(relativePath));\n}\n\nexport async function loadTestVector<TInput = unknown, TExpected = unknown>(\n relativePath: string\n): Promise<AepTestVector<TInput, TExpected>> {\n return readJson<AepTestVector<TInput, TExpected>>(testVectorArtifactPath(relativePath));\n}\n\nexport function validateInspectConformance(value: unknown): ValidationResult<InspectDocument> {\n return validateInspectDocument(value);\n}\n\nexport function validateEnrollRequestConformance(value: unknown): ValidationResult<EnrollRequest> {\n return validateEnrollRequest(value);\n}\n\nexport function validateEnrollResponseConformance(\n value: unknown\n): ValidationResult<EnrollResponse> {\n return validateEnrollResponse(value);\n}\n\nexport function validateStatusResponseConformance(\n value: unknown\n): ValidationResult<StatusResponse> {\n return validateStatusResponse(value);\n}\n\nexport function validateGrantRequestConformance(value: unknown): ValidationResult<GrantRequest> {\n return validateGrantRequest(value);\n}\n\nexport function validateRevokeRequestConformance(value: unknown): ValidationResult<RevokeRequest> {\n return validateRevokeRequest(value);\n}\n\nexport function validateRevokeResponseConformance(\n value: unknown\n): ValidationResult<RevokeResponse> {\n return validateRevokeResponse(value);\n}\n\nexport function validateBuiltInGrantResponseConformance(\n grantType: AepGrantType,\n value: unknown\n): ValidationResult<AepBuiltInGrantResponse> {\n return validateBuiltInGrantResponse(grantType, value);\n}\n\nexport function validateProblemDetailsConformance(\n value: unknown\n): ValidationResult<AepProblemDetails> {\n return validateProblemDetails(value);\n}\n\nexport function assertInspectConformance(value: unknown): InspectDocument {\n const result = validateInspectDocument(value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Inspect document failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport function assertEnrollRequestConformance(value: unknown): EnrollRequest {\n const result = validateEnrollRequest(value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Enroll request failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport function assertEnrollResponseConformance(value: unknown): EnrollResponse {\n const result = validateEnrollResponse(value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Enroll response failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport function assertStatusResponseConformance(value: unknown): StatusResponse {\n const result = validateStatusResponse(value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Status response failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport function assertGrantRequestConformance(value: unknown): GrantRequest {\n const result = validateGrantRequest(value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Grant request failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport function assertRevokeRequestConformance(value: unknown): RevokeRequest {\n const result = validateRevokeRequest(value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Revoke request failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport function assertRevokeResponseConformance(value: unknown): RevokeResponse {\n const result = validateRevokeResponse(value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Revoke response failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport function assertBuiltInGrantResponseConformance(\n grantType: AepGrantType,\n value: unknown\n): AepBuiltInGrantResponse {\n const result = validateBuiltInGrantResponse(grantType, value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Grant response failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport function assertProblemDetailsConformance(value: unknown): AepProblemDetails {\n const result = validateProblemDetails(value);\n\n if (!result.ok) {\n throw new AepConformanceError(\n \"Problem Details response failed AEP conformance validation.\",\n result.issues\n );\n }\n\n return result.value;\n}\n\nexport async function loadMinimalInspectTestVector(): Promise<\n AepTestVector<Record<string, never>, InspectDocument>\n> {\n const vector = await loadTestVector<Record<string, never>, unknown>(\"inspect/minimal-http.json\");\n\n return {\n ...vector,\n expected: parseInspectDocument(vector.expected)\n };\n}\n\nexport async function loadMinimalEnrollRequestTestVector(): Promise<\n AepTestVector<EnrollRequest, Record<string, unknown>>\n> {\n const vector = await loadTestVector<unknown, Record<string, unknown>>(\n \"enroll/request-minimal.json\"\n );\n\n return {\n ...vector,\n input: parseEnrollRequest(vector.input)\n };\n}\n\nexport async function loadActiveEnrollResponseTestVector(): Promise<\n AepTestVector<\n Record<string, unknown>,\n { body: EnrollResponse; content_type: string; status: number }\n >\n> {\n const vector = await loadTestVector<\n Record<string, unknown>,\n { body: unknown; content_type: string; status: number }\n >(\"enroll/response-active.json\");\n\n return {\n ...vector,\n expected: {\n ...vector.expected,\n body: parseEnrollResponse(vector.expected.body)\n }\n };\n}\n\nexport async function loadActiveStatusResponseTestVector(): Promise<\n AepTestVector<\n Record<string, unknown>,\n { body: StatusResponse; content_type: string; status: number }\n >\n> {\n const vector = await loadTestVector<\n Record<string, unknown>,\n { body: unknown; content_type: string; status: number }\n >(\"status/response-active.json\");\n\n return {\n ...vector,\n expected: {\n ...vector.expected,\n body: parseStatusResponse(vector.expected.body)\n }\n };\n}\n\nexport async function loadOAuthBearerGrantRequestTestVector(): Promise<\n AepTestVector<GrantRequest, AepCommandRequestExpectation<GrantRequest>>\n> {\n const vector = await loadTestVector<unknown, AepCommandRequestExpectation<unknown>>(\n \"grant-revoke/grant-request-oauth-bearer.json\"\n );\n\n return {\n ...vector,\n input: parseGrantRequest(vector.input),\n expected: {\n ...vector.expected,\n body: parseGrantRequest(vector.expected.body)\n }\n };\n}\n\nexport async function loadOAuthBearerRevokeRequestTestVector(): Promise<\n AepTestVector<RevokeRequest, AepCommandRequestExpectation<RevokeRequest>>\n> {\n const vector = await loadTestVector<unknown, AepCommandRequestExpectation<unknown>>(\n \"grant-revoke/revoke-request-oauth-bearer.json\"\n );\n\n return {\n ...vector,\n input: parseRevokeRequest(vector.input),\n expected: {\n ...vector.expected,\n body: parseRevokeRequest(vector.expected.body)\n }\n };\n}\n\nexport async function loadAllGrantTypesRevokeRequestTestVector(): Promise<\n AepTestVector<\n RevokeRequest,\n AepCommandRequestExpectation<RevokeRequest> & {\n must_not_contain?: string[];\n }\n >\n> {\n const vector = await loadTestVector<\n unknown,\n AepCommandRequestExpectation<unknown> & {\n must_not_contain?: string[];\n }\n >(\"grant-revoke/revoke-request-all-grant-types.json\");\n\n return {\n ...vector,\n input: parseRevokeRequest(vector.input),\n expected: {\n ...vector.expected,\n body: parseRevokeRequest(vector.expected.body)\n }\n };\n}\n\nexport async function loadEmptyRevokeResponseTestVector(): Promise<\n AepTestVector<Record<string, unknown>, AepCommandResponseExpectation<RevokeResponse>>\n> {\n const vector = await loadTestVector<\n Record<string, unknown>,\n AepCommandResponseExpectation<unknown>\n >(\"grant-revoke/revoke-response-empty.json\");\n\n return {\n ...vector,\n expected: {\n ...vector.expected,\n body: parseRevokeResponse(vector.expected.body)\n }\n };\n}\n\nexport async function loadOAuthBearerGrantResponseTestVector(): Promise<\n AepTestVector<GrantRequest, AepBuiltInGrantResponse>\n> {\n return loadBuiltInGrantResponseTestVector(\n \"oauth-bearer\",\n \"credentials/oauth-bearer/grant-response.json\"\n );\n}\n\nexport async function loadApiKeyGrantResponseTestVector(): Promise<\n AepTestVector<GrantRequest, AepBuiltInGrantResponse>\n> {\n return loadBuiltInGrantResponseTestVector(\"api-key\", \"credentials/api-key/grant-response.json\");\n}\n\nexport async function loadBasicGrantResponseTestVector(): Promise<\n AepTestVector<GrantRequest, AepBuiltInGrantResponse>\n> {\n return loadBuiltInGrantResponseTestVector(\"basic\", \"credentials/basic/grant-response.json\");\n}\n\nexport async function loadNotRecognizedProblemTestVector(): Promise<\n AepTestVector<{ failure_class: string }, AepCommandResponseExpectation<AepProblemDetails>>\n> {\n return loadProblemDetailsResponseTestVector<{ failure_class: string }>(\n \"errors/not-recognized-problem.json\"\n );\n}\n\nexport async function loadEnrollIdempotencyConflictTestVector(): Promise<\n AepTestVector<AepEnrollIdempotencyConflictInput, AepCommandResponseExpectation<AepProblemDetails>>\n> {\n return loadProblemDetailsResponseTestVector<AepEnrollIdempotencyConflictInput>(\n \"idempotency/enroll-conflict.json\"\n );\n}\n\nexport function loadPlatformDiscoveryTestVector(): Promise<\n AepTestVector<Record<string, never>, Record<string, unknown>>\n> {\n return loadTestVector<Record<string, never>, Record<string, unknown>>(\"platform/discovery.json\");\n}\n\nexport function loadPlatformProvisionRequestTestVector(): Promise<\n AepTestVector<Record<string, unknown>, Record<string, never>>\n> {\n return loadTestVector<Record<string, unknown>, Record<string, never>>(\n \"platform/provision-request.json\"\n );\n}\n\nexport function loadPlatformProvisionResponseTestVector(): Promise<\n AepTestVector<Record<string, never>, Record<string, unknown>>\n> {\n return loadTestVector<Record<string, never>, Record<string, unknown>>(\n \"platform/provision-response.json\"\n );\n}\n\nexport function loadPlatformListResponseTestVector(): Promise<\n AepTestVector<Record<string, unknown>, Record<string, unknown>>\n> {\n return loadTestVector<Record<string, unknown>, Record<string, unknown>>(\n \"platform/list-response.json\"\n );\n}\n\nexport function loadPlatformLifecycleRequestTestVector(): Promise<\n AepTestVector<Record<string, unknown>, Record<string, never>>\n> {\n return loadTestVector<Record<string, unknown>, Record<string, never>>(\n \"platform/lifecycle-request.json\"\n );\n}\n\nexport function loadPlatformLifecycleResponseTestVector(): Promise<\n AepTestVector<Record<string, never>, Record<string, unknown>>\n> {\n return loadTestVector<Record<string, never>, Record<string, unknown>>(\n \"platform/lifecycle-response.json\"\n );\n}\n\nexport function loadPlatformSignRequestTestVector(): Promise<\n AepTestVector<Record<string, unknown>, Record<string, never>>\n> {\n return loadTestVector<Record<string, unknown>, Record<string, never>>(\n \"platform/sign-request.json\"\n );\n}\n\nexport function loadPlatformSignResponseTestVector(): Promise<\n AepTestVector<Record<string, never>, Record<string, unknown>>\n> {\n return loadTestVector<Record<string, never>, Record<string, unknown>>(\n \"platform/sign-response.json\"\n );\n}\n\nexport function loadPlatformVerificationRequestTestVector(): Promise<\n AepTestVector<Record<string, unknown>, Record<string, never>>\n> {\n return loadTestVector<Record<string, unknown>, Record<string, never>>(\n \"platform/verification-request.json\"\n );\n}\n\nexport function loadPlatformVerificationResponseRecognizedTestVector(): Promise<\n AepTestVector<Record<string, never>, Record<string, unknown>>\n> {\n return loadTestVector<Record<string, never>, Record<string, unknown>>(\n \"platform/verification-response-recognized.json\"\n );\n}\n\nexport function loadPlatformVerificationResponseUnrecognizedTestVector(): Promise<\n AepTestVector<Record<string, never>, Record<string, unknown>>\n> {\n return loadTestVector<Record<string, never>, Record<string, unknown>>(\n \"platform/verification-response-unrecognized.json\"\n );\n}\n\nasync function readJson<T>(file: string): Promise<T> {\n return JSON.parse(await readFile(file, \"utf8\")) as T;\n}\n\ninterface AepCommandRequestExpectation<TBody> {\n authorization_scheme: string;\n body: TBody;\n client_assertion_op: string;\n content_type: string;\n method: string;\n path: string;\n}\n\nexport interface AepCommandResponseExpectation<TBody> {\n body: TBody;\n content_type: string;\n status: number;\n}\n\nexport interface AepEnrollIdempotencyConflictInput {\n agent_did: string;\n first_body_hash: string;\n idempotency_key: string;\n second_body_hash: string;\n}\n\nasync function loadBuiltInGrantResponseTestVector(\n grantType: AepGrantType,\n relativePath: string\n): Promise<AepTestVector<GrantRequest, AepBuiltInGrantResponse>> {\n const vector = await loadTestVector<unknown, unknown>(relativePath);\n\n return {\n ...vector,\n input: parseGrantRequest(vector.input),\n expected: parseBuiltInGrantResponse(grantType, vector.expected)\n };\n}\n\nasync function loadProblemDetailsResponseTestVector<TInput>(\n relativePath: string\n): Promise<AepTestVector<TInput, AepCommandResponseExpectation<AepProblemDetails>>> {\n const vector = await loadTestVector<TInput, AepCommandResponseExpectation<unknown>>(relativePath);\n\n return {\n ...vector,\n expected: {\n ...vector.expected,\n body: parseProblemDetails(vector.expected.body)\n }\n };\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,qBAAqB;AAC9B,OAAO,UAAU;AAEjB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgBP,IAAM,iBAAiB,cAAc,GAAG,QAAQ,IAAI,CAAC,GAAG;AACxD,IAAM,cAAc,KAAK;AAAA,EACvB,eAAe,QAAQ,0CAA0C;AACnE;AAEO,IAAM,oBAAoB,KAAK,KAAK,aAAa,oBAAoB;AACrE,IAAM,sBAAsB,KAAK,KAAK,mBAAmB,SAAS;AAClE,IAAM,0BAA0B,KAAK,KAAK,mBAAmB,cAAc;AAC3E,IAAM,2BAA2B,KAAK,KAAK,mBAAmB,eAAe;AAwB7E,IAAM,sBAAN,cAAkC,MAAM;AAAA,EACpC;AAAA,EAET,YAAY,SAAiB,QAA2B;AACtD,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,SAAS;AAAA,EAChB;AACF;AAEA,eAAsB,2BAA0D;AAC9E,SAAO,SAA+B,wBAAwB;AAChE;AAEO,SAAS,mBAAmB,cAA8B;AAC/D,SAAO,KAAK,KAAK,qBAAqB,YAAY;AACpD;AAEO,SAAS,uBAAuB,cAA8B;AACnE,SAAO,KAAK,KAAK,yBAAyB,YAAY;AACxD;AAEA,eAAsB,mBAAgC,cAAkC;AACtF,SAAO,SAAY,mBAAmB,YAAY,CAAC;AACrD;AAEA,eAAsB,eACpB,cAC2C;AAC3C,SAAO,SAA2C,uBAAuB,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,SAAO;AAAA,IACL,GAAG;AAAA,IACH,OAAO,kBAAkB,OAAO,KAAK;AAAA,IACrC,UAAU,0BAA0B,WAAW,OAAO,QAAQ;AAAA,EAChE;AACF;AAEA,eAAe,qCACb,cACkF;AAClF,QAAM,SAAS,MAAM,eAA+D,YAAY;AAEhG,SAAO;AAAA,IACL,GAAG;AAAA,IACH,UAAU;AAAA,MACR,GAAG,OAAO;AAAA,MACV,MAAM,oBAAoB,OAAO,SAAS,IAAI;AAAA,IAChD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "../aep-specs/ietf",
|
|
3
|
+
"generated_by": "scripts/sync-aep-spec-artifacts.mjs",
|
|
4
|
+
"artifacts": {
|
|
5
|
+
"schemas": [
|
|
6
|
+
"README.md",
|
|
7
|
+
"api-key-grant-response.schema.json",
|
|
8
|
+
"basic-grant-response.schema.json",
|
|
9
|
+
"client-assertion-claims.schema.json",
|
|
10
|
+
"enroll-request.schema.json",
|
|
11
|
+
"enroll-response.schema.json",
|
|
12
|
+
"grant-request.schema.json",
|
|
13
|
+
"idempotency-metadata.schema.json",
|
|
14
|
+
"inspect-document.schema.json",
|
|
15
|
+
"oauth-bearer-grant-response.schema.json",
|
|
16
|
+
"platform-agent-identity-list-response.schema.json",
|
|
17
|
+
"platform-agent-identity.schema.json",
|
|
18
|
+
"platform-discovery.schema.json",
|
|
19
|
+
"platform-lifecycle-request.schema.json",
|
|
20
|
+
"platform-lifecycle-response.schema.json",
|
|
21
|
+
"platform-provision-request.schema.json",
|
|
22
|
+
"platform-sign-request.schema.json",
|
|
23
|
+
"platform-sign-response.schema.json",
|
|
24
|
+
"platform-verification-request.schema.json",
|
|
25
|
+
"platform-verification-response.schema.json",
|
|
26
|
+
"problem.schema.json",
|
|
27
|
+
"revoke-request.schema.json",
|
|
28
|
+
"revoke-response.schema.json",
|
|
29
|
+
"status-response.schema.json"
|
|
30
|
+
],
|
|
31
|
+
"test-vectors": [
|
|
32
|
+
"README.md",
|
|
33
|
+
"client-assertion/enroll-claims.json",
|
|
34
|
+
"credentials/api-key/grant-response.json",
|
|
35
|
+
"credentials/basic/grant-response.json",
|
|
36
|
+
"credentials/oauth-bearer/grant-response.json",
|
|
37
|
+
"enroll/request-minimal.json",
|
|
38
|
+
"enroll/response-active.json",
|
|
39
|
+
"errors/not-recognized-problem.json",
|
|
40
|
+
"grant-revoke/grant-request-oauth-bearer.json",
|
|
41
|
+
"grant-revoke/revoke-request-all-grant-types.json",
|
|
42
|
+
"grant-revoke/revoke-request-oauth-bearer.json",
|
|
43
|
+
"grant-revoke/revoke-response-empty.json",
|
|
44
|
+
"idempotency/enroll-conflict.json",
|
|
45
|
+
"inspect/minimal-http.json",
|
|
46
|
+
"platform/discovery.json",
|
|
47
|
+
"platform/lifecycle-request.json",
|
|
48
|
+
"platform/lifecycle-response.json",
|
|
49
|
+
"platform/list-response.json",
|
|
50
|
+
"platform/provision-request.json",
|
|
51
|
+
"platform/provision-response-distinct-services.json",
|
|
52
|
+
"platform/provision-response.json",
|
|
53
|
+
"platform/sign-request.json",
|
|
54
|
+
"platform/sign-response.json",
|
|
55
|
+
"platform/verification-request.json",
|
|
56
|
+
"platform/verification-response-recognized.json",
|
|
57
|
+
"platform/verification-response-unrecognized.json",
|
|
58
|
+
"status/response-active.json"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# AEP JSON Schemas
|
|
2
|
+
|
|
3
|
+
This directory contains JSON Schemas for stable AEP wire objects used by the
|
|
4
|
+
published Internet-Draft set.
|
|
5
|
+
|
|
6
|
+
The schemas are validation aids. They do not replace the Internet-Draft prose.
|
|
7
|
+
If a schema and a draft disagree, the draft is authoritative and the schema
|
|
8
|
+
should be corrected.
|
|
9
|
+
|
|
10
|
+
## Scope
|
|
11
|
+
|
|
12
|
+
The initial schema set covers the stable core HTTP objects, the three published
|
|
13
|
+
session-credential Grant responses, and the hosted identity Platform specification:
|
|
14
|
+
|
|
15
|
+
| Schema | Validates |
|
|
16
|
+
| --------------------------------------------------- | ------------------------------------------ |
|
|
17
|
+
| `client-assertion-claims.schema.json` | Client assertion JWT claim set |
|
|
18
|
+
| `inspect-document.schema.json` | Inspect document response body |
|
|
19
|
+
| `enroll-request.schema.json` | Enroll request body |
|
|
20
|
+
| `enroll-response.schema.json` | Enroll response body |
|
|
21
|
+
| `status-response.schema.json` | Status response body |
|
|
22
|
+
| `grant-request.schema.json` | Grant request body |
|
|
23
|
+
| `revoke-request.schema.json` | Revoke request body |
|
|
24
|
+
| `revoke-response.schema.json` | Revoke response body |
|
|
25
|
+
| `problem.schema.json` | AEP Problem Details response body |
|
|
26
|
+
| `idempotency-metadata.schema.json` | Idempotency key and request hash metadata |
|
|
27
|
+
| `oauth-bearer-grant-response.schema.json` | OAuth Bearer Grant response body |
|
|
28
|
+
| `api-key-grant-response.schema.json` | API-key Grant response body |
|
|
29
|
+
| `basic-grant-response.schema.json` | HTTP Basic Grant response body |
|
|
30
|
+
| `platform-discovery.schema.json` | Platform discovery document |
|
|
31
|
+
| `platform-provision-request.schema.json` | Platform provisioning request body |
|
|
32
|
+
| `platform-agent-identity.schema.json` | Platform Agent identity response body |
|
|
33
|
+
| `platform-agent-identity-list-response.schema.json` | Platform Agent identity list response body |
|
|
34
|
+
| `platform-sign-request.schema.json` | Platform delegated signing request body |
|
|
35
|
+
| `platform-sign-response.schema.json` | Platform delegated signing response body |
|
|
36
|
+
| `platform-lifecycle-request.schema.json` | Platform lifecycle update request body |
|
|
37
|
+
| `platform-lifecycle-response.schema.json` | Platform lifecycle update response body |
|
|
38
|
+
| `platform-verification-request.schema.json` | Platform hosted verification request body |
|
|
39
|
+
| `platform-verification-response.schema.json` | Platform hosted verification response body |
|
|
40
|
+
|
|
41
|
+
## Validation
|
|
42
|
+
|
|
43
|
+
Run schema validation with:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
make -C ietf check-schemas
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The default repository check runs schema validation as part of:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
make -C ietf check
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The schema checker validates the JSON test vectors that map directly to stable
|
|
56
|
+
wire objects. Vectors that describe metadata, JOSE processing, or multi-step
|
|
57
|
+
behavior remain covered by the vector structure checker.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/api-key-grant-response.schema.json",
|
|
4
|
+
"title": "AEP API-key Grant Response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["api_key", "credential_id", "expires_at", "header", "scopes"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"api_key": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"credential_id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"expires_at": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "date-time"
|
|
20
|
+
},
|
|
21
|
+
"header": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1
|
|
24
|
+
},
|
|
25
|
+
"scopes": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/basic-grant-response.schema.json",
|
|
4
|
+
"title": "AEP Basic Grant Response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["credential_id", "expires_at", "password", "scopes", "username"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"credential_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"expires_at": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "date-time"
|
|
16
|
+
},
|
|
17
|
+
"password": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
},
|
|
21
|
+
"realm": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1
|
|
24
|
+
},
|
|
25
|
+
"scopes": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"username": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/client-assertion-claims.schema.json",
|
|
4
|
+
"title": "AEP Client Assertion Claims",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["iss", "sub", "aud", "op", "iat", "exp", "jti"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"iss": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"sub": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"aud": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
},
|
|
21
|
+
"op": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": ["enroll", "grant", "revoke", "status"]
|
|
24
|
+
},
|
|
25
|
+
"iat": {
|
|
26
|
+
"type": "integer"
|
|
27
|
+
},
|
|
28
|
+
"exp": {
|
|
29
|
+
"type": "integer"
|
|
30
|
+
},
|
|
31
|
+
"jti": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/enroll-request.schema.json",
|
|
4
|
+
"title": "AEP Enroll Request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["agent_did", "idempotency_key"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"agent_did": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"claims": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": true
|
|
16
|
+
},
|
|
17
|
+
"idempotency_key": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/enroll-response.schema.json",
|
|
4
|
+
"title": "AEP Enroll Response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["status"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"status": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["active", "pending", "rejected"]
|
|
12
|
+
},
|
|
13
|
+
"owner_action_required": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": ["true", "false"]
|
|
16
|
+
},
|
|
17
|
+
"requirements_pending": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/grant-request.schema.json",
|
|
4
|
+
"title": "AEP Grant Request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["grant_type"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"grant_type": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"requested_scopes": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/idempotency-metadata.schema.json",
|
|
4
|
+
"title": "AEP Idempotency Metadata",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["idempotency_key"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"agent_did": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"idempotency_key": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"first_body_hash": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
20
|
+
},
|
|
21
|
+
"second_body_hash": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/inspect-document.schema.json",
|
|
4
|
+
"title": "AEP Inspect Document",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["aep_version", "bindings", "commands", "core", "http", "identity", "service"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"aep_version": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^[0-9]+\\.[0-9]+$"
|
|
12
|
+
},
|
|
13
|
+
"bindings": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["supported"],
|
|
16
|
+
"additionalProperties": true,
|
|
17
|
+
"properties": {
|
|
18
|
+
"supported": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"minItems": 1,
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": ["http"]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"claims": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": true,
|
|
31
|
+
"properties": {
|
|
32
|
+
"required": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"preferred": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"optional": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"commands": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"required": ["supported"],
|
|
55
|
+
"additionalProperties": true,
|
|
56
|
+
"properties": {
|
|
57
|
+
"supported": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"minItems": 1,
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": ["inspect", "enroll", "grant", "revoke", "status"]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"grant_types": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"core": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": true,
|
|
76
|
+
"properties": {
|
|
77
|
+
"signing_algorithms": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"minItems": 1,
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"extensions": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": true,
|
|
89
|
+
"properties": {
|
|
90
|
+
"supported": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"http": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"required": ["endpoint_base"],
|
|
101
|
+
"additionalProperties": true,
|
|
102
|
+
"properties": {
|
|
103
|
+
"endpoint_base": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^/"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"identity": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"required": ["methods"],
|
|
112
|
+
"additionalProperties": true,
|
|
113
|
+
"properties": {
|
|
114
|
+
"methods": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"minItems": 1,
|
|
117
|
+
"items": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"pattern": "^[a-z0-9]+(?::[a-z0-9]+)*(?:-[a-z0-9]+)*$"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"service": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"required": ["did"],
|
|
127
|
+
"additionalProperties": true,
|
|
128
|
+
"properties": {
|
|
129
|
+
"did": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"pattern": "^did:"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/oauth-bearer-grant-response.schema.json",
|
|
4
|
+
"title": "AEP OAuth Bearer Grant Response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["access_token", "credential_id", "expires_at", "scopes", "token_type"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"access_token": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"credential_id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"expires_at": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "date-time"
|
|
20
|
+
},
|
|
21
|
+
"scopes": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"token_type": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["Bearer"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.aep.foundation/schemas/platform-agent-identity-list-response.schema.json",
|
|
4
|
+
"title": "AEP Platform Agent Identity List Response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["count", "data", "total"],
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"count": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^(?:0|[1-9][0-9]*)$"
|
|
12
|
+
},
|
|
13
|
+
"data": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": [
|
|
18
|
+
"agent_did",
|
|
19
|
+
"agent_identity_id",
|
|
20
|
+
"created_at",
|
|
21
|
+
"did_document_url",
|
|
22
|
+
"key_id",
|
|
23
|
+
"service_did",
|
|
24
|
+
"signing_algorithms",
|
|
25
|
+
"status",
|
|
26
|
+
"updated_at"
|
|
27
|
+
],
|
|
28
|
+
"additionalProperties": true,
|
|
29
|
+
"properties": {
|
|
30
|
+
"agent_did": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^did:"
|
|
33
|
+
},
|
|
34
|
+
"agent_identity_id": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"created_at": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "date-time"
|
|
41
|
+
},
|
|
42
|
+
"did_document_url": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^https://"
|
|
45
|
+
},
|
|
46
|
+
"key_id": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1
|
|
49
|
+
},
|
|
50
|
+
"service_did": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^did:"
|
|
53
|
+
},
|
|
54
|
+
"signing_algorithms": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"minItems": 1,
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"enum": ["EdDSA", "ES256"]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"status": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"enum": ["active", "revoked", "suspended", "terminated"]
|
|
65
|
+
},
|
|
66
|
+
"updated_at": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"format": "date-time"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"total": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^(?:0|[1-9][0-9]*)$"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|