@sphereon/ssi-sdk.ms-request-api 0.11.1-unstable.150 → 0.11.1-unstable.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk.ms-request-api",
3
- "version": "0.11.1-unstable.150+f6bebf5",
3
+ "version": "0.11.1-unstable.151+5f89d1a",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
16
16
  },
17
17
  "dependencies": {
18
- "@sphereon/ssi-sdk.ms-authenticator": "0.11.1-unstable.150+f6bebf5",
18
+ "@sphereon/ssi-sdk.ms-authenticator": "0.11.1-unstable.151+5f89d1a",
19
19
  "@veramo/remote-client": "4.2.0",
20
20
  "@veramo/remote-server": "4.2.0",
21
21
  "cross-fetch": "^3.1.5",
@@ -24,7 +24,7 @@
24
24
  "typeorm": "^0.3.12"
25
25
  },
26
26
  "devDependencies": {
27
- "@sphereon/ssi-sdk.agent-config": "0.11.1-unstable.150+f6bebf5",
27
+ "@sphereon/ssi-sdk.agent-config": "0.11.1-unstable.151+5f89d1a",
28
28
  "@types/express": "^4.17.17",
29
29
  "@types/express-session": "^1.17.4",
30
30
  "@types/jest": "^27.5.2",
@@ -65,5 +65,5 @@
65
65
  "API",
66
66
  "Issuer"
67
67
  ],
68
- "gitHead": "f6bebf589f590aa6959ee950fd7155f9fc8e24f2"
68
+ "gitHead": "5f89d1a73bc8cc2102c2def36821bea2c88ee350"
69
69
  }
@@ -15,11 +15,7 @@
15
15
  "$ref": "#/components/schemas/CredentialSubject"
16
16
  }
17
17
  },
18
- "required": [
19
- "authenticationInfo",
20
- "clientIssuanceConfig",
21
- "claims"
22
- ]
18
+ "required": ["authenticationInfo", "clientIssuanceConfig", "claims"]
23
19
  },
24
20
  "IMsAuthenticationClientCredentialArgs": {
25
21
  "type": "object",
@@ -58,23 +54,12 @@
58
54
  "$ref": "#/components/schemas/LogLevel"
59
55
  }
60
56
  },
61
- "required": [
62
- "azClientId",
63
- "azTenantId",
64
- "azClientSecret",
65
- "credentialManifestUrl"
66
- ],
57
+ "required": ["azClientId", "azTenantId", "azClientSecret", "credentialManifestUrl"],
67
58
  "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"
68
59
  },
69
60
  "LogLevel": {
70
61
  "type": "number",
71
- "enum": [
72
- 0,
73
- 1,
74
- 2,
75
- 3,
76
- 4
77
- ],
62
+ "enum": [0, 1, 2, 3, 4],
78
63
  "description": "Log message level."
79
64
  },
80
65
  "IClientIssuanceConfig": {
@@ -96,13 +81,7 @@
96
81
  "$ref": "#/components/schemas/IClientIssuance"
97
82
  }
98
83
  },
99
- "required": [
100
- "authority",
101
- "includeQRCode",
102
- "registration",
103
- "callback",
104
- "issuance"
105
- ]
84
+ "required": ["authority", "includeQRCode", "registration", "callback", "issuance"]
106
85
  },
107
86
  "Registration": {
108
87
  "type": "object",
@@ -111,9 +90,7 @@
111
90
  "type": "string"
112
91
  }
113
92
  },
114
- "required": [
115
- "clientName"
116
- ]
93
+ "required": ["clientName"]
117
94
  },
118
95
  "Callback": {
119
96
  "type": "object",
@@ -128,11 +105,7 @@
128
105
  "$ref": "#/components/schemas/Headers"
129
106
  }
130
107
  },
131
- "required": [
132
- "url",
133
- "state",
134
- "headers"
135
- ]
108
+ "required": ["url", "state", "headers"]
136
109
  },
137
110
  "Headers": {
138
111
  "type": "object",
@@ -141,9 +114,7 @@
141
114
  "type": "string"
142
115
  }
143
116
  },
