@sphereon/ssi-sdk.ms-request-api
Version:
195 lines (194 loc) • 6.39 kB
JSON
{
"IMsRequestApi": {
"components": {
"schemas": {
"IClientIssueRequest": {
"type": "object",
"properties": {
"authenticationInfo": {
"$ref": "#/components/schemas/IMsAuthenticationClientCredentialArgs"
},
"clientIssuanceConfig": {
"$ref": "#/components/schemas/IClientIssuanceConfig"
},
"claims": {
"$ref": "#/components/schemas/CredentialSubject"
}
},
"required": ["authenticationInfo", "clientIssuanceConfig", "claims"],
"additionalProperties": false
},
"IMsAuthenticationClientCredentialArgs": {
"type": "object",
"properties": {
"azClientId": {
"type": "string"
},
"azTenantId": {
"type": "string"
},
"azClientSecret": {
"type": "string"
},
"credentialManifestUrl": {
"type": "string"
},
"authority": {
"type": "string"
},
"region": {
"type": "string"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"skipCache": {
"type": "boolean"
},
"piiLoggingEnabled": {
"type": "boolean"
},
"logLevel": {
"$ref": "#/components/schemas/LogLevel"
}
},
"required": ["azClientId", "azTenantId", "azClientSecret"],
"additionalProperties": false,
"description": "azClientId: clientId of the application you're trying to login azClientSecret: secret of the application you're trying to login azTenantId: your MS Azure tenantId credentialManifestUrl: url of your credential manifest. usually in following format: https://beta.eu.did.msidentity.com/v1.0/<tenant_id>/verifiableCredential/contracts/<verifiable_credential_schema> authority: optional. if not provided, we'll use the azClientId to create the Tenanted format if provided should be one of these two formats: - Tenanted: https://login.microsoftonline.com/{tenant}/, where {tenant} is either the GUID representing the tenant ID or a domain name associated with the tenant. - Work and school accounts: https://login.microsoftonline.com/organizations/. region?: if present will use the provided, if not will make a request to determine the region scopes?: scopes that you want to access via this authentication skipCache?: whether to skip cache piiLoggingEnabled?: if not provided defaults to false logLevel?: can be one of these values: Error = 0, Warning = 1, Info = 2, Verbose = 3, Trace = 4 if not provided defaults to LogLevel.Verbose"
},
"LogLevel": {
"type": "number",
"enum": [0, 1, 2, 3, 4],
"description": "Log message level."
},
"IClientIssuanceConfig": {
"type": "object",
"properties": {
"authority": {
"type": "string"
},
"includeQRCode": {
"type": "boolean"
},
"registration": {
"$ref": "#/components/schemas/Registration"
},
"callback": {
"$ref": "#/components/schemas/Callback"
},
"issuance": {
"$ref": "#/components/schemas/IClientIssuance"
}
},
"required": ["authority", "includeQRCode", "registration", "callback", "issuance"],
"additionalProperties": false
},
"Registration": {
"type": "object",
"properties": {
"clientName": {
"type": "string"
}
},
"required": ["clientName"],
"additionalProperties": false
},
"Callback": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"state": {
"type": "string"
},
"headers": {
"$ref": "#/components/schemas/Headers"
}
},
"required": ["url", "state", "headers"],
"additionalProperties": false
},
"Headers": {
"type": "object",
"properties": {
"apiKey": {
"type": "string"
}
},
"required": ["apiKey"],
"additionalProperties": false
},
"IClientIssuance": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"manifest": {
"type": "string"
},
"pin": {
"$ref": "#/components/schemas/Pin"
}
},
"required": ["type", "manifest", "pin"],
"additionalProperties": false
},
"Pin": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"length": {
"type": "number"
}
},
"required": ["value", "length"],
"additionalProperties": false
},
"CredentialSubject": {
"type": "object"
},
"IIssueRequestResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"requestId": {
"type": "string"
},
"url": {
"type": "string"
},
"expiry": {
"type": "string",
"format": "date-time"
},
"pin": {
"type": "string"
}
},
"required": ["id", "requestId", "url", "expiry", "pin"],
"additionalProperties": false
}
},
"methods": {
"issuanceRequestMsVc": {
"description": "",
"arguments": {
"$ref": "#/components/schemas/IClientIssueRequest"
},
"returnType": {
"$ref": "#/components/schemas/IIssueRequestResponse"
}
}
}
}
}
}