@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.32.1-feature.VDX.341.57 → 0.32.1-feature.oid4vp.rest.api.improv.bootcamp.187
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/agent/DidAuthSiopOpAuthenticator.d.ts +5 -5
- package/dist/agent/DidAuthSiopOpAuthenticator.d.ts.map +1 -1
- package/dist/agent/DidAuthSiopOpAuthenticator.js +85 -64
- package/dist/agent/DidAuthSiopOpAuthenticator.js.map +1 -1
- package/dist/services/Siopv2MachineService.d.ts +3 -2
- package/dist/services/Siopv2MachineService.d.ts.map +1 -1
- package/dist/services/Siopv2MachineService.js +4 -4
- package/dist/services/Siopv2MachineService.js.map +1 -1
- package/dist/session/OpSession.d.ts.map +1 -1
- package/dist/session/OpSession.js +3 -3
- package/dist/session/OpSession.js.map +1 -1
- package/dist/types/IDidAuthSiopOpAuthenticator.d.ts +6 -2
- package/dist/types/IDidAuthSiopOpAuthenticator.d.ts.map +1 -1
- package/dist/types/IDidAuthSiopOpAuthenticator.js.map +1 -1
- package/dist/types/machine/index.d.ts +1 -0
- package/dist/types/machine/index.d.ts.map +1 -1
- package/dist/types/machine/index.js.map +1 -1
- package/dist/types/siop-service/index.d.ts +20 -5
- package/dist/types/siop-service/index.d.ts.map +1 -1
- package/dist/types/siop-service/index.js.map +1 -1
- package/package.json +18 -18
- package/src/agent/DidAuthSiopOpAuthenticator.ts +109 -96
- package/src/services/Siopv2MachineService.ts +6 -4
- package/src/session/OpSession.ts +7 -5
- package/src/types/IDidAuthSiopOpAuthenticator.ts +14 -2
- package/src/types/machine/index.ts +1 -0
- package/src/types/siop-service/index.ts +22 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
DcqlResponseOpts,
|
|
3
3
|
PresentationDefinitionWithLocation,
|
|
4
4
|
PresentationSignCallback,
|
|
5
5
|
ResponseMode,
|
|
@@ -123,8 +123,9 @@ export interface IOpsSendSiopAuthorizationResponseArgs {
|
|
|
123
123
|
// verifiedAuthorizationRequest: VerifiedAuthorizationRequest
|
|
124
124
|
presentationSubmission?: PresentationSubmission
|
|
125
125
|
verifiablePresentations?: W3CVerifiablePresentation[]
|
|
126
|
-
|
|
126
|
+
dcqlResponse?: DcqlResponseOpts
|
|
127
127
|
hasher?: Hasher
|
|
128
|
+
isFirstParty?: boolean
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
export enum events {
|
|
@@ -199,4 +200,15 @@ export interface IGetPresentationExchangeArgs {
|
|
|
199
200
|
hasher?: Hasher
|
|
200
201
|
}
|
|
201
202
|
|
|
203
|
+
// It was added here because it's not exported from DCQL anymore
|
|
204
|
+
export type Json =
|
|
205
|
+
| string
|
|
206
|
+
| number
|
|
207
|
+
| boolean
|
|
208
|
+
| null
|
|
209
|
+
| {
|
|
210
|
+
[key: string]: Json
|
|
211
|
+
}
|
|
212
|
+
| Json[]
|
|
213
|
+
|
|
202
214
|
export const DEFAULT_JWT_PROOF_TYPE = 'JwtProof2020'
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
PresentationDefinitionWithLocation,
|
|
3
|
+
PresentationSignCallback,
|
|
4
|
+
RPRegistrationMetadataPayload, VerifiedAuthorizationRequest
|
|
5
|
+
} from '@sphereon/did-auth-siop'
|
|
2
6
|
import { IIdentifierResolution, ManagedIdentifierOptsOrResult } from '@sphereon/ssi-sdk-ext.identifier-resolution'
|
|
3
7
|
import { IContactManager } from '@sphereon/ssi-sdk.contact-manager'
|
|
4
8
|
import { ICredentialStore, UniqueDigitalCredential } from '@sphereon/ssi-sdk.credential-store'
|
|
@@ -8,10 +12,14 @@ import { IAgentContext, IDIDManager, IIdentifier, IResolver } from '@veramo/core
|
|
|
8
12
|
import { IDidAuthSiopOpAuthenticator } from '../IDidAuthSiopOpAuthenticator'
|
|
9
13
|
import { Siopv2MachineContext, Siopv2MachineInterpreter, Siopv2MachineState } from '../machine'
|
|
10
14
|
import { DcqlQuery } from 'dcql'
|
|
15
|
+
import { Hasher } from '@sphereon/ssi-types'
|
|
11
16
|
|
|
12
17
|
export type DidAuthSiopOpAuthenticatorOptions = {
|
|
18
|
+
presentationSignCallback?: PresentationSignCallback
|
|
19
|
+
customApprovals?: Record<string, (verifiedAuthorizationRequest: VerifiedAuthorizationRequest, sessionId: string) => Promise<void>>
|
|
13
20
|
onContactIdentityCreated?: (args: OnContactIdentityCreatedArgs) => Promise<void>
|
|
14
21
|
onIdentifierCreated?: (args: OnIdentifierCreatedArgs) => Promise<void>
|
|
22
|
+
hasher?: Hasher
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
export type GetMachineArgs = {
|
|
@@ -20,12 +28,21 @@ export type GetMachineArgs = {
|
|
|
20
28
|
stateNavigationListener?: (siopv2Machine: Siopv2MachineInterpreter, state: Siopv2MachineState, navigation?: any) => Promise<void>
|
|
21
29
|
}
|
|
22
30
|
|
|
23
|
-
export type CreateConfigArgs =
|
|
31
|
+
export type CreateConfigArgs = { url: string }
|
|
24
32
|
export type CreateConfigResult = Omit<DidAuthConfig, 'stateId' | 'idOpts'>
|
|
25
|
-
export type GetSiopRequestArgs =
|
|
33
|
+
export type GetSiopRequestArgs = { didAuthConfig?: Omit<DidAuthConfig, 'identifier'>, url: string }
|
|
34
|
+
// FIXME it would be nicer if these function are not tied to a certain machine so that we can start calling them for anywhere
|
|
26
35
|
export type RetrieveContactArgs = Pick<Siopv2MachineContext, 'url' | 'authorizationRequestData'>
|
|
36
|
+
// FIXME it would be nicer if these function are not tied to a certain machine so that we can start calling them for anywhere
|
|
27
37
|
export type AddIdentityArgs = Pick<Siopv2MachineContext, 'contact' | 'authorizationRequestData'>
|
|
28
|
-
export type SendResponseArgs =
|
|
38
|
+
export type SendResponseArgs = {
|
|
39
|
+
didAuthConfig?: Omit<DidAuthConfig, 'identifier'>,
|
|
40
|
+
authorizationRequestData?: Siopv2AuthorizationRequestData,
|
|
41
|
+
selectedCredentials: Array<UniqueDigitalCredential>
|
|
42
|
+
idOpts?: ManagedIdentifierOptsOrResult
|
|
43
|
+
isFirstParty?: boolean
|
|
44
|
+
}
|
|
45
|
+
// FIXME it would be nicer if these function are not tied to a certain machine so that we can start calling them for anywhere
|
|
29
46
|
export type GetSelectableCredentialsArgs = Pick<Siopv2MachineContext, 'authorizationRequestData'>
|
|
30
47
|
|
|
31
48
|
export enum Siopv2HolderEvent {
|
|
@@ -39,7 +56,7 @@ export enum SupportedLanguage {
|
|
|
39
56
|
}
|
|
40
57
|
|
|
41
58
|
export type Siopv2AuthorizationResponseData = {
|
|
42
|
-
body?: string
|
|
59
|
+
body?: string | Record<string, any>
|
|
43
60
|
url?: string
|
|
44
61
|
queryParams?: Record<string, any>
|
|
45
62
|
}
|