144
- "required": [
145
- "apiKey"
146
- ]
117
+ "required": ["apiKey"]
147
118
  },
148
119
  "IClientIssuance": {
149
120
  "type": "object",
@@ -158,11 +129,7 @@
158
129
  "$ref": "#/components/schemas/Pin"
159
130
  }
160
131
  },
161
- "required": [
162
- "type",
163
- "manifest",
164
- "pin"
165
- ]
132
+ "required": ["type", "manifest", "pin"]
166
133
  },
167
134
  "Pin": {
168
135
  "type": "object",
@@ -174,10 +141,7 @@
174
141
  "type": "number"
175
142
  }
176
143
  },
177
- "required": [
178
- "value",
179
- "length"
180
- ]
144
+ "required": ["value", "length"]
181
145
  },
182
146
  "CredentialSubject": {
183
147
  "type": "object"
@@ -202,13 +166,7 @@
202
166
  "type": "string"
203
167
  }
204
168
  },
205
- "required": [
206
- "id",
207
- "requestId",
208
- "url",
209
- "expiry",
210
- "pin"
211
- ]
169
+ "required": ["id", "requestId", "url", "expiry", "pin"]
212
170
  }
213
171
  },
214
172
  "methods": {
@@ -224,4 +182,4 @@
224
182
  }
225
183
  }
226
184
  }
