UNPKG

@sphereon/ssi-sdk-ext.jwt-service

Version:

1,641 lines 180 kB
{ "IJwtService": { "components": { "schemas": { "CreateJwsCompactArgs": { "$ref": "#/components/schemas/CreateJwsArgs" }, "CreateJwsArgs": { "type": "object", "properties": { "mode": { "$ref": "#/components/schemas/JwsIdentifierMode" }, "issuer": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "jwk": { "$ref": "#/components/schemas/JWK" }, "jwkThumbprint": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "method": { "$ref": "#/components/schemas/ManagedIdentifierMethod" }, "opts": { "$ref": "#/components/schemas/ManagedIdentifierOpts" }, "key": { "$ref": "#/components/schemas/IKey" }, "kid": { "type": "string" }, "issuer": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "identifier": { "$ref": "#/components/schemas/ManagedIdentifierType" }, "x5c": { "type": "array", "items": { "type": "string" } }, "certificate": {} }, "required": [ "certificate", "identifier", "jwk", "jwkThumbprint", "key", "kmsKeyRef", "method", "opts", "x5c" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "jwk": { "$ref": "#/components/schemas/JWK" }, "jwkThumbprint": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "method": { "$ref": "#/components/schemas/ManagedIdentifierMethod" }, "opts": { "$ref": "#/components/schemas/ManagedIdentifierOpts" }, "key": { "$ref": "#/components/schemas/IKey" }, "kid": { "type": "string" }, "issuer": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "identifier": { "$ref": "#/components/schemas/ManagedIdentifierType" }, "did": { "type": "string" }, "keys": { "type": "array", "items": { "$ref": "#/components/schemas/IKey" } }, "verificationMethodSection": { "$ref": "#/components/schemas/DIDDocumentSection" }, "controllerKeyId": { "type": "string" } }, "required": [ "did", "identifier", "issuer", "jwk", "jwkThumbprint", "key", "keys", "kid", "kmsKeyRef", "method", "opts" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "jwk": { "$ref": "#/components/schemas/JWK" }, "jwkThumbprint": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "method": { "$ref": "#/components/schemas/ManagedIdentifierMethod" }, "opts": { "$ref": "#/components/schemas/ManagedIdentifierOpts" }, "key": { "$ref": "#/components/schemas/IKey" }, "kid": { "type": "string" }, "issuer": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "identifier": { "$ref": "#/components/schemas/ManagedIdentifierType" } }, "required": [ "identifier", "jwk", "jwkThumbprint", "key", "kmsKeyRef", "method", "opts" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "jwk": { "$ref": "#/components/schemas/JWK" }, "jwkThumbprint": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "method": { "$ref": "#/components/schemas/ManagedIdentifierMethod" }, "opts": { "$ref": "#/components/schemas/ManagedIdentifierOpts" }, "key": { "$ref": "#/components/schemas/IKey" }, "kid": { "type": "string" }, "issuer": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "identifier": { "$ref": "#/components/schemas/ManagedIdentifierType" } }, "required": [ "identifier", "jwk", "jwkThumbprint", "key", "kid", "kmsKeyRef", "method", "opts" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "jwk": { "$ref": "#/components/schemas/JWK" }, "jwkThumbprint": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "method": { "$ref": "#/components/schemas/ManagedIdentifierMethod" }, "opts": { "$ref": "#/components/schemas/ManagedIdentifierOpts" }, "key": { "$ref": "#/components/schemas/IKey" }, "kid": { "type": "string" }, "issuer": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "identifier": { "$ref": "#/components/schemas/ManagedIdentifierType" } }, "required": [ "identifier", "jwk", "jwkThumbprint", "key", "kmsKeyRef", "method", "opts" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "jwk": { "$ref": "#/components/schemas/JWK" }, "jwkThumbprint": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "method": { "$ref": "#/components/schemas/ManagedIdentifierMethod" }, "opts": { "$ref": "#/components/schemas/ManagedIdentifierOpts" }, "key": { "$ref": "#/components/schemas/IKey" }, "kid": { "type": "string" }, "issuer": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "identifier": { "$ref": "#/components/schemas/ManagedIdentifierType" } }, "required": [ "identifier", "jwk", "jwkThumbprint", "key", "kmsKeyRef", "method", "opts" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "jwk": { "$ref": "#/components/schemas/JWK" }, "jwkThumbprint": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "method": { "$ref": "#/components/schemas/ManagedIdentifierMethod" }, "opts": { "$ref": "#/components/schemas/ManagedIdentifierOpts" }, "key": { "$ref": "#/components/schemas/IKey" }, "kid": { "type": "string" }, "issuer": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "identifier": { "$ref": "#/components/schemas/ManagedIdentifierType" } }, "required": [ "identifier", "jwk", "jwkThumbprint", "key", "kmsKeyRef", "method", "opts" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "method": { "type": "string", "const": "jwk" }, "identifier": { "$ref": "#/components/schemas/JWK" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "method": { "type": "string", "const": "x5c" }, "identifier": { "type": "array", "items": { "type": "string" } }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "method": { "type": "string", "const": "did" }, "identifier": { "anyOf": [ { "$ref": "#/components/schemas/IIdentifier" }, { "type": "string" } ] }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "keyType": { "$ref": "#/components/schemas/TKeyType" }, "offlineWhenNoDIDRegistered": { "type": "boolean" }, "noVerificationMethodFallback": { "type": "boolean" }, "controllerKey": { "type": "boolean" }, "vmRelationship": { "$ref": "#/components/schemas/DIDDocumentSection" } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "method": { "type": "string", "const": "kid" }, "identifier": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "method": { "type": "string", "const": "key" }, "identifier": { "$ref": "#/components/schemas/IKey" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "method": { "type": "string", "const": "cose_key" }, "identifier": { "$ref": "#/components/schemas/ICoseKeyJson" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "noIssPayloadUpdate": { "type": "boolean" }, "noIdentifierInHeader": { "type": "boolean" }, "lazyDisabled": { "type": "boolean" }, "method": { "type": "string", "const": "oid4vci-issuer" }, "identifier": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] } ] }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "protectedHeader": { "$ref": "#/components/schemas/JwsHeader" }, "payload": { "anyOf": [ { "$ref": "#/components/schemas/JwsPayload" }, { "$ref": "#/components/schemas/Uint8Array" }, { "type": "string" } ] } }, "required": [ "issuer", "protectedHeader", "payload" ], "additionalProperties": false }, "JwsIdentifierMode": { "type": "string", "enum": [ "x5c", "kid", "jwk", "did", "auto" ] }, "JWK": { "type": "object", "properties": { "kty": { "anyOf": [ { "$ref": "#/components/schemas/JwkKeyType" }, { "$ref": "#/components/schemas/JwkKeyTypeString" } ] }, "crv": { "anyOf": [ { "$ref": "#/components/schemas/JoseCurve" }, { "$ref": "#/components/schemas/JoseCurveString" } ] }, "alg": { "anyOf": [ { "$ref": "#/components/schemas/JoseSignatureAlgorithm" }, { "$ref": "#/components/schemas/JoseSignatureAlgorithmString" } ] }, "x": { "type": "string" }, "y": { "type": "string" }, "e": { "type": "string" }, "n": { "type": "string" }, "d": { "type": "string" }, "dp": { "type": "string" }, "dq": { "type": "string" }, "ext": { "type": "boolean" }, "k": { "type": "string" }, "key_ops": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/JoseKeyOperation" }, { "$ref": "#/components/schemas/JoseKeyOperationString" } ] } }, "kid": { "type": "string" }, "oth": { "type": "array", "items": { "type": "object", "properties": { "d": { "type": "string" }, "r": { "type": "string" }, "t": { "type": "string" } }, "additionalProperties": false } }, "p": { "type": "string" }, "q": { "type": "string" }, "qi": { "type": "string" }, "use": { "type": "string" }, "x5c": { "type": "array", "items": { "type": "string" }, "description": "JWK \"x5c\" (X.509 Certificate Chain) Parameter." }, "x5t": { "type": "string", "description": "JWK \"x5t\" (X.509 Certificate SHA-1 Thumbprint) Parameter." }, "x5t#S256": { "type": "string", "description": "\"x5t#S256\" (X.509 Certificate SHA-256 Thumbprint) Parameter." }, "x5u": { "type": "string", "description": "JWK \"x5u\" (X.509 URL) Parameter." }, "iv": { "type": "string" } }, "required": [ "kty" ] }, "JwkKeyType": { "type": "string", "enum": [ "EC", "RSA", "oct", "OKP" ] }, "JwkKeyTypeString": { "type": "string", "enum": [ "EC", "RSA", "oct", "OKP" ] }, "JoseCurve": { "type": "string", "enum": [ "P-256", "P-384", "P-521", "X25519", "X448", "EdDSA", "Ed25519", "Ed448", "secp256k1" ] }, "JoseCurveString": { "type": "string", "enum": [ "P-256", "P-384", "P-521", "X25519", "X448", "EdDSA", "Ed25519", "Ed448", "secp256k1" ] }, "JoseSignatureAlgorithm": { "type": "string", "enum": [ "RS256", "RS384", "RS512", "ES256", "ES256K", "ES384", "ES512", "EdDSA", "HS256", "HS384", "HS512", "PS256", "PS384", "PS512", "none" ] }, "JoseSignatureAlgorithmString": { "type": "string", "enum": [ "RS256", "RS384", "RS512", "ES256", "ES256K", "ES384", "ES512", "EdDSA", "HS256", "HS384", "HS512", "PS256", "PS384", "PS512", "none" ] }, "JoseKeyOperation": { "type": "string", "enum": [ "sign", "verify", "encrypt", "decrypt", "wrapKey", "unwrapKey", "deriveKey", "deriveBits" ] }, "JoseKeyOperationString": { "type": "string", "enum": [ "sign", "verify", "encrypt", "decrypt", "wrapKey", "unwrapKey", "deriveKey", "deriveBits" ] }, "ManagedIdentifierMethod": { "type": "string", "enum": [ "did", "jwk", "x5c", "kid", "key", "cose_key", "oid4vci-issuer" ] }, "ManagedIdentifierOpts": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "method": { "type": "string", "const": "jwk" }, "identifier": { "$ref": "#/components/schemas/JWK" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "method": { "type": "string", "const": "x5c" }, "identifier": { "type": "array", "items": { "type": "string" } }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "method": { "type": "string", "const": "did" }, "identifier": { "anyOf": [ { "$ref": "#/components/schemas/IIdentifier" }, { "type": "string" } ] }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] }, "keyType": { "$ref": "#/components/schemas/TKeyType" }, "offlineWhenNoDIDRegistered": { "type": "boolean" }, "noVerificationMethodFallback": { "type": "boolean" }, "controllerKey": { "type": "boolean" }, "vmRelationship": { "$ref": "#/components/schemas/DIDDocumentSection" } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "method": { "type": "string", "const": "kid" }, "identifier": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "method": { "type": "string", "const": "key" }, "identifier": { "$ref": "#/components/schemas/IKey" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "method": { "type": "string", "const": "cose_key" }, "identifier": { "$ref": "#/components/schemas/ICoseKeyJson" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "method": { "type": "string", "const": "oid4vci-issuer" }, "identifier": { "type": "string" }, "kmsKeyRef": { "type": "string" }, "issuer": { "type": "string" }, "kid": { "type": "string" }, "clientId": { "type": "string" }, "clientIdScheme": { "anyOf": [ { "$ref": "#/components/schemas/ClientIdScheme" }, { "type": "string", "const": "did" }, { "type": "string" } ] } }, "required": [ "identifier" ] } ] }, "ClientIdScheme": { "type": "string", "enum": [ "x509_san_dns", "x509_san_uri" ] }, "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" ], "additionalProperties": false, "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" ], "additionalProperties": false, "description": "Cryptographic key" }, "TKeyType": { "type": "string", "enum": [ "Ed25519", "Secp256k1", "Secp256r1", "X25519", "Bls12381G1", "Bls12381G2", "RSA" ], "desc