@mosip/react-inji-verify-sdk 0.16.0 → 0.17.0-beta.11
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/README.md
CHANGED
|
@@ -130,6 +130,7 @@ https://your-backend.com
|
|
|
130
130
|
isEnableScan={true} // Allow camera scanning
|
|
131
131
|
isEnableZoom={true} // Allow camera zoom
|
|
132
132
|
isVPSubmissionSupported={false} // This attribute indicates whether VP submission is supported in Inji OVP VC sharing flow. By default, it is false which means that VP token will be directly sent in response. If set to true, then VP token will be submitted to the VP_SUBMISSION_ URL.
|
|
133
|
+
acceptVPWithoutHolderProof={false} // This attribute controls whether unsigned Verifiable Presentations (VPs without proof) are allowed in the Inji OVP VC sharing flow. By default, it is set to false, meaning unsigned VP tokens are not supported and an error is thrown if an unsigned VP is received. If set to true, VP tokens without a signature (proof) are allowed and can be verified. For data-share it is set to true by default.
|
|
133
134
|
/>
|
|
134
135
|
```
|
|
135
136
|
|
|
@@ -206,13 +207,14 @@ presentationDefinition={{
|
|
|
206
207
|
|
|
207
208
|
### Common Props (Both Components)
|
|
208
209
|
|
|
209
|
-
| Property
|
|
210
|
-
|
|
211
|
-
| `verifyServiceUrl`
|
|
212
|
-
| `onError`
|
|
213
|
-
| `triggerElement`
|
|
214
|
-
| `transactionId`
|
|
215
|
-
| `clientId`
|
|
210
|
+
| Property | Type | Required | Description |
|
|
211
|
+
|----------------------------------|---------------|----------|---------------------------------------------|
|
|
212
|
+
| `verifyServiceUrl` | string | ✅ | Backend verification URL |
|
|
213
|
+
| `onError` | function | ✅ | Callback invoked when an error occurs |
|
|
214
|
+
| `triggerElement` | React element | ❌ | Custom button/element to start verification |
|
|
215
|
+
| `transactionId` | string | ❌ | Optional client-side tracking ID |
|
|
216
|
+
| `clientId` | string | ✅ | Client identifier |
|
|
217
|
+
| `acceptVPWithoutHolderProof` | boolean | ❌ | Allow unsigned Verifiable Presentations |
|
|
216
218
|
|
|
217
219
|
### QRCodeVerification Specific
|
|
218
220
|
|
|
@@ -19,6 +19,7 @@ export interface VPRequestBody {
|
|
|
19
19
|
transactionId?: string;
|
|
20
20
|
presentationDefinitionId?: string;
|
|
21
21
|
presentationDefinition?: PresentationDefinition;
|
|
22
|
+
acceptVPWithoutHolderProof?: boolean;
|
|
22
23
|
}
|
|
23
24
|
type ExclusivePresentationDefinition =
|
|
24
25
|
/**
|
|
@@ -75,41 +76,34 @@ export interface PresentationDefinition {
|
|
|
75
76
|
}
|
|
76
77
|
export type OpenID4VPVerificationProps = ExclusivePresentationDefinition & ExclusiveCallbacks & {
|
|
77
78
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
If not provided, the component may automatically start the process.
|
|
82
|
-
*/
|
|
79
|
+
React element that triggers the verification process (e.g., a button).
|
|
80
|
+
If not provided, the component may automatically start the process.
|
|
81
|
+
*/
|
|
83
82
|
triggerElement?: React.ReactNode;
|
|
84
83
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
*/
|
|
84
|
+
The backend service URL where the verification request will be sent.
|
|
85
|
+
*/
|
|
88
86
|
verifyServiceUrl: string;
|
|
89
87
|
/**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
*/
|
|
88
|
+
The client identifier for relaying party.
|
|
89
|
+
*/
|
|
93
90
|
clientId: string;
|
|
94
91
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*/
|
|
92
|
+
The protocol being used for verification (e.g., OpenID4VP).
|
|
93
|
+
*/
|
|
98
94
|
protocol?: string;
|
|
99
95
|
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
*/
|
|
96
|
+
A unique identifier for the transaction.
|
|
97
|
+
*/
|
|
103
98
|
transactionId?: string;
|
|
104
99
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
Indicates whether the same device flow is enabled.
|
|
101
|
+
Defaults to true, allowing verification on the same device.
|
|
102
|
+
*/
|
|
108
103
|
isSameDeviceFlowEnabled?: boolean;
|
|
109
104
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*/
|
|
105
|
+
Styling options for the QR code.
|
|
106
|
+
*/
|
|
113
107
|
qrCodeStyles?: {
|
|
114
108
|
size?: number;
|
|
115
109
|
level?: "L" | "M" | "Q" | "H";
|
|
@@ -127,6 +121,11 @@ export type OpenID4VPVerificationProps = ExclusivePresentationDefinition & Exclu
|
|
|
127
121
|
* This is a required field to ensure proper error handling.
|
|
128
122
|
*/
|
|
129
123
|
onError: (error: AppError) => void;
|
|
124
|
+
/**
|
|
125
|
+
Indicates whether to accept VP submissions without holder proof.
|
|
126
|
+
When true, allows unsigned VPs (VPs without proof).
|
|
127
|
+
*/
|
|
128
|
+
acceptVPWithoutHolderProof?: boolean;
|
|
130
129
|
};
|
|
131
130
|
export interface SessionState {
|
|
132
131
|
requestId: string;
|
|
@@ -76,6 +76,11 @@ export type QRCodeVerificationProps = ExclusiveCallbacks & {
|
|
|
76
76
|
* Defaults to false.
|
|
77
77
|
*/
|
|
78
78
|
isVPSubmissionSupported?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
Indicates whether to accept VP submissions without holder proof.
|
|
81
|
+
When true, allows unsigned VPs (VPs without proof).
|
|
82
|
+
*/
|
|
83
|
+
acceptVPWithoutHolderProof?: boolean;
|
|
79
84
|
};
|
|
80
85
|
interface VerificationResult {
|
|
81
86
|
/**
|