@sphereon/ssi-sdk-ext.jwt-service
Version:
1,481 lines (1,479 loc) • 222 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
// plugin.schema.json
var require_plugin_schema = __commonJS({
"plugin.schema.json"(exports, module) {
module.exports = {
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: {