@sphereon/ssi-sdk.siopv2-oid4vp-rp-auth 0.34.1-feature.SSISDK.26.RP.57 → 0.34.1-feature.SSISDK.45.135
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/dist/index.cjs +343 -338
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +731 -48
- package/dist/index.d.ts +731 -48
- package/dist/index.js +335 -331
- package/dist/index.js.map +1 -1
- package/package.json +18 -18
- package/src/RPInstance.ts +6 -4
- package/src/agent/SIOPv2RP.ts +48 -34
- package/src/functions.ts +2 -2
- package/src/index.ts +1 -1
- package/src/types/ISIOPv2RP.ts +30 -45
package/src/agent/SIOPv2RP.ts
CHANGED
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
AuthorizationResponsePayload,
|
|
4
4
|
AuthorizationResponseState,
|
|
5
5
|
AuthorizationResponseStateStatus,
|
|
6
|
+
AuthorizationResponseStateWithVerifiedData,
|
|
6
7
|
decodeUriAsJson,
|
|
7
|
-
VerifiedAuthorizationResponse
|
|
8
|
+
VerifiedAuthorizationResponse
|
|
8
9
|
} from '@sphereon/did-auth-siop'
|
|
9
10
|
import { getAgentResolver } from '@sphereon/ssi-sdk-ext.did-utils'
|
|
10
11
|
import {
|
|
@@ -22,8 +23,8 @@ import {
|
|
|
22
23
|
SdJwtDecodedVerifiableCredential,
|
|
23
24
|
} from '@sphereon/ssi-types'
|
|
24
25
|
import { IAgentPlugin } from '@veramo/core'
|
|
26
|
+
import { DcqlQuery } from 'dcql'
|
|
25
27
|
import {
|
|
26
|
-
AuthorizationResponseStateWithVerifiedData,
|
|
27
28
|
IAuthorizationRequestPayloads,
|
|
28
29
|
ICreateAuthRequestArgs,
|
|
29
30
|
IGetAuthRequestStateArgs,
|
|
@@ -42,10 +43,8 @@ import {
|
|
|
42
43
|
VerifiedDataMode,
|
|
43
44
|
} from '../index'
|
|
44
45
|
import { RPInstance } from '../RPInstance'
|
|
45
|
-
|
|
46
46
|
import { ISIOPv2RP } from '../types/ISIOPv2RP'
|
|
47
47
|
import { shaHasher as defaultHasher } from '@sphereon/ssi-sdk.core'
|
|
48
|
-
import { DcqlQuery } from 'dcql'
|
|
49
48
|
|
|
50
49
|
export class SIOPv2RP implements IAgentPlugin {
|
|
51
50
|
private readonly opts: ISiopv2RPOpts
|
|
@@ -85,7 +84,7 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
private async createAuthorizationRequestURI(createArgs: ICreateAuthRequestArgs, context: IRequiredContext): Promise<string> {
|
|
88
|
-
return await this.getRPInstance({
|
|
87
|
+
return await this.getRPInstance({ responseRedirectURI: createArgs.responseRedirectURI, ...(createArgs.useQueryIdInstance === true && { queryId: createArgs.queryId } ) }, context)
|
|
89
88
|
.then((rp) => rp.createAuthorizationRequestURI(createArgs, context))
|
|
90
89
|
.then((URI) => URI.encodedUri)
|
|
91
90
|
}
|
|
@@ -94,21 +93,23 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
94
93
|
createArgs: ICreateAuthRequestArgs,
|
|
95
94
|
context: IRequiredContext,
|
|
96
95
|
): Promise<IAuthorizationRequestPayloads> {
|
|
97
|
-
return await this.getRPInstance({
|
|
96
|
+
return await this.getRPInstance({ queryId: createArgs.queryId }, context)
|
|
98
97
|
.then((rp) => rp.createAuthorizationRequest(createArgs, context))
|
|
99
98
|
.then(async (request) => {
|
|
100
99
|
const authRequest: IAuthorizationRequestPayloads = {
|
|
101
100
|
authorizationRequest: request.payload,
|
|
102
101
|
requestObject: await request.requestObjectJwt(),
|
|
103
|
-
requestObjectDecoded:
|
|
102
|
+
requestObjectDecoded: request.requestObject?.getPayload(),
|
|
104
103
|
}
|
|
105
104
|
return authRequest
|
|
106
105
|
})
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
private async siopGetRequestState(args: IGetAuthRequestStateArgs, context: IRequiredContext): Promise<AuthorizationRequestState | undefined> {
|
|
110
|
-
return await this.getRPInstance({
|
|
111
|
-
rp.get(context).then((rp) =>
|
|
109
|
+
return await this.getRPInstance({ queryId: args.queryId }, context).then((rp) =>
|
|
110
|
+
rp.get(context).then((rp) =>
|
|
111
|
+
rp.sessionManager.getRequestStateByCorrelationId(args.correlationId, args.errorOnNotFound)
|
|
112
|
+
),
|
|
112
113
|
)
|
|
113
114
|
}
|
|
114
115
|
|
|
@@ -116,7 +117,7 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
116
117
|
args: IGetAuthResponseStateArgs,
|
|
117
118
|
context: IRequiredContext,
|
|
118
119
|
): Promise<AuthorizationResponseStateWithVerifiedData | undefined> {
|
|
119
|
-
const rpInstance: RPInstance = await this.getRPInstance({
|
|
120
|
+
const rpInstance: RPInstance = await this.getRPInstance({ queryId: args.queryId }, context)
|
|
120
121
|
const authorizationResponseState: AuthorizationResponseState | undefined = await rpInstance
|
|
121
122
|
.get(context)
|
|
122
123
|
.then((rp) => rp.sessionManager.getResponseStateByCorrelationId(args.correlationId, args.errorOnNotFound))
|
|
@@ -193,10 +194,10 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
193
194
|
: CredentialMapper.toUniformPresentation(presentationDecoded as OriginalVerifiablePresentation)
|
|
194
195
|
|
|
195
196
|
private async siopUpdateRequestState(args: IUpdateRequestStateArgs, context: IRequiredContext): Promise<AuthorizationRequestState> {
|
|
196
|
-
if (args.state !== '
|
|
197
|
-
throw Error(`Only '
|
|
197
|
+
if (args.state !== 'authorization_request_created') {
|
|
198
|
+
throw Error(`Only 'authorization_request_created' status is supported for this method at this point`)
|
|
198
199
|
}
|
|
199
|
-
return await this.getRPInstance({
|
|
200
|
+
return await this.getRPInstance({ queryId: args.queryId }, context)
|
|
200
201
|
// todo: In the SIOP library we need to update the signal method to be more like this method
|
|
201
202
|
.then((rp) =>
|
|
202
203
|
rp.get(context).then(async (rp) => {
|
|
@@ -210,7 +211,7 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
private async siopDeleteState(args: IGetAuthResponseStateArgs, context: IRequiredContext): Promise<boolean> {
|
|
213
|
-
return await this.getRPInstance({
|
|
214
|
+
return await this.getRPInstance({ queryId: args.queryId }, context)
|
|
214
215
|
.then((rp) => rp.get(context).then((rp) => rp.sessionManager.deleteStateForCorrelationId(args.correlationId)))
|
|
215
216
|
.then(() => true)
|
|
216
217
|
}
|
|
@@ -223,12 +224,11 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
223
224
|
typeof args.authorizationResponse === 'string'
|
|
224
225
|
? (decodeUriAsJson(args.authorizationResponse) as AuthorizationResponsePayload)
|
|
225
226
|
: args.authorizationResponse
|
|
226
|
-
return await this.getRPInstance({
|
|
227
|
+
return await this.getRPInstance({ queryId: args.queryId }, context).then((rp) =>
|
|
227
228
|
rp.get(context).then((rp) =>
|
|
228
229
|
rp.verifyAuthorizationResponse(authResponse, {
|
|
229
230
|
correlationId: args.correlationId,
|
|
230
|
-
...(args.
|
|
231
|
-
...(args.dcqlQuery ? { dcqlQuery: args.dcqlQuery as DcqlQuery } : {}), // TODO BEFORE PR, check compatibility and whether we can remove local type
|
|
231
|
+
...(args.dcqlQueryPayload ? { dcqlQuery: args.dcqlQueryPayload.dcqlQuery } : {}),
|
|
232
232
|
audience: args.audience,
|
|
233
233
|
}),
|
|
234
234
|
),
|
|
@@ -236,15 +236,29 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
private async siopImportDefinitions(args: ImportDefinitionsArgs, context: IRequiredContext): Promise<void> {
|
|
239
|
-
const {
|
|
239
|
+
const { queries, tenantId, version, versionControlMode } = args
|
|
240
240
|
await Promise.all(
|
|
241
|
-
|
|
241
|
+
queries.map(async (definitionPair) => {
|
|
242
242
|
const definitionPayload = definitionPair.definitionPayload
|
|
243
|
-
|
|
243
|
+
if (!definitionPayload && !definitionPair.dcqlPayload) {
|
|
244
|
+
return Promise.reject(Error('Either dcqlPayload or definitionPayload must be suppplied'))
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
let definitionId: string
|
|
248
|
+
if (definitionPair.dcqlPayload) {
|
|
249
|
+
DcqlQuery.validate(definitionPair.dcqlPayload.dcqlQuery)
|
|
250
|
+
console.log(`persisting DCQL definition ${definitionPair.dcqlPayload.queryId} with versionControlMode ${versionControlMode}`)
|
|
251
|
+
definitionId = definitionPair.dcqlPayload.queryId
|
|
252
|
+
}
|
|
253
|
+
if (definitionPayload) {
|
|
254
|
+
await context.agent.pexValidateDefinition({ definition: definitionPayload })
|
|
255
|
+
console.log(`persisting PEX definition ${definitionPayload.id} / ${definitionPayload.name} with versionControlMode ${versionControlMode}`)
|
|
256
|
+
definitionId = definitionPayload.id
|
|
257
|
+
}
|
|
244
258
|
|
|
245
|
-
console.log(`persisting definition ${definitionPayload.id} / ${definitionPayload.name} with versionControlMode ${versionControlMode}`)
|
|
246
259
|
return context.agent.pdmPersistDefinition({
|
|
247
260
|
definitionItem: {
|
|
261
|
+
definitionId: definitionId!,
|
|
248
262
|
tenantId: tenantId,
|
|
249
263
|
version: version,
|
|
250
264
|
definitionPayload,
|
|
@@ -257,7 +271,7 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
257
271
|
}
|
|
258
272
|
|
|
259
273
|
private async siopGetRedirectURI(args: IGetRedirectUriArgs, context: IRequiredContext): Promise<string | undefined> {
|
|
260
|
-
const instanceId = args.
|
|
274
|
+
const instanceId = args.queryId ?? SIOPv2RP._DEFAULT_OPTS_KEY
|
|
261
275
|
if (this.instances.has(instanceId)) {
|
|
262
276
|
const rpInstance = this.instances.get(instanceId)
|
|
263
277
|
if (rpInstance !== undefined) {
|
|
@@ -272,17 +286,17 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
272
286
|
return undefined
|
|
273
287
|
}
|
|
274
288
|
|
|
275
|
-
async getRPInstance({
|
|
276
|
-
const instanceId =
|
|
289
|
+
async getRPInstance({ queryId, responseRedirectURI }: ISiopRPInstanceArgs, context: IRequiredContext): Promise<RPInstance> {
|
|
290
|
+
const instanceId = queryId ?? SIOPv2RP._DEFAULT_OPTS_KEY
|
|
277
291
|
if (!this.instances.has(instanceId)) {
|
|
278
|
-
const instanceOpts = this.getInstanceOpts(
|
|
279
|
-
const rpOpts = await this.getRPOptions(context, {
|
|
292
|
+
const instanceOpts = this.getInstanceOpts(queryId)
|
|
293
|
+
const rpOpts = await this.getRPOptions(context, { queryId, responseRedirectURI: responseRedirectURI })
|
|
280
294
|
if (!rpOpts.identifierOpts.resolveOpts?.resolver || typeof rpOpts.identifierOpts.resolveOpts.resolver.resolve !== 'function') {
|
|
281
295
|
if (!rpOpts.identifierOpts?.resolveOpts) {
|
|
282
296
|
rpOpts.identifierOpts = { ...rpOpts.identifierOpts }
|
|
283
297
|
rpOpts.identifierOpts.resolveOpts = { ...rpOpts.identifierOpts.resolveOpts }
|
|
284
298
|
}
|
|
285
|
-
console.log('Using agent DID resolver for RP instance with definition id ' +
|
|
299
|
+
console.log('Using agent DID resolver for RP instance with definition id ' + queryId)
|
|
286
300
|
rpOpts.identifierOpts.resolveOpts.resolver = getAgentResolver(context, {
|
|
287
301
|
uniresolverResolution: true,
|
|
288
302
|
localResolution: true,
|
|
@@ -298,11 +312,11 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
298
312
|
return rpInstance
|
|
299
313
|
}
|
|
300
314
|
|
|
301
|
-
async getRPOptions(context: IRequiredContext, opts: {
|
|
302
|
-
const {
|
|
303
|
-
const options = this.getInstanceOpts(
|
|
315
|
+
async getRPOptions(context: IRequiredContext, opts: { queryId?: string; responseRedirectURI?: string }): Promise<IRPOptions> {
|
|
316
|
+
const { queryId, responseRedirectURI: responseRedirectURI } = opts
|
|
317
|
+
const options = this.getInstanceOpts(queryId)?.rpOpts ?? this.opts.defaultOpts
|
|
304
318
|
if (!options) {
|
|
305
|
-
throw Error(`Could not get specific nor default options for definition ${
|
|
319
|
+
throw Error(`Could not get specific nor default options for definition ${queryId}`)
|
|
306
320
|
}
|
|
307
321
|
if (this.opts.defaultOpts) {
|
|
308
322
|
if (!options.identifierOpts) {
|
|
@@ -336,7 +350,7 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
336
350
|
getInstanceOpts(definitionId?: string): IPEXInstanceOptions | undefined {
|
|
337
351
|
if (!this.opts.instanceOpts) return undefined
|
|
338
352
|
|
|
339
|
-
const instanceOpt = definitionId ? this.opts.instanceOpts.find((i) => i.
|
|
353
|
+
const instanceOpt = definitionId ? this.opts.instanceOpts.find((i) => i.queryId === definitionId) : undefined
|
|
340
354
|
|
|
341
355
|
return instanceOpt ?? this.getDefaultOptions(definitionId)
|
|
342
356
|
}
|
|
@@ -344,11 +358,11 @@ export class SIOPv2RP implements IAgentPlugin {
|
|
|
344
358
|
private getDefaultOptions(definitionId: string | undefined) {
|
|
345
359
|
if (!this.opts.instanceOpts) return undefined
|
|
346
360
|
|
|
347
|
-
const defaultOptions = this.opts.instanceOpts.find((i) => i.
|
|
361
|
+
const defaultOptions = this.opts.instanceOpts.find((i) => i.queryId === 'default')
|
|
348
362
|
if (defaultOptions) {
|
|
349
363
|
const clonedOptions = { ...defaultOptions }
|
|
350
364
|
if (definitionId !== undefined) {
|
|
351
|
-
clonedOptions.
|
|
365
|
+
clonedOptions.queryId = definitionId
|
|
352
366
|
}
|
|
353
367
|
return clonedOptions
|
|
354
368
|
}
|
package/src/functions.ts
CHANGED
|
@@ -113,11 +113,11 @@ export async function createRPBuilder(args: {
|
|
|
113
113
|
let definition: IPresentationDefinition | undefined = args.definition
|
|
114
114
|
let dcqlQuery: DcqlQuery | undefined = args.dcql
|
|
115
115
|
|
|
116
|
-
if (!definition && pexOpts && pexOpts.
|
|
116
|
+
if (!definition && pexOpts && pexOpts.queryId) {
|
|
117
117
|
const presentationDefinitionItems = await context.agent.pdmGetDefinitions({
|
|
118
118
|
filter: [
|
|
119
119
|
{
|
|
120
|
-
definitionId: pexOpts.
|
|
120
|
+
definitionId: pexOpts.queryId,
|
|
121
121
|
version: pexOpts.version,
|
|
122
122
|
tenantId: pexOpts.tenantId,
|
|
123
123
|
},
|
package/src/index.ts
CHANGED
package/src/types/ISIOPv2RP.ts
CHANGED
|
@@ -2,40 +2,37 @@ import {
|
|
|
2
2
|
AuthorizationRequestPayload,
|
|
3
3
|
AuthorizationRequestState,
|
|
4
4
|
AuthorizationResponsePayload,
|
|
5
|
-
|
|
5
|
+
AuthorizationResponseStateWithVerifiedData,
|
|
6
|
+
CallbackOpts,
|
|
6
7
|
ClaimPayloadCommonOpts,
|
|
7
8
|
ClientMetadataOpts,
|
|
8
9
|
IRPSessionManager,
|
|
9
|
-
PresentationDefinitionWithLocation,
|
|
10
10
|
PresentationVerificationCallback,
|
|
11
11
|
RequestObjectPayload,
|
|
12
12
|
ResponseMode,
|
|
13
13
|
ResponseURIType,
|
|
14
14
|
SupportedVersion,
|
|
15
|
-
VerifiablePresentationTypeFormat,
|
|
16
15
|
VerifiedAuthorizationResponse,
|
|
17
16
|
VerifyJwtCallback,
|
|
18
|
-
VPTokenLocation,
|
|
19
17
|
} from '@sphereon/did-auth-siop'
|
|
20
|
-
import {
|
|
21
|
-
import { IAgentContext, ICredentialIssuer, ICredentialVerifier, IDIDManager, IKeyManager, IPluginMethodMap, IResolver } from '@veramo/core'
|
|
22
|
-
import { AdditionalClaims, DcqlQueryREST, HasherSync, W3CVerifiablePresentation } from '@sphereon/ssi-types'
|
|
23
|
-
|
|
24
|
-
import { Resolvable } from 'did-resolver'
|
|
18
|
+
import { CheckLinkedDomain } from '@sphereon/did-auth-siop-adapter'
|
|
25
19
|
import { DIDDocument } from '@sphereon/did-uni-client'
|
|
26
|
-
import {
|
|
20
|
+
import { JwtIssuer } from '@sphereon/oid4vc-common'
|
|
27
21
|
import { IPresentationDefinition } from '@sphereon/pex'
|
|
28
22
|
import { IDIDOptions } from '@sphereon/ssi-sdk-ext.did-utils'
|
|
29
|
-
import {
|
|
30
|
-
import { VerifyCallback } from '@sphereon/wellknown-dids-client'
|
|
31
|
-
import { AuthorizationRequestStateStatus } from '@sphereon/ssi-sdk.siopv2-oid4vp-common'
|
|
32
|
-
import { IPDManager, VersionControlMode } from '@sphereon/ssi-sdk.pd-manager'
|
|
33
|
-
import { CheckLinkedDomain } from '@sphereon/did-auth-siop-adapter'
|
|
34
|
-
import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt'
|
|
23
|
+
import { ExternalIdentifierOIDFEntityIdOpts, IIdentifierResolution, ManagedIdentifierOptsOrResult } from '@sphereon/ssi-sdk-ext.identifier-resolution'
|
|
35
24
|
import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service'
|
|
36
|
-
import { JwtIssuer } from '@sphereon/oid4vc-common'
|
|
37
|
-
import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc'
|
|
38
25
|
import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation'
|
|
26
|
+
import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc'
|
|
27
|
+
import { IPDManager, VersionControlMode } from '@sphereon/ssi-sdk.pd-manager'
|
|
28
|
+
import { IPresentationExchange } from '@sphereon/ssi-sdk.presentation-exchange'
|
|
29
|
+
import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt'
|
|
30
|
+
import { AuthorizationRequestStateStatus } from '@sphereon/ssi-sdk.siopv2-oid4vp-common'
|
|
31
|
+
import { DcqlQueryPayload, HasherSync } from '@sphereon/ssi-types'
|
|
32
|
+
import { VerifyCallback } from '@sphereon/wellknown-dids-client'
|
|
33
|
+
import { IAgentContext, ICredentialIssuer, ICredentialVerifier, IDIDManager, IKeyManager, IPluginMethodMap, IResolver } from '@veramo/core'
|
|
34
|
+
import { Resolvable } from 'did-resolver'
|
|
35
|
+
import { EventEmitter } from 'events'
|
|
39
36
|
|
|
40
37
|
export enum VerifiedDataMode {
|
|
41
38
|
NONE = 'none',
|
|
@@ -55,7 +52,6 @@ export interface ISIOPv2RP extends IPluginMethodMap {
|
|
|
55
52
|
siopDeleteAuthState(args: IDeleteAuthStateArgs, context: IRequiredContext): Promise<boolean>
|
|
56
53
|
siopVerifyAuthResponse(args: IVerifyAuthResponseStateArgs, context: IRequiredContext): Promise<VerifiedAuthorizationResponse>
|
|
57
54
|
siopImportDefinitions(args: ImportDefinitionsArgs, context: IRequiredContext): Promise<void>
|
|
58
|
-
|
|
59
55
|
siopGetRedirectURI(args: IGetRedirectUriArgs, context: IRequiredContext): Promise<string | undefined>
|
|
60
56
|
}
|
|
61
57
|
|
|
@@ -67,8 +63,9 @@ export interface ISiopv2RPOpts {
|
|
|
67
63
|
export interface IRPDefaultOpts extends IRPOptions {}
|
|
68
64
|
|
|
69
65
|
export interface ICreateAuthRequestArgs {
|
|
70
|
-
|
|
66
|
+
queryId: string
|
|
71
67
|
correlationId: string
|
|
68
|
+
useQueryIdInstance?: boolean
|
|
72
69
|
responseURIType: ResponseURIType
|
|
73
70
|
responseURI: string
|
|
74
71
|
responseRedirectURI?: string
|
|
@@ -77,24 +74,25 @@ export interface ICreateAuthRequestArgs {
|
|
|
77
74
|
nonce?: string
|
|
78
75
|
state?: string
|
|
79
76
|
claims?: ClaimPayloadCommonOpts
|
|
77
|
+
callback?: CallbackOpts
|
|
80
78
|
}
|
|
81
79
|
|
|
82
80
|
export interface IGetAuthRequestStateArgs {
|
|
83
81
|
correlationId: string
|
|
84
|
-
|
|
82
|
+
queryId?: string
|
|
85
83
|
errorOnNotFound?: boolean
|
|
86
84
|
}
|
|
87
85
|
|
|
88
86
|
export interface IGetAuthResponseStateArgs {
|
|
89
87
|
correlationId: string
|
|
90
|
-
|
|
88
|
+
queryId?: string
|
|
91
89
|
errorOnNotFound?: boolean
|
|
92
90
|
progressRequestStateTo?: AuthorizationRequestStateStatus
|
|
93
91
|
includeVerifiedData?: VerifiedDataMode
|
|
94
92
|
}
|
|
95
93
|
|
|
96
94
|
export interface IUpdateRequestStateArgs {
|
|
97
|
-
|
|
95
|
+
queryId: string
|
|
98
96
|
correlationId: string
|
|
99
97
|
state: AuthorizationRequestStateStatus
|
|
100
98
|
error?: string
|
|
@@ -102,25 +100,24 @@ export interface IUpdateRequestStateArgs {
|
|
|
102
100
|
|
|
103
101
|
export interface IDeleteAuthStateArgs {
|
|
104
102
|
correlationId: string
|
|
105
|
-
|
|
103
|
+
queryId?: string
|
|
106
104
|
}
|
|
107
105
|
|
|
108
106
|
export interface IVerifyAuthResponseStateArgs {
|
|
109
107
|
authorizationResponse: string | AuthorizationResponsePayload
|
|
110
|
-
|
|
108
|
+
queryId?: string
|
|
111
109
|
correlationId: string
|
|
112
110
|
audience?: string
|
|
113
|
-
|
|
114
|
-
dcqlQuery?: DcqlQueryREST
|
|
111
|
+
dcqlQueryPayload?: DcqlQueryPayload
|
|
115
112
|
}
|
|
116
113
|
|
|
117
114
|
export interface IDefinitionPair {
|
|
118
|
-
definitionPayload
|
|
119
|
-
dcqlPayload?:
|
|
115
|
+
definitionPayload?: IPresentationDefinition
|
|
116
|
+
dcqlPayload?: DcqlQueryPayload
|
|
120
117
|
}
|
|
121
118
|
|
|
122
119
|
export interface ImportDefinitionsArgs {
|
|
123
|
-
|
|
120
|
+
queries: Array<IDefinitionPair>
|
|
124
121
|
tenantId?: string
|
|
125
122
|
version?: string
|
|
126
123
|
versionControlMode?: VersionControlMode
|
|
@@ -128,7 +125,7 @@ export interface ImportDefinitionsArgs {
|
|
|
128
125
|
|
|
129
126
|
export interface IGetRedirectUriArgs {
|
|
130
127
|
correlationId: string
|
|
131
|
-
|
|
128
|
+
queryId?: string
|
|
132
129
|
state?: string
|
|
133
130
|
}
|
|
134
131
|
|
|
@@ -144,7 +141,7 @@ export interface IPEXDefinitionPersistArgs extends IPEXInstanceOptions {
|
|
|
144
141
|
}
|
|
145
142
|
|
|
146
143
|
export interface ISiopRPInstanceArgs {
|
|
147
|
-
|
|
144
|
+
queryId?: string
|
|
148
145
|
responseRedirectURI?: string
|
|
149
146
|
}
|
|
150
147
|
|
|
@@ -169,7 +166,7 @@ export interface IRPOptions {
|
|
|
169
166
|
export interface IPEXOptions {
|
|
170
167
|
presentationVerifyCallback?: PresentationVerificationCallback
|
|
171
168
|
// definition?: IPresentationDefinition
|
|
172
|
-
|
|
169
|
+
queryId: string
|
|
173
170
|
version?: string
|
|
174
171
|
tenantId?: string
|
|
175
172
|
}
|
|
@@ -186,17 +183,9 @@ export interface PerDidResolver {
|
|
|
186
183
|
export interface IAuthRequestDetails {
|
|
187
184
|
rpDIDDocument?: DIDDocument
|
|
188
185
|
id: string
|
|
189
|
-
verifiablePresentationMatches: IPresentationWithDefinition[]
|
|
190
186
|
alsoKnownAs?: string[]
|
|
191
187
|
}
|
|
192
188
|
|
|
193
|
-
export interface IPresentationWithDefinition {
|
|
194
|
-
location: VPTokenLocation
|
|
195
|
-
definition: PresentationDefinitionWithLocation
|
|
196
|
-
format: VerifiablePresentationTypeFormat
|
|
197
|
-
presentation: W3CVerifiablePresentation
|
|
198
|
-
}
|
|
199
|
-
|
|
200
189
|
export interface ISIOPIdentifierOptions extends Omit<IDIDOptions, 'idOpts'> {
|
|
201
190
|
// we replace the legacy idOpts with the Managed Identifier opts from the identifier resolution module
|
|
202
191
|
idOpts: ManagedIdentifierOptsOrResult
|
|
@@ -210,10 +199,6 @@ export type CredentialOpts = {
|
|
|
210
199
|
hasher?: HasherSync
|
|
211
200
|
}
|
|
212
201
|
|
|
213
|
-
export interface AuthorizationResponseStateWithVerifiedData extends AuthorizationResponseState {
|
|
214
|
-
verifiedData?: AdditionalClaims
|
|
215
|
-
}
|
|
216
|
-
|
|
217
202
|
export type IRequiredContext = IAgentContext<
|
|
218
203
|
IResolver &
|
|
219
204
|
IDIDManager &
|