diff --git a/.gitignore b/.gitignore index c6d953830..526bd8fef 100644 --- a/.gitignore +++ b/.gitignore @@ -59,4 +59,12 @@ test/*.js *.swp *~ -#/packages/*/plugin.schema.json +/packages/mnemonic-seed-manager/plugin.schema.json +/packages/vc-api-issuer/plugin.schema.json +/packages/vc-api-verifier/plugin.schema.json +/packages/contact-manager/plugin.schema.json +/packages/bls-key-manager/plugin.schema.json +/packages/ms-request-api/plugin.schema.json +/packages/siopv2-oid4vp-rp-rest-client/plugin.schema.json +/packages/vc-handler-ld-local/plugin.schema.json + diff --git a/packages/contact-manager/plugin.schema.json b/packages/contact-manager/plugin.schema.json new file mode 100644 index 000000000..e6702d877 --- /dev/null +++ b/packages/contact-manager/plugin.schema.json @@ -0,0 +1,661 @@ +{ + "IContactManager": { + "components": { + "schemas": { + "IGetContactArgs": { + "type": "object", + "properties": { + "contactId": { + "type": "string" + } + }, + "required": ["contactId"] + }, + "IGetContactsArgs": { + "type": "object", + "properties": { + "filter": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "IAddContactArgs": { + "type": "object", + "properties": { + "contact": { + "$ref": "#/components/schemas/IBasicContact" + } + }, + "required": ["party"] + }, + "IRemoveContactArgs": { + "type": "object", + "properties": { + "contactId": { + "type": "string" + } + }, + "required": ["contactId"] + }, + "IUpdateContactArgs": { + "type": "object", + "properties": { + "contact": { + "$ref": "#/components/schemas/IBasicContact" + } + }, + "required": ["party"] + }, + "IGetIdentityArgs": { + "type": "object", + "properties": { + "identityId": { + "type": "string" + } + }, + "required": ["identityId"] + }, + "IGetIdentitiesArgs": { + "type": "object", + "properties": { + "contactId": { + "type": "string" + } + }, + "required": ["contactId"] + }, + "IAddIdentityArgs": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/components/schemas/IIdentity" + } + }, + "required": ["identity"] + }, + "IRemoveIdentityArgs": { + "type": "object", + "properties": { + "identityId": { + "type": "string" + } + }, + "required": ["identityId"] + }, + "IUpdateIdentityArgs": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/components/schemas/IIdentity" + } + }, + "required": ["identity"] + }, + "IBasicContact": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IBasicIdentity" + } + } + }, + "required": ["name", "alias"] + }, + "IContact": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IIdentity" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "lastUpdatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "name", "alias", "createdAt", "lastUpdatedAt"] + }, + "IMetadataItem": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["id", "label", "value"] + }, + "BasicMetadataItem": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["label", "value"] + }, + "IBasicIdentity": { + "type": "object", + "properties": { + "alias": { + "type": "string" + }, + "identifier": { + "$ref": "#/components/schemas/BasicCorrelationIdentifier" + }, + "connection": { + "$ref": "#/components/schemas/IBasicConnection" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IMetadataItem" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "lastUpdatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "alias", "identifier", "createdAt", "lastUpdatedAt"] + }, + "IIdentity": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "identifier": { + "$ref": "#/components/schemas/ICorrelationIdentifier" + }, + "connection": { + "$ref": "#/components/schemas/IConnection" + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IMetadataItem" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "lastUpdatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "alias", "identifier", "createdAt", "lastUpdatedAt"] + }, + "CorrelationIdentifierEnum": { + "type": "string", + "enum": ["did", "url"] + }, + "BasicCorrelationIdentifier": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/CorrelationIdentifierEnum" + }, + "correlationId": { + "type": "string" + } + }, + "required": ["type", "correlationId"] + }, + "ICorrelationIdentifier": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/CorrelationIdentifierEnum" + }, + "correlationId": { + "type": "string" + } + }, + "required": ["id", "type", "correlationId"] + }, + "ConnectionTypeEnum": { + "type": "string", + "enum": ["openid", "didauth", "siopv2+oidc4vp"] + }, + "IBasicConnection": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ConnectionTypeEnum" + }, + "config": { + "$ref": "#/components/schemas/BasicConnectionConfig" + } + }, + "required": ["type", "config"] + }, + "IConnection": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ConnectionTypeEnum" + }, + "config": { + "$ref": "#/components/schemas/ConnectionConfig" + } + }, + "required": ["id", "type", "config"] + }, + "BasicConnectionConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/BasicDidAuthConfig" + }, + { + "$ref": "#/components/schemas/BasicOpenIdConfig" + } + ] + }, + "ConnectionConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/IOpenIdConfig" + }, + { + "$ref": "#/components/schemas/IDidAuthConfig" + } + ] + }, + "BasicDidAuthConfig": { + "type": "object", + "properties": { + "identifier": { + "$ref": "#/components/schemas/IIdentifier" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "sessionId": { + "type": "string" + } + }, + "required": ["identifier", "stateId", "redirectUrl", "sessionId"] + }, + "BasicOpenIdConfig": { + "type": "object", + "properties": { + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "issuer": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "dangerouslyAllowInsecureHttpRequests": { + "type": "boolean" + }, + "clientAuthMethod": { + "type": "string", + "enum": ["basic", "post"] + } + }, + "required": ["clientId", "clientSecret", "scopes", "issuer", "redirectUrl", "dangerouslyAllowInsecureHttpRequests"] + }, + "IOpenIdConfig": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "issuer": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "dangerouslyAllowInsecureHttpRequests": { + "type": "boolean" + }, + "clientAuthMethod": { + "type": "string", + "enum": ["basic", "post"] + } + }, + "required": ["id", "clientId", "clientSecret", "scopes", "issuer", "redirectUrl", "dangerouslyAllowInsecureHttpRequests"] + }, + "IDidAuthConfig": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "identifier": { + "$ref": "#/components/schemas/IIdentifier" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "sessionId": { + "type": "string" + } + }, + "required": ["id", "identifier", "stateId", "redirectUrl", "sessionId"] + }, + "IIdentifier": { + "type": "object", + "properties": { + "did": { + "type": "string", + "description": "Decentralized identifier" + }, + "alias": { + "type": "string", + "description": "Optional. Identifier alias. Can be used to reference an object in an external system" + }, + "provider": { + "type": "string", + "description": "Identifier provider name" + }, + "controllerKeyId": { + "type": "string", + "description": "Controller key id" + }, + "keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IKey" + }, + "description": "Array of managed keys" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IService" + }, + "description": "Array of services" + } + }, + "required": ["did", "provider", "keys", "services"], + "description": "Identifier interface" + }, + "IKey": { + "type": "object", + "properties": { + "kid": { + "type": "string", + "description": "Key ID" + }, + "kms": { + "type": "string", + "description": "Key Management System" + }, + "type": { + "$ref": "#/components/schemas/TKeyType", + "description": "Key type" + }, + "publicKeyHex": { + "type": "string", + "description": "Public key" + }, + "privateKeyHex": { + "type": "string", + "description": "Optional. Private key" + }, + "meta": { + "anyOf": [ + { + "$ref": "#/components/schemas/KeyMetadata" + }, + { + "type": "null" + } + ], + "description": "Optional. Key metadata. This should be used to determine which algorithms are supported." + } + }, + "required": ["kid", "kms", "type", "publicKeyHex"], + "description": "Cryptographic key" + }, + "TKeyType": { + "type": "string", + "enum": ["Ed25519", "Secp256k1", "Secp256r1", "X25519", "Bls12381G1", "Bls12381G2", "RSA"], + "description": "Cryptographic key type." + }, + "KeyMetadata": { + "type": "object", + "properties": { + "algorithms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "This encapsulates data about a key.\n\nImplementations of {@link @veramo/key-manager#AbstractKeyManagementSystem | AbstractKeyManagementSystem } should populate this object, for each key, with the algorithms that can be performed using it.\n\nThis can also be used to add various tags to the keys under management." + }, + "IService": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "type": { + "type": "string", + "description": "Service type" + }, + "serviceEndpoint": { + "anyOf": [ + { + "$ref": "#/components/schemas/IServiceEndpoint" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/IServiceEndpoint" + } + } + ], + "description": "Endpoint URL" + }, + "description": { + "type": "string", + "description": "Optional. Description" + } + }, + "required": ["id", "type", "serviceEndpoint"], + "description": "Identifier service" + }, + "IServiceEndpoint": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ], + "description": "Represents a service endpoint URL or a map of URLs" + } + }, + "methods": { + "cmGetContact": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IGetContactArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IContact" + } + }, + "cmGetContacts": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IGetContactsArgs" + }, + "returnType": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IContact" + } + } + }, + "cmAddContact": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IAddContactArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IContact" + } + }, + "cmRemoveContact": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IRemoveContactArgs" + }, + "returnType": { + "type": "boolean" + } + }, + "cmUpdateContact": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IUpdateContactArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IContact" + } + }, + "cmGetIdentity": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IGetIdentityArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IIdentity" + } + }, + "cmGetIdentities": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IGetIdentitiesArgs" + }, + "returnType": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IIdentity" + } + } + }, + "cmAddIdentity": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IAddIdentityArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IIdentity" + } + }, + "cmRemoveIdentity": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IRemoveIdentityArgs" + }, + "returnType": { + "type": "boolean" + } + }, + "cmUpdateIdentity": { + "description": "", + "arguments": { + "$ref": "#/components/schemas/IUpdateConnectionArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IIdentity" + } + } + } + } + } +} diff --git a/packages/oid4vci-issuer-store/plugin.schema.json b/packages/oid4vci-issuer-store/plugin.schema.json new file mode 100644 index 000000000..03a1513eb --- /dev/null +++ b/packages/oid4vci-issuer-store/plugin.schema.json @@ -0,0 +1,329 @@ +{ + "IDidAuthSiopOpAuthenticator": { + "components": { + "schemas": { + "IGetSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSessionForSiop } " + }, + "IRegisterSiopSessionArgs": { + "type": "object", + "properties": { + "identifier": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "controllerKeyId": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + }, + "services": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": ["did", "provider", "keys", "services"] + }, + "sessionId": { + "type": "string" + }, + "expiresIn": { + "type": "number" + }, + "additionalProperties": false + }, + "required": ["identifier"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.registerSessionForSiop } " + }, + "IRemoveSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.removeSessionForSiop } " + }, + "IAuthenticateWithSiopArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.authenticateWithSiop } " + }, + "IResponse": { + "type": "object", + "properties": { + "status": { + "type": "number" + }, + "additionalProperties": true + }, + "required": ["status"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.authenticateWithSiop & DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + }, + "IGetSiopAuthenticationRequestFromRpArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "jwt": { + "type": "string" + }, + "requestPayload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "registration": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["jwt", "requestPayload", "registration"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "IGetSiopAuthenticationRequestDetailsArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "credentialFilter": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IAuthRequestDetails": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpResponseOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["id", "vpResponseOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IVerifySiopAuthenticationRequestUriArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "ParsedAuthenticationRequestURI"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "VerifiedAuthorizationRequest": { + "type": "object", + "properties": { + "payload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "presentationDefinitions": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifyOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["payload", "verifyOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "ISendSiopAuthenticationResponseArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifiablePresentationResponse": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + } + }, + "methods": { + "getSessionForSiop": { + "description": "Get SIOP session", + "arguments": { + "$ref": "#/components/schemas/IGetSiopSessionArgs" + }, + "returnType": "object" + }, + "registerSessionForSiop": { + "description": "Register SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRegisterSiopSessionArgs" + }, + "returnType": "object" + }, + "removeSessionForSiop": { + "description": "Remove SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRemoveSiopSessionArgs" + }, + "returnType": "boolean" + }, + "authenticateWithSiop": { + "description": "Authenticate using DID Auth SIOP", + "arguments": { + "$ref": "#/components/schemas/IAuthenticateWithSiopArgs" + }, + "returnType": { + "$ref": "#/components/schemas/Response" + } + }, + "getSiopAuthenticationRequestFromRP": { + "description": "Get authentication request from RP", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestFromRpArgs" + }, + "returnType": { + "$ref": "#/components/schemas/ParsedAuthenticationRequestURI" + } + }, + "getSiopAuthenticationRequestDetails": { + "description": "Get authentication request details", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestDetailsArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IAuthRequestDetails" + } + }, + "verifySiopAuthenticationRequestURI": { + "description": "Verify authentication request URI", + "arguments": { + "$ref": "#/components/schemas/IVerifySiopAuthenticationRequestUriArgs" + }, + "returnType": { + "$ref": "#/components/schemas/VerifiedAuthorizationRequest" + } + }, + "sendSiopAuthenticationResponse": { + "description": "Send authentication response", + "arguments": { + "$ref": "#/components/schemas/ISendSiopAuthenticationResponseArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IRequiredContext" + } + } + } + } + } +} diff --git a/packages/oid4vci-issuer/plugin.schema.json b/packages/oid4vci-issuer/plugin.schema.json new file mode 100644 index 000000000..03a1513eb --- /dev/null +++ b/packages/oid4vci-issuer/plugin.schema.json @@ -0,0 +1,329 @@ +{ + "IDidAuthSiopOpAuthenticator": { + "components": { + "schemas": { + "IGetSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSessionForSiop } " + }, + "IRegisterSiopSessionArgs": { + "type": "object", + "properties": { + "identifier": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "controllerKeyId": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + }, + "services": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": ["did", "provider", "keys", "services"] + }, + "sessionId": { + "type": "string" + }, + "expiresIn": { + "type": "number" + }, + "additionalProperties": false + }, + "required": ["identifier"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.registerSessionForSiop } " + }, + "IRemoveSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.removeSessionForSiop } " + }, + "IAuthenticateWithSiopArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.authenticateWithSiop } " + }, + "IResponse": { + "type": "object", + "properties": { + "status": { + "type": "number" + }, + "additionalProperties": true + }, + "required": ["status"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.authenticateWithSiop & DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + }, + "IGetSiopAuthenticationRequestFromRpArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "jwt": { + "type": "string" + }, + "requestPayload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "registration": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["jwt", "requestPayload", "registration"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "IGetSiopAuthenticationRequestDetailsArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "credentialFilter": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IAuthRequestDetails": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpResponseOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["id", "vpResponseOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IVerifySiopAuthenticationRequestUriArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "ParsedAuthenticationRequestURI"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "VerifiedAuthorizationRequest": { + "type": "object", + "properties": { + "payload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "presentationDefinitions": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifyOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["payload", "verifyOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "ISendSiopAuthenticationResponseArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifiablePresentationResponse": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + } + }, + "methods": { + "getSessionForSiop": { + "description": "Get SIOP session", + "arguments": { + "$ref": "#/components/schemas/IGetSiopSessionArgs" + }, + "returnType": "object" + }, + "registerSessionForSiop": { + "description": "Register SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRegisterSiopSessionArgs" + }, + "returnType": "object" + }, + "removeSessionForSiop": { + "description": "Remove SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRemoveSiopSessionArgs" + }, + "returnType": "boolean" + }, + "authenticateWithSiop": { + "description": "Authenticate using DID Auth SIOP", + "arguments": { + "$ref": "#/components/schemas/IAuthenticateWithSiopArgs" + }, + "returnType": { + "$ref": "#/components/schemas/Response" + } + }, + "getSiopAuthenticationRequestFromRP": { + "description": "Get authentication request from RP", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestFromRpArgs" + }, + "returnType": { + "$ref": "#/components/schemas/ParsedAuthenticationRequestURI" + } + }, + "getSiopAuthenticationRequestDetails": { + "description": "Get authentication request details", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestDetailsArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IAuthRequestDetails" + } + }, + "verifySiopAuthenticationRequestURI": { + "description": "Verify authentication request URI", + "arguments": { + "$ref": "#/components/schemas/IVerifySiopAuthenticationRequestUriArgs" + }, + "returnType": { + "$ref": "#/components/schemas/VerifiedAuthorizationRequest" + } + }, + "sendSiopAuthenticationResponse": { + "description": "Send authentication response", + "arguments": { + "$ref": "#/components/schemas/ISendSiopAuthenticationResponseArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IRequiredContext" + } + } + } + } + } +} diff --git a/packages/presentation-exchange/plugin.schema.json b/packages/presentation-exchange/plugin.schema.json new file mode 100644 index 000000000..03a1513eb --- /dev/null +++ b/packages/presentation-exchange/plugin.schema.json @@ -0,0 +1,329 @@ +{ + "IDidAuthSiopOpAuthenticator": { + "components": { + "schemas": { + "IGetSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSessionForSiop } " + }, + "IRegisterSiopSessionArgs": { + "type": "object", + "properties": { + "identifier": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "controllerKeyId": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + }, + "services": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": ["did", "provider", "keys", "services"] + }, + "sessionId": { + "type": "string" + }, + "expiresIn": { + "type": "number" + }, + "additionalProperties": false + }, + "required": ["identifier"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.registerSessionForSiop } " + }, + "IRemoveSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.removeSessionForSiop } " + }, + "IAuthenticateWithSiopArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.authenticateWithSiop } " + }, + "IResponse": { + "type": "object", + "properties": { + "status": { + "type": "number" + }, + "additionalProperties": true + }, + "required": ["status"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.authenticateWithSiop & DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + }, + "IGetSiopAuthenticationRequestFromRpArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "jwt": { + "type": "string" + }, + "requestPayload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "registration": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["jwt", "requestPayload", "registration"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "IGetSiopAuthenticationRequestDetailsArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "credentialFilter": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IAuthRequestDetails": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpResponseOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["id", "vpResponseOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IVerifySiopAuthenticationRequestUriArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "ParsedAuthenticationRequestURI"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "VerifiedAuthorizationRequest": { + "type": "object", + "properties": { + "payload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "presentationDefinitions": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifyOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["payload", "verifyOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "ISendSiopAuthenticationResponseArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifiablePresentationResponse": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + } + }, + "methods": { + "getSessionForSiop": { + "description": "Get SIOP session", + "arguments": { + "$ref": "#/components/schemas/IGetSiopSessionArgs" + }, + "returnType": "object" + }, + "registerSessionForSiop": { + "description": "Register SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRegisterSiopSessionArgs" + }, + "returnType": "object" + }, + "removeSessionForSiop": { + "description": "Remove SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRemoveSiopSessionArgs" + }, + "returnType": "boolean" + }, + "authenticateWithSiop": { + "description": "Authenticate using DID Auth SIOP", + "arguments": { + "$ref": "#/components/schemas/IAuthenticateWithSiopArgs" + }, + "returnType": { + "$ref": "#/components/schemas/Response" + } + }, + "getSiopAuthenticationRequestFromRP": { + "description": "Get authentication request from RP", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestFromRpArgs" + }, + "returnType": { + "$ref": "#/components/schemas/ParsedAuthenticationRequestURI" + } + }, + "getSiopAuthenticationRequestDetails": { + "description": "Get authentication request details", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestDetailsArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IAuthRequestDetails" + } + }, + "verifySiopAuthenticationRequestURI": { + "description": "Verify authentication request URI", + "arguments": { + "$ref": "#/components/schemas/IVerifySiopAuthenticationRequestUriArgs" + }, + "returnType": { + "$ref": "#/components/schemas/VerifiedAuthorizationRequest" + } + }, + "sendSiopAuthenticationResponse": { + "description": "Send authentication response", + "arguments": { + "$ref": "#/components/schemas/ISendSiopAuthenticationResponseArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IRequiredContext" + } + } + } + } + } +} diff --git a/packages/siopv2-oid4vp-op-auth/plugin.schema.json b/packages/siopv2-oid4vp-op-auth/plugin.schema.json new file mode 100644 index 000000000..03a1513eb --- /dev/null +++ b/packages/siopv2-oid4vp-op-auth/plugin.schema.json @@ -0,0 +1,329 @@ +{ + "IDidAuthSiopOpAuthenticator": { + "components": { + "schemas": { + "IGetSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSessionForSiop } " + }, + "IRegisterSiopSessionArgs": { + "type": "object", + "properties": { + "identifier": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "controllerKeyId": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + }, + "services": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": ["did", "provider", "keys", "services"] + }, + "sessionId": { + "type": "string" + }, + "expiresIn": { + "type": "number" + }, + "additionalProperties": false + }, + "required": ["identifier"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.registerSessionForSiop } " + }, + "IRemoveSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.removeSessionForSiop } " + }, + "IAuthenticateWithSiopArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.authenticateWithSiop } " + }, + "IResponse": { + "type": "object", + "properties": { + "status": { + "type": "number" + }, + "additionalProperties": true + }, + "required": ["status"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.authenticateWithSiop & DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + }, + "IGetSiopAuthenticationRequestFromRpArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "jwt": { + "type": "string" + }, + "requestPayload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "registration": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["jwt", "requestPayload", "registration"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "IGetSiopAuthenticationRequestDetailsArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "credentialFilter": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IAuthRequestDetails": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpResponseOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["id", "vpResponseOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IVerifySiopAuthenticationRequestUriArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "ParsedAuthenticationRequestURI"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "VerifiedAuthorizationRequest": { + "type": "object", + "properties": { + "payload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "presentationDefinitions": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifyOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["payload", "verifyOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "ISendSiopAuthenticationResponseArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifiablePresentationResponse": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + } + }, + "methods": { + "getSessionForSiop": { + "description": "Get SIOP session", + "arguments": { + "$ref": "#/components/schemas/IGetSiopSessionArgs" + }, + "returnType": "object" + }, + "registerSessionForSiop": { + "description": "Register SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRegisterSiopSessionArgs" + }, + "returnType": "object" + }, + "removeSessionForSiop": { + "description": "Remove SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRemoveSiopSessionArgs" + }, + "returnType": "boolean" + }, + "authenticateWithSiop": { + "description": "Authenticate using DID Auth SIOP", + "arguments": { + "$ref": "#/components/schemas/IAuthenticateWithSiopArgs" + }, + "returnType": { + "$ref": "#/components/schemas/Response" + } + }, + "getSiopAuthenticationRequestFromRP": { + "description": "Get authentication request from RP", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestFromRpArgs" + }, + "returnType": { + "$ref": "#/components/schemas/ParsedAuthenticationRequestURI" + } + }, + "getSiopAuthenticationRequestDetails": { + "description": "Get authentication request details", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestDetailsArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IAuthRequestDetails" + } + }, + "verifySiopAuthenticationRequestURI": { + "description": "Verify authentication request URI", + "arguments": { + "$ref": "#/components/schemas/IVerifySiopAuthenticationRequestUriArgs" + }, + "returnType": { + "$ref": "#/components/schemas/VerifiedAuthorizationRequest" + } + }, + "sendSiopAuthenticationResponse": { + "description": "Send authentication response", + "arguments": { + "$ref": "#/components/schemas/ISendSiopAuthenticationResponseArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IRequiredContext" + } + } + } + } + } +} diff --git a/packages/siopv2-oid4vp-rp-auth/plugin.schema.json b/packages/siopv2-oid4vp-rp-auth/plugin.schema.json new file mode 100644 index 000000000..03a1513eb --- /dev/null +++ b/packages/siopv2-oid4vp-rp-auth/plugin.schema.json @@ -0,0 +1,329 @@ +{ + "IDidAuthSiopOpAuthenticator": { + "components": { + "schemas": { + "IGetSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSessionForSiop } " + }, + "IRegisterSiopSessionArgs": { + "type": "object", + "properties": { + "identifier": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "controllerKeyId": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + }, + "services": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": ["did", "provider", "keys", "services"] + }, + "sessionId": { + "type": "string" + }, + "expiresIn": { + "type": "number" + }, + "additionalProperties": false + }, + "required": ["identifier"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.registerSessionForSiop } " + }, + "IRemoveSiopSessionArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.removeSessionForSiop } " + }, + "IAuthenticateWithSiopArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.authenticateWithSiop } " + }, + "IResponse": { + "type": "object", + "properties": { + "status": { + "type": "number" + }, + "additionalProperties": true + }, + "required": ["status"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.authenticateWithSiop & DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + }, + "IGetSiopAuthenticationRequestFromRpArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "stateId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["sessionId", "stateId", "redirectUrl"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "jwt": { + "type": "string" + }, + "requestPayload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "registration": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["jwt", "requestPayload", "registration"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } " + }, + "IGetSiopAuthenticationRequestDetailsArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "credentialFilter": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IAuthRequestDetails": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpResponseOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["id", "vpResponseOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } " + }, + "IVerifySiopAuthenticationRequestUriArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "ParsedAuthenticationRequestURI": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "ParsedAuthenticationRequestURI"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "VerifiedAuthorizationRequest": { + "type": "object", + "properties": { + "payload": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "presentationDefinitions": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifyOpts": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["payload", "verifyOpts"], + "description": "Result of {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } " + }, + "ISendSiopAuthenticationResponseArgs": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "verifiedAuthenticationRequest": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "verifiablePresentationResponse": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["sessionId", "verifiedAuthenticationRequest"], + "description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } " + } + }, + "methods": { + "getSessionForSiop": { + "description": "Get SIOP session", + "arguments": { + "$ref": "#/components/schemas/IGetSiopSessionArgs" + }, + "returnType": "object" + }, + "registerSessionForSiop": { + "description": "Register SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRegisterSiopSessionArgs" + }, + "returnType": "object" + }, + "removeSessionForSiop": { + "description": "Remove SIOP session", + "arguments": { + "$ref": "#/components/schemas/IRemoveSiopSessionArgs" + }, + "returnType": "boolean" + }, + "authenticateWithSiop": { + "description": "Authenticate using DID Auth SIOP", + "arguments": { + "$ref": "#/components/schemas/IAuthenticateWithSiopArgs" + }, + "returnType": { + "$ref": "#/components/schemas/Response" + } + }, + "getSiopAuthenticationRequestFromRP": { + "description": "Get authentication request from RP", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestFromRpArgs" + }, + "returnType": { + "$ref": "#/components/schemas/ParsedAuthenticationRequestURI" + } + }, + "getSiopAuthenticationRequestDetails": { + "description": "Get authentication request details", + "arguments": { + "$ref": "#/components/schemas/IGetSiopAuthenticationRequestDetailsArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IAuthRequestDetails" + } + }, + "verifySiopAuthenticationRequestURI": { + "description": "Verify authentication request URI", + "arguments": { + "$ref": "#/components/schemas/IVerifySiopAuthenticationRequestUriArgs" + }, + "returnType": { + "$ref": "#/components/schemas/VerifiedAuthorizationRequest" + } + }, + "sendSiopAuthenticationResponse": { + "description": "Send authentication response", + "arguments": { + "$ref": "#/components/schemas/ISendSiopAuthenticationResponseArgs" + }, + "returnType": { + "$ref": "#/components/schemas/IRequiredContext" + } + } + } + } + } +} diff --git a/packages/wellknown-did-issuer/plugin.schema.json b/packages/wellknown-did-issuer/plugin.schema.json new file mode 100644 index 000000000..8e78be3da --- /dev/null +++ b/packages/wellknown-did-issuer/plugin.schema.json @@ -0,0 +1,164 @@ +{ + "IWellKnownDidIssuer": { + "components": { + "schemas": { + "IIssueDidConfigurationResourceArgs": { + "type": "object", + "properties": { + "issuances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + }, + "credentialIssuance": { + "type": "string" + }, + "save": { + "type": "boolean" + }, + "additionalProperties": false + }, + "required": ["issuances", "credentialIssuance"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.addLinkedDomainsService } " + }, + "IIssueDomainLinkageCredentialArgs": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "serviceId": { + "type": "string" + }, + "issuanceDate": { + "type": "date" + }, + "expirationDate": { + "type": "date" + }, + "save": { + "type": "boolean" + }, + "options": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "credentialIssuance": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["did", "origin", "expirationDate", "options"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.issueDomainLinkageCredential } " + }, + "IGetDidConfigurationResourceArgs": { + "type": "object", + "properties": { + "origin": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["origin"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.getDidConfigurationResource } " + }, + "IAddLinkedDomainsServiceArgs": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "serviceId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["did", "origin"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.addLinkedDomainsService } " + }, + "ISaveDidConfigurationResourceArgs": { + "type": "object", + "properties": { + "origin": { + "type": "string" + }, + "didConfigurationResource": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["did", "origin"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.saveDidConfigurationResource } " + }, + "IRemoveCredentialIssuanceArgs": { + "type": "object", + "properties": { + "origin": { + "callbackName": "string" + }, + "additionalProperties": false + }, + "required": ["callbackName"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.removeCredentialIssuance } " + } + }, + "methods": { + "addLinkedDomainsService": { + "description": "Adds a LinkedDomains service to the DID", + "arguments": { + "$ref": "#/components/schemas/IAddLinkedDomainsServiceArgs" + } + }, + "getDidConfigurationResource": { + "description": "Retrieves a DID configuration resource from the database", + "arguments": { + "$ref": "#/components/schemas/IGetDidConfigurationResourceArgs" + }, + "returnType": "object" + }, + "issueDidConfigurationResource": { + "description": "Issues a DID configuration resource", + "arguments": { + "$ref": "#/components/schemas/IAddLinkedDomainsServiceArgs" + }, + "returnType": "object" + }, + "issueDomainLinkageCredential": { + "description": "Retrieves a domain linkage credential", + "arguments": { + "$ref": "#/components/schemas/IIssueDomainLinkageCredentialArgs" + }, + "returnType": "object" + }, + "removeCredentialIssuance": { + "description": "Removes a registered callback", + "arguments": { + "$ref": "#/components/schemas/IRemoveCredentialIssuanceArgs" + }, + "returnType": "boolean" + }, + "saveDidConfigurationResource": { + "description": "Saves a DID configuration resource to the database", + "arguments": { + "$ref": "#/components/schemas/ISaveDidConfigurationResourceArgs" + } + } + } + } + } +} diff --git a/packages/wellknown-did-verifier/plugin.schema.json b/packages/wellknown-did-verifier/plugin.schema.json new file mode 100644 index 000000000..8050db33d --- /dev/null +++ b/packages/wellknown-did-verifier/plugin.schema.json @@ -0,0 +1,34 @@ +{ + "IWellKnownDidVerifier": { + "components": { + "schemas": { + "IVerifyDomainLinkageArgs": { + "type": "object", + "properties": { + "didUrl": { + "type": "string" + }, + "signatureVerification": { + "type": "string" + }, + "onlyVerifyServiceDids": { + "type": "boolean" + }, + "additionalProperties": false + }, + "required": ["didUrl", "signatureVerification"], + "description": "Arguments needed for {@link IWellKnownDidVerifier.verifyDomainLinkage } " + } + }, + "methods": { + "verifyDomainLinkage": { + "description": "Verifies the relationship between the controller of an origin and a DID", + "arguments": { + "$ref": "#/components/schemas/IVerifyDomainLinkageArgs" + }, + "returnType": "object" + } + } + } + } +}