227
- }
185
+ }
@@ -1,8 +0,0 @@
1
- import { IIssueRequest, IIssueRequestResponse } from './types/IMsRequestApi'
2
- export declare function fetchIssuanceRequestMs(
3
- issuanceInfo: IIssueRequest,
4
- accessToken: string,
5
- msIdentityHostName: string
6
- ): Promise<IIssueRequestResponse>
7
- export declare function generatePin(digits: number): string
8
- //# sourceMappingURL=IssuerUtil.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IssuerUtil.d.ts","sourceRoot":"","sources":["../src/IssuerUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAG5E,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,aAAa,EAC3B,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAehC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,UAOzC"}
@@ -1,63 +0,0 @@
1
- 'use strict'
2
- var __awaiter =
3
- (this && this.__awaiter) ||
4
- function (thisArg, _arguments, P, generator) {
5
- function adopt(value) {
6
- return value instanceof P
7
- ? value
8
- : new P(function (resolve) {
9
- resolve(value)
10
- })
11
- }
12
- return new (P || (P = Promise))(function (resolve, reject) {
13
- function fulfilled(value) {
14
- try {
15
- step(generator.next(value))
16
- } catch (e) {
17
- reject(e)
18
- }
19
- }
20
- function rejected(value) {
21
- try {
22
- step(generator['throw'](value))
23
- } catch (e) {
24
- reject(e)
25
- }
26
- }
27
- function step(result) {
28
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected)
29
- }
30
- step((generator = generator.apply(thisArg, _arguments || [])).next())
31
- })
32
- }
33
- Object.defineProperty(exports, '__esModule', { value: true })
34
- exports.generatePin = exports.fetchIssuanceRequestMs = void 0
35
- const cross_fetch_1 = require('cross-fetch')
36
- function fetchIssuanceRequestMs(issuanceInfo, accessToken, msIdentityHostName) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- var client_api_request_endpoint = `${msIdentityHostName}${issuanceInfo.authenticationInfo.azTenantId}/verifiablecredentials/request`
39
- var payload = JSON.stringify(issuanceInfo.issuanceConfig)
40
- const fetchOptions = {
41
- method: 'POST',
42
- body: payload,
43
- headers: {
44
- 'Content-Type': 'application/json',
45
- 'Content-Length': payload.length.toString(),
46
- Authorization: `Bearer ${accessToken}`,
47
- },
48
- }
49
- const response = yield (0, cross_fetch_1.fetch)(client_api_request_endpoint, fetchOptions)
50
- return yield response.json()
51
- })
52
- }
53
- exports.fetchIssuanceRequestMs = fetchIssuanceRequestMs
54
- function generatePin(digits) {
55
- var add = 1,
56
- max = 12 - add
57
- max = Math.pow(10, digits + add)
58
- var min = max / 10 // Math.pow(10, n) basically
59
- var number = Math.floor(Math.random() * (max - min + 1)) + min
60
- return ('' + number).substring(add)
61
- }
62
- exports.generatePin = generatePin
63
- //# sourceMappingURL=IssuerUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IssuerUtil.js","sourceRoot":"","sources":["../src/IssuerUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6CAAmC;AACnC,SAAsB,sBAAsB,CAC1C,YAA2B,EAC3B,WAAmB,EACnB,kBAA0B;;QAE1B,IAAI,2BAA2B,GAAG,GAAG,kBAAkB,GAAG,YAAY,CAAC,kBAAkB,CAAC,UAAU,gCAAgC,CAAA;QAEpI,IAAI,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,cAAc,CAAC,CAAA;QACzD,MAAM,YAAY,GAAG;YACnB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAC3C,aAAa,EAAE,UAAU,WAAW,EAAE;aACvC;SACF,CAAA;QACD,MAAM,QAAQ,GAAG,MAAM,IAAA,mBAAK,EAAC,2BAA2B,EAAE,YAAY,CAAC,CAAA;QACvE,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC9B,CAAC;CAAA;AAnBD,wDAmBC;AAED,SAAgB,WAAW,CAAC,MAAc;IACxC,IAAI,GAAG,GAAG,CAAC,EACT,GAAG,GAAG,EAAE,GAAG,GAAG,CAAA;IAChB,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,CAAC,CAAA;IAChC,IAAI,GAAG,GAAG,GAAG,GAAG,EAAE,CAAA,CAAC,4BAA4B;IAC/C,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;IAC9D,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;AACrC,CAAC;AAPD,kCAOC"}
@@ -1,11 +0,0 @@
1
- import { IAgentPlugin } from '@veramo/core'
2
- import { IMsRequestApi } from '../types/IMsRequestApi'
3
- /**
4
- * {@inheritDoc IMsRequestApi}
5
- */
6
- export declare class MsRequestApi implements IAgentPlugin {
7
- readonly methods: IMsRequestApi
8
- /** {@inheritDoc IMsRequestApi.issuanceRequestMsVc} */
9
- private issuanceRequestMsVc
10
- }
11
- //# sourceMappingURL=MsRequestApi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MsRequestApi.d.ts","sourceRoot":"","sources":["../../src/agent/MsRequestApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAIL,aAAa,EAId,MAAM,wBAAwB,CAAA;AAG/B;;GAEG;AACH,qBAAa,YAAa,YAAW,YAAY;IAC/C,QAAQ,CAAC,OAAO,EAAE,aAAa,CAE9B;IAED,sDAAsD;YACxC,mBAAmB;CA8ClC"}
@@ -1,92 +0,0 @@
1
- 'use strict'
2
- var __awaiter =
3
- (this && this.__awaiter) ||
4
- function (thisArg, _arguments, P, generator) {
5
- function adopt(value) {
6
- return value instanceof P
7
- ? value
8
- : new P(function (resolve) {
9
- resolve(value)
10
- })
11
- }
12
- return new (P || (P = Promise))(function (resolve, reject) {
13
- function fulfilled(value) {
14
- try {
15
- step(generator.next(value))
16
- } catch (e) {
17
- reject(e)
18
- }
19
- }
20
- function rejected(value) {
21
- try {
22
- step(generator['throw'](value))
23
- } catch (e) {
24
- reject(e)
25
- }
26
- }
27
- function step(result) {
28
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected)
29
- }
30
- step((generator = generator.apply(thisArg, _arguments || [])).next())
31
- })
32
- }
33
- Object.defineProperty(exports, '__esModule', { value: true })
34
- exports.MsRequestApi = void 0
35
- const ssi_sdk_ms_authenticator_1 = require('@sphereon/ssi-sdk.ms-authenticator')
36
- const IssuerUtil_1 = require('../IssuerUtil')
37
- /**
38
- * {@inheritDoc IMsRequestApi}
39
- */
40
- class MsRequestApi {
41
- constructor() {
42
- this.methods = {
43
- issuanceRequestMsVc: this.issuanceRequestMsVc.bind(this),
44
- }
45
- }
46
- /** {@inheritDoc IMsRequestApi.issuanceRequestMsVc} */
47
- issuanceRequestMsVc(clientIssueRequest, context) {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- var accessToken = yield (0, ssi_sdk_ms_authenticator_1.ClientCredentialAuthenticator)(clientIssueRequest.authenticationInfo)
50
- var msIdentityHostName = yield (0, ssi_sdk_ms_authenticator_1.checkMsIdentityHostname)(clientIssueRequest.authenticationInfo)
51
- // Config Request and App Config File should be a parameter to this function
52
- if (!clientIssueRequest.authenticationInfo.azTenantId) {
53
- throw new Error('azTenantId is missing.')
54
- }
55
- // check if pin is required, if found make sure we set a new random pin
56
- // pincode is only used when the payload contains claim value pairs which results in an IDTokenhint
57
- if (clientIssueRequest.clientIssuanceConfig.issuance.pin) {
58
- clientIssueRequest.clientIssuanceConfig.issuance.pin.value = (0, IssuerUtil_1.generatePin)(
59
- clientIssueRequest.clientIssuanceConfig.issuance.pin.length
60
- )
61
- }
62
- var issuance = {
63
- type: clientIssueRequest.clientIssuanceConfig.issuance.type,
64
- manifest: clientIssueRequest.clientIssuanceConfig.issuance.manifest,
65
- pin: clientIssueRequest.clientIssuanceConfig.issuance.pin,
66
- claims: clientIssueRequest.claims,
67
- }
68
- var issuanceConfig = {
69
- authority: clientIssueRequest.clientIssuanceConfig.authority,
70
- includeQRCode: clientIssueRequest.clientIssuanceConfig.includeQRCode,
71
- registration: clientIssueRequest.clientIssuanceConfig.registration,
72
- callback: clientIssueRequest.clientIssuanceConfig.callback,
73
- issuance: issuance,
74
- }
75
- var issueRequest = {
76
- authenticationInfo: clientIssueRequest.authenticationInfo,
77
- issuanceConfig: issuanceConfig,
78
- }
79
- var resp = yield (0, IssuerUtil_1.fetchIssuanceRequestMs)(issueRequest, accessToken, msIdentityHostName)
80
- // the response from the VC Request API call is returned to the caller (the UI). It contains the URI to the request which Authenticator can download after
81
- // it has scanned the QR code. If the payload requested the VC Request service to create the QR code that is returned as well
82
- // the javascript in the UI will use that QR code to display it on the screen to the user.
83
- resp.id = issueRequest.issuanceConfig.callback.state // add session id so browser can pull status
84
- if (issueRequest.issuanceConfig.issuance.pin) {
85
- resp.pin = issueRequest.issuanceConfig.issuance.pin.value // add pin code so browser can display it
86
- }
87
- return resp
88
- })
89
- }
90
- }
91
- exports.MsRequestApi = MsRequestApi
92
- //# sourceMappingURL=MsRequestApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MsRequestApi.js","sourceRoot":"","sources":["../../src/agent/MsRequestApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,iFAA2G;AAC3G,8CAAmE;AACnE;;GAEG;AACH,MAAa,YAAY;IAAzB;QACW,YAAO,GAAkB;YAChC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;SACzD,CAAA;IAiDH,CAAC;IA/CC,sDAAsD;IACxC,mBAAmB,CAAC,kBAAuC,EAAE,OAAyB;;YAClG,IAAI,WAAW,GAAG,MAAM,IAAA,wDAA6B,EAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;YAE5F,IAAI,kBAAkB,GAAG,MAAM,IAAA,kDAAuB,EAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;YAE7F,4EAA4E;YAC5E,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,EAAE;gBACrD,MAAM,IAAI,KAAK,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cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE;gBAC5C,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAA,CAAC,yCAAyC;aACpG;YACD,OAAO,IAAI,CAAA;QACb,CAAC;KAAA;CACF;AApDD,oCAoDC"}
package/dist/index.d.ts DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * @public
3
- */
4
- declare const schema: any
5
- export { schema }
6
- export { MsRequestApi } from './agent/MsRequestApi'
7
- export * from './types/IMsRequestApi'
8
- export * from './IssuerUtil'
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,QAAA,MAAM,MAAM,KAAmC,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA"}
package/dist/index.js DELETED
@@ -1,43 +0,0 @@
1
- 'use strict'
2
- var __createBinding =
3
- (this && this.__createBinding) ||
4
- (Object.create
5
- ? function (o, m, k, k2) {
6
- if (k2 === undefined) k2 = k
7
- var desc = Object.getOwnPropertyDescriptor(m, k)
8
- if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = {
10
- enumerable: true,
11
- get: function () {
12
- return m[k]
13
- },
14
- }
15
- }
16
- Object.defineProperty(o, k2, desc)
17
- }
18
- : function (o, m, k, k2) {
19
- if (k2 === undefined) k2 = k
20
- o[k2] = m[k]
21
- })
22
- var __exportStar =
23
- (this && this.__exportStar) ||
24
- function (m, exports) {
25
- for (var p in m) if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p)
26
- }
27
- Object.defineProperty(exports, '__esModule', { value: true })
28
- exports.MsRequestApi = exports.schema = void 0
29
- /**
30
- * @public
31
- */
32
- const schema = require('../plugin.schema.json')
33
- exports.schema = schema
34
- var MsRequestApi_1 = require('./agent/MsRequestApi')
35
- Object.defineProperty(exports, 'MsRequestApi', {
36
- enumerable: true,
37
- get: function () {
38
- return MsRequestApi_1.MsRequestApi
39
- },
40
- })
41
- __exportStar(require('./types/IMsRequestApi'), exports)
42
- __exportStar(require('./IssuerUtil'), exports)
43
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AACtC,wBAAM;AACf,qDAAmD;AAA1C,4GAAA,YAAY,OAAA;AACrB,wDAAqC;AACrC,+CAA4B"}
@@ -1,106 +0,0 @@
1
- import { IAgentContext } from '@veramo/core';
2
- import { IAgentPlugin } from '@veramo/core';
3
- import { IMsAuthenticationClientCredentialArgs } from '@sphereon/ssi-sdk.ms-authenticator';
4
- import { IPluginMethodMap } from '@veramo/core';
5
-
6
- export declare interface Callback {
7
- url: string
8
- state: string
9
- headers: Headers_2
10
- }
11
-
12
- export declare type CredentialSubject = {
13
- [x: string]: any
14
- }
15
-
16
- export declare function fetchIssuanceRequestMs(
17
- issuanceInfo: IIssueRequest,
18
- accessToken: string,
19
- msIdentityHostName: string
20
- ): Promise<IIssueRequestResponse>
21
-
22
- export declare function generatePin(digits: number): string
23
-
24
- declare interface Headers_2 {
25
- apiKey: string
26
- }
27
- export { Headers_2 as Headers }
28
-
29
- export declare interface IClientIssuance {
30
- type: string
31
- manifest: string
32
- pin: Pin
33
- }
34
-
35
- export declare interface IClientIssuanceConfig {
36
- authority: string
37
- includeQRCode: boolean
38
- registration: Registration
39
- callback: Callback
40
- issuance: IClientIssuance
41
- }
42
-
43
- export declare interface IClientIssueRequest {
44
- authenticationInfo: IMsAuthenticationClientCredentialArgs
45
- clientIssuanceConfig: IClientIssuanceConfig
46
- claims: CredentialSubject
47
- }
48
-
49
- export declare interface IIssueRequest {
50
- authenticationInfo: IMsAuthenticationClientCredentialArgs
51
- issuanceConfig: IssuanceConfig
52
- }
53
-
54
- export declare interface IIssueRequestResponse {
55
- id: string
56
- requestId: string
57
- url: string
58
- expiry: Date
59
- pin: string
60
- }
61
-
62
- export declare interface IMsRequestApi extends IPluginMethodMap {
63
- issuanceRequestMsVc(clientIssueRequest: IClientIssueRequest, context: IRequiredContext): Promise<IIssueRequestResponse>
64
- }
65
-
66
- export declare type IRequiredContext = IAgentContext<Record<string, never>>
67
-
68
- export declare interface Issuance {
69
- type: string
70
- manifest: string
71
- pin: Pin
72
- claims: CredentialSubject
73
- }
74
-
75
- export declare interface IssuanceConfig {
76
- authority: string
77
- includeQRCode: boolean
78
- registration: Registration
79
- callback: Callback
80
- issuance: Issuance
81
- }
82
-
83
- /**
84
- * {@inheritDoc IMsRequestApi}
85
- */
86
- export declare class MsRequestApi implements IAgentPlugin {
87
- readonly methods: IMsRequestApi
88
- /** {@inheritDoc IMsRequestApi.issuanceRequestMsVc} */
89
- private issuanceRequestMsVc
90
- }
91
-
92
- export declare interface Pin {
93
- value: string
94
- length: number
95
- }
96
-
97
- export declare interface Registration {
98
- clientName: string
99
- }
100
-
101
- /**
102
- * @public
103
- */
104
- export declare const schema: any;
105
-
106
- export { }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.33.8"
9
- }
10
- ]
11
- }
@@ -1,66 +0,0 @@
1
- import { IAgentContext, IPluginMethodMap } from '@veramo/core'
2
- import { IMsAuthenticationClientCredentialArgs } from '@sphereon/ssi-sdk.ms-authenticator'
3
- export interface IMsRequestApi extends IPluginMethodMap {
4
- issuanceRequestMsVc(clientIssueRequest: IClientIssueRequest, context: IRequiredContext): Promise<IIssueRequestResponse>
5
- }
6
- export interface IClientIssueRequest {
7
- authenticationInfo: IMsAuthenticationClientCredentialArgs
8
- clientIssuanceConfig: IClientIssuanceConfig
9
- claims: CredentialSubject
10
- }
11
- export interface IClientIssuanceConfig {
12
- authority: string
13
- includeQRCode: boolean
14
- registration: Registration
15
- callback: Callback
16
- issuance: IClientIssuance
17
- }
18
- export interface IClientIssuance {
19
- type: string
20
- manifest: string
21
- pin: Pin
22
- }
23
- export interface IIssueRequest {
24
- authenticationInfo: IMsAuthenticationClientCredentialArgs
25
- issuanceConfig: IssuanceConfig
26
- }
27
- export interface IIssueRequestResponse {
28
- id: string
29
- requestId: string
30
- url: string
31
- expiry: Date
32
- pin: string
33
- }
34
- export interface Registration {
35
- clientName: string
36
- }
37
- export interface Headers {
38
- apiKey: string
39
- }
40
- export interface Callback {
41
- url: string
42
- state: string
43
- headers: Headers
44
- }
45
- export interface Pin {
46
- value: string
47
- length: number
48
- }
49
- export type CredentialSubject = {
50
- [x: string]: any
51
- }
52
- export interface Issuance {
53
- type: string
54
- manifest: string
55
- pin: Pin
56
- claims: CredentialSubject
57
- }
58
- export interface IssuanceConfig {
59
- authority: string
60
- includeQRCode: boolean
61
- registration: Registration
62
- callback: Callback
63
- issuance: Issuance
64
- }
65
- export type IRequiredContext = IAgentContext<Record<string, never>>
66
- //# sourceMappingURL=IMsRequestApi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IMsRequestApi.d.ts","sourceRoot":"","sources":["../../src/types/IMsRequestApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,qCAAqC,EAAE,MAAM,oCAAoC,CAAA;AAE1F,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,mBAAmB,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,OA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,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,GAAG,CAAA;IACR,MAAM,EAAE,iBAAiB,CAAA;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,OAAO,CAAA;IACtB,YAAY,EAAE,YAAY,CAAA;IAC1B,QAAQ,EAAE,QAAQ,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACnB;AAED,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- 'use strict'
2
- Object.defineProperty(exports, '__esModule', { value: true })
3
- //# sourceMappingURL=IMsRequestApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IMsRequestApi.js","sourceRoot":"","sources":["../../src/types/IMsRequestApi.ts"],"names":[],"mappings":""}