@opencrvs/mosip 1.7.0-alpha.7 → 1.7.0-alpha.9
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/build/forms.d.ts +1 -1
- package/build/forms.js +3 -3
- package/package.json +1 -1
- package/src/forms.ts +6 -6
package/build/forms.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const popupButton: ({ url }: {
|
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
52
|
*
|
|
53
|
-
* @description esignet callback button form definition. Calls
|
|
53
|
+
* @description esignet callback button form definition. Calls mosip-api/esignet-api /esignet/get-oidp-user-info (this field may not be supported in the latest release of OpenCRVS yet)
|
|
54
54
|
*
|
|
55
55
|
*/
|
|
56
56
|
export declare const esignetCallback: ({ fieldName, event, sectionId, getOIDPUserInfoUrl, openIdProviderClientId }: {
|
package/build/forms.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.idVerificationFields = exports.idPendingVerificationBanner = exports.ver
|
|
|
17
17
|
* @description E-Signet REDIRECT button form definition. Calls E-Signet /authorize (this field may not be supported in the latest release of OpenCRVS yet)
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
|
-
const esignet = (event, sectionId, esignetAuthUrl, openIdProviderClientId, openIdProviderClaims =
|
|
20
|
+
const esignet = (event, sectionId, esignetAuthUrl, openIdProviderClientId, openIdProviderClaims = 'name,family_name,given_name,middle_name,birthdate,address', fieldName, callbackFieldName) => {
|
|
21
21
|
const url = new URL(esignetAuthUrl);
|
|
22
22
|
url.searchParams.append('client_id', openIdProviderClientId || 'mock-client_id');
|
|
23
23
|
url.searchParams.append('response_type', 'code');
|
|
@@ -70,7 +70,7 @@ url }) => {
|
|
|
70
70
|
exports.popupButton = popupButton;
|
|
71
71
|
/**
|
|
72
72
|
*
|
|
73
|
-
* @description esignet callback button form definition. Calls
|
|
73
|
+
* @description esignet callback button form definition. Calls mosip-api/esignet-api /esignet/get-oidp-user-info (this field may not be supported in the latest release of OpenCRVS yet)
|
|
74
74
|
*
|
|
75
75
|
*/
|
|
76
76
|
const esignetCallback = ({ fieldName, event, sectionId, getOIDPUserInfoUrl, openIdProviderClientId }) => ({
|
|
@@ -89,7 +89,7 @@ const esignetCallback = ({ fieldName, event, sectionId, getOIDPUserInfoUrl, open
|
|
|
89
89
|
},
|
|
90
90
|
body: {
|
|
91
91
|
clientId: openIdProviderClientId,
|
|
92
|
-
redirectUri:
|
|
92
|
+
redirectUri: '${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}'
|
|
93
93
|
},
|
|
94
94
|
method: 'POST'
|
|
95
95
|
}
|
package/package.json
CHANGED
package/src/forms.ts
CHANGED
|
@@ -21,7 +21,7 @@ export const esignet = (
|
|
|
21
21
|
sectionId: string,
|
|
22
22
|
esignetAuthUrl: string,
|
|
23
23
|
openIdProviderClientId: string,
|
|
24
|
-
openIdProviderClaims: string =
|
|
24
|
+
openIdProviderClaims: string = 'name,family_name,given_name,middle_name,birthdate,address',
|
|
25
25
|
fieldName: string,
|
|
26
26
|
callbackFieldName: string
|
|
27
27
|
) => {
|
|
@@ -39,8 +39,7 @@ export const esignet = (
|
|
|
39
39
|
url.searchParams.append(
|
|
40
40
|
'redirect_uri',
|
|
41
41
|
'${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}'
|
|
42
|
-
)
|
|
43
|
-
|
|
42
|
+
);
|
|
44
43
|
|
|
45
44
|
return {
|
|
46
45
|
name: fieldName,
|
|
@@ -89,7 +88,7 @@ export const popupButton = ({
|
|
|
89
88
|
|
|
90
89
|
/**
|
|
91
90
|
*
|
|
92
|
-
* @description esignet callback button form definition. Calls
|
|
91
|
+
* @description esignet callback button form definition. Calls mosip-api/esignet-api /esignet/get-oidp-user-info (this field may not be supported in the latest release of OpenCRVS yet)
|
|
93
92
|
*
|
|
94
93
|
*/
|
|
95
94
|
|
|
@@ -121,9 +120,10 @@ export const esignetCallback = ({
|
|
|
121
120
|
},
|
|
122
121
|
body: {
|
|
123
122
|
clientId: openIdProviderClientId,
|
|
124
|
-
redirectUri:
|
|
123
|
+
redirectUri:
|
|
124
|
+
'${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}'
|
|
125
125
|
},
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
method: 'POST'
|
|
128
128
|
}
|
|
129
129
|
});
|