@cef-ebsi/vcdm2.0-type-extensions-evidence-authorisation-delegation-schema
v1.0.2
Published
Authorisation Delegation type extension (VCDM 2.0)
Downloads
7
Keywords
Readme
@cef-ebsi/vcdm2.0-type-extensions-evidence-authorisation-delegation-schema
Authorisation Delegation
Defines how to include a proof to issue a delegated authorisation
The schema is published to the Trusted Schemas Registry with the IDs:
0xc0a0826d048fa7a45f25d64e7509547af066d21dd068bc622a5930fb76a39b8e
(hexadecimal)zDxwEY3CJCWB9Z19pztkGz2T7tkiCkfSwqsE3u5yCHCX7
(multibase base58btc)
Table of Contents
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Authorisation Delegation",
"description": "Defines how to include a proof to issue a delegated authorisation",
"type": "object",
"properties": {
"evidence": {
"anyOf": [
{
"$ref": "#/$defs/evidence"
},
{
"type": "array",
"description": "One item must match the type extension",
"contains": {
"$ref": "#/$defs/evidence"
}
}
]
}
},
"$defs": {
"evidence": {
"description": "Contains information about the process which resulted in the issuance of the credential",
"type": "object",
"properties": {
"id": {
"description": "CONDITIONAL. A unique id that identifies the evidence.MUST be used if more than one evidence is present",
"type": "string"
},
"type": {
"anyOf": [
{
"description": "Defines the evidence type extension",
"const": "AuthorisationDelegation"
},
{
"description": "Defines the evidence type extension",
"type": "array",
"contains": {
"const": "AuthorisationDelegation"
}
}
]
},
"delegation": {
"description": "Verifiable Credential based on which the delegated Verifiable Authorisation has been issued",
"oneOf": [
{
"description": "Compact serialised JWS",
"type": "string"
},
{
"description": "JSON serialised JWS",
"type": "object"
}
]
}
},
"required": ["type", "delegation"]
}
}
}
Installation
# with npm
npm add @cef-ebsi/vcdm2.0-type-extensions-evidence-authorisation-delegation-schema@1.0.2
# with Yarn
yarn add @cef-ebsi/vcdm2.0-type-extensions-evidence-authorisation-delegation-schema@1.0.2
# with pnpm
pnpm add @cef-ebsi/vcdm2.0-type-extensions-evidence-authorisation-delegation-schema@1.0.2
Usage
The package exports the schema and its metadata as JavaScript objects:
import {
schema,
metadata,
} from "@cef-ebsi/vcdm2.0-type-extensions-evidence-authorisation-delegation-schema";
// you can now use the schema and metadata
In addition, the package exports a TypeScript type corresponding to the schema:
import type { AuthorisationDelegation } from "@cef-ebsi/vcdm2.0-type-extensions-evidence-authorisation-delegation-schema";
License
Copyright (c) 2019 European Commission Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at:
Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence.