cidaas-javascript-sdk 4.3.3 → 5.1.0
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/CHANGELOG.md +40 -4
- package/README.md +156 -94
- package/dist/authentication-service/AuthenticationService.d.ts +140 -0
- package/dist/authentication-service/AuthenticationService.js +210 -0
- package/dist/{authentication/Authentication.model.d.ts → authentication-service/AuthenticationService.model.d.ts} +18 -12
- package/dist/{authentication/Authentication.model.js → authentication-service/AuthenticationService.model.js} +2 -2
- package/dist/common/Common.model.d.ts +15 -19
- package/dist/common/Common.model.js +17 -17
- package/dist/common/ConfigUserProvider.d.ts +10 -0
- package/dist/common/ConfigUserProvider.js +28 -0
- package/dist/common/Helper.d.ts +7 -0
- package/dist/common/Helper.js +19 -0
- package/dist/common/User.model.d.ts +0 -4
- package/dist/consent-service/ConsentService.d.ts +99 -95
- package/dist/consent-service/ConsentService.js +125 -122
- package/dist/consent-service/ConsentService.model.d.ts +14 -16
- package/dist/device-service/DeviceService.d.ts +49 -0
- package/dist/device-service/DeviceService.js +79 -0
- package/dist/device-service/DeviceService.model.d.ts +6 -0
- package/dist/id-validation-service/IdValidationService.d.ts +28 -0
- package/dist/id-validation-service/IdValidationService.js +59 -0
- package/dist/id-validation-service/IdValidationService.model.d.ts +8 -0
- package/dist/id-validation-service/IdValidationService.model.js +2 -0
- package/dist/index.d.ts +22 -3
- package/dist/index.js +35 -18
- package/dist/login-service/LoginService.d.ts +143 -141
- package/dist/login-service/LoginService.js +255 -232
- package/dist/login-service/LoginService.model.d.ts +9 -51
- package/dist/login-service/LoginService.model.js +1 -1
- package/dist/public-service/PublicService.d.ts +57 -0
- package/dist/public-service/PublicService.js +73 -0
- package/dist/public-service/PublicService.model.d.ts +20 -0
- package/dist/public-service/PublicService.model.js +2 -0
- package/dist/token-service/TokenService.d.ts +104 -138
- package/dist/token-service/TokenService.js +164 -219
- package/dist/token-service/TokenService.model.d.ts +3 -44
- package/dist/token-service/TokenService.model.js +3 -16
- package/dist/user-service/UserService.d.ts +381 -315
- package/dist/user-service/UserService.js +552 -426
- package/dist/user-service/UserService.model.d.ts +48 -14
- package/dist/user-service/UserService.model.js +4 -4
- package/dist/verification-service/VerificationService.d.ts +281 -223
- package/dist/verification-service/VerificationService.js +343 -287
- package/dist/verification-service/VerificationService.model.d.ts +4 -5
- package/package.json +6 -4
- package/dist/authentication/Authentication.d.ts +0 -139
- package/dist/authentication/Authentication.js +0 -186
- package/dist/web-auth/WebAuth.d.ts +0 -665
- package/dist/web-auth/WebAuth.js +0 -955
- package/dist/web-auth/webauth.model.d.ts +0 -66
- /package/dist/{web-auth/webauth.model.js → device-service/DeviceService.model.js} +0 -0
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { ProcessingType } from "../common/Common.model";
|
|
2
2
|
import { CidaasUser } from "../common/User.model";
|
|
3
3
|
export interface GetUserProfileRequest {
|
|
4
|
-
/** Access token needed to authorized api call */
|
|
5
|
-
access_token
|
|
4
|
+
/** Access token needed to authorized api call. If not provided, access token from UserStorage will be used. */
|
|
5
|
+
access_token?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GetRegistrationSetupRequest {
|
|
8
|
+
/** Request id returned from the authorization call */
|
|
9
|
+
requestId: string;
|
|
10
|
+
/** Response language, which is configured in cidaas admin ui */
|
|
11
|
+
acceptlanguage?: string;
|
|
6
12
|
}
|
|
7
13
|
export interface RegisterRequest extends CidaasUser {
|
|
8
14
|
/** id which is generated during user invitation process */
|
|
@@ -14,21 +20,19 @@ export interface GetInviteUserDetailsRequest {
|
|
|
14
20
|
/** described whether latest api or legacy api should be called */
|
|
15
21
|
callLatestAPI?: boolean;
|
|
16
22
|
}
|
|
17
|
-
export interface
|
|
23
|
+
export interface GetCommunicationStatusRequest {
|
|
18
24
|
/** Subject (User) identifier */
|
|
19
25
|
sub: string;
|
|
20
26
|
}
|
|
21
27
|
export interface InitiateResetPasswordRequest {
|
|
22
28
|
/**
|
|
23
29
|
* Type of medium to be used to reset password
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
resetMedium: ResetMedium | string;
|
|
30
|
+
*/
|
|
31
|
+
resetMedium: ResetMedium;
|
|
27
32
|
/**
|
|
28
33
|
* defines whether the password can be resetted via email link or whether the user needs to enter a code to complete the reset password process.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
processingType: ProcessingType | string;
|
|
34
|
+
*/
|
|
35
|
+
processingType: ProcessingType;
|
|
32
36
|
/** Email of the user */
|
|
33
37
|
email?: string;
|
|
34
38
|
/** Mobile number of the user */
|
|
@@ -105,10 +109,10 @@ export interface InitiateLinkAccountRequest {
|
|
|
105
109
|
user_name_to_link: string;
|
|
106
110
|
}
|
|
107
111
|
export interface DeleteUserAccountRequest {
|
|
108
|
-
/** Access token needed to authorized api call */
|
|
109
|
-
access_token?: string;
|
|
110
112
|
/** Subject (User) identifier */
|
|
111
113
|
sub: string;
|
|
114
|
+
/** Access token needed to authorized api call. If not provided, access token from UserStorage will be used. */
|
|
115
|
+
access_token?: string;
|
|
112
116
|
}
|
|
113
117
|
export interface CompleteLinkAccountRequest {
|
|
114
118
|
/** code will be sent to account to be linked */
|
|
@@ -134,9 +138,39 @@ export interface UserCheckExistsRequest {
|
|
|
134
138
|
/** If filled, will be sent as query parameter */
|
|
135
139
|
webfinger?: string;
|
|
136
140
|
}
|
|
141
|
+
export interface GetUserActivitiesRequest {
|
|
142
|
+
/** sub of user to get its activities */
|
|
143
|
+
sub: string;
|
|
144
|
+
/** limits activities number to be shown */
|
|
145
|
+
size?: number;
|
|
146
|
+
/** shows activities starting from the 'from' number. Default is 0 */
|
|
147
|
+
from?: number;
|
|
148
|
+
/** if true, the activites will be sorted with the latest one at start */
|
|
149
|
+
descending?: boolean;
|
|
150
|
+
/** activities are shown based on the dateFilter */
|
|
151
|
+
dateFilter?: DateFilter;
|
|
152
|
+
}
|
|
153
|
+
export interface UserActionOnEnrollmentRequest {
|
|
154
|
+
/** action to be executed */
|
|
155
|
+
action: string;
|
|
156
|
+
}
|
|
157
|
+
export interface UpdateProfileImageRequest {
|
|
158
|
+
/** id for the image */
|
|
159
|
+
image_key: string;
|
|
160
|
+
/** name of the image */
|
|
161
|
+
filename: string;
|
|
162
|
+
/** image file */
|
|
163
|
+
photo: Blob;
|
|
164
|
+
}
|
|
165
|
+
export interface DateFilter {
|
|
166
|
+
/** earliest time to show activities */
|
|
167
|
+
from_date: string;
|
|
168
|
+
/** latest time to show activities */
|
|
169
|
+
to_date: string;
|
|
170
|
+
}
|
|
137
171
|
/** Type of medium to be used to reset password */
|
|
138
172
|
export declare enum ResetMedium {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
173
|
+
Sms = "SMS",
|
|
174
|
+
Email = "EMAIL",
|
|
175
|
+
Ivr = "IVR"
|
|
142
176
|
}
|
|
@@ -4,7 +4,7 @@ exports.ResetMedium = void 0;
|
|
|
4
4
|
/** Type of medium to be used to reset password */
|
|
5
5
|
var ResetMedium;
|
|
6
6
|
(function (ResetMedium) {
|
|
7
|
-
ResetMedium[
|
|
8
|
-
ResetMedium[
|
|
9
|
-
ResetMedium[
|
|
10
|
-
})(ResetMedium
|
|
7
|
+
ResetMedium["Sms"] = "SMS";
|
|
8
|
+
ResetMedium["Email"] = "EMAIL";
|
|
9
|
+
ResetMedium["Ivr"] = "IVR";
|
|
10
|
+
})(ResetMedium || (exports.ResetMedium = ResetMedium = {}));
|
|
@@ -1,225 +1,283 @@
|
|
|
1
1
|
import { HTTPRequestHeader } from "../common/Common.model";
|
|
2
|
+
import ConfigUserProvider from "../common/ConfigUserProvider";
|
|
2
3
|
import { AuthenticateMFARequest, CancelMFARequest, CheckVerificationTypeConfiguredRequest, ConfigureFriendlyNameRequest, ConfigureVerificationRequest, EnrollVerificationRequest, GetMFAListRequest, InitiateAccountVerificationRequest, InitiateEnrollmentRequest, InitiateMFARequest, InitiateVerificationRequest, VerifyAccountRequest } from "./VerificationService.model";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
4
|
+
export declare class VerificationService {
|
|
5
|
+
private config;
|
|
6
|
+
private userManager;
|
|
7
|
+
constructor(configUserProvider: ConfigUserProvider);
|
|
8
|
+
/**
|
|
9
|
+
* To initiate the account verification, call **initiateAccountVerification()**. This will send verification code email or sms or ivr based on the verificationMedium you mentioned.
|
|
10
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/cgans5erj5alg-init-account-verification for more details.
|
|
11
|
+
* @example
|
|
12
|
+
* ```js
|
|
13
|
+
* cidaasVerificationService.initiateAccountVerification({
|
|
14
|
+
* verificationMedium: 'email',
|
|
15
|
+
* requestId: 'your requestId',
|
|
16
|
+
* processingType: ProcessingType.Code,
|
|
17
|
+
* email: 'your email'
|
|
18
|
+
* }).then(function (response) {
|
|
19
|
+
* // the response will give you account verification details.
|
|
20
|
+
* }).catch(function(ex) {
|
|
21
|
+
* // your failure code here
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
initiateAccountVerification(options: InitiateAccountVerificationRequest): void;
|
|
26
|
+
/**
|
|
27
|
+
* To complete the verification, call **verifyAccount()**.
|
|
28
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/r8h9mvavvw2e6-verify-account for more details.
|
|
29
|
+
* @example
|
|
30
|
+
* ```js
|
|
31
|
+
* cidaasVerificationService.verifyAccount({
|
|
32
|
+
* accvid: 'your accvid', // which you will get on initiate account verification response
|
|
33
|
+
* code: 'your code in email or sms or ivr'
|
|
34
|
+
* }).then(function (response) {
|
|
35
|
+
* // the response will give you account verification ID and unique code.
|
|
36
|
+
* }).catch(function(ex) {
|
|
37
|
+
* // your failure code here
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
verifyAccount(options: VerifyAccountRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
42
|
+
/**
|
|
43
|
+
* To get all configured multi factor authentication, call **getMFAList()**.
|
|
44
|
+
*
|
|
45
|
+
* As Parameter, you need to pass request id & one of the following: email or mobile phone or username.
|
|
46
|
+
*
|
|
47
|
+
* In case you are in prelogin page and don't have user information yet (such as mfa-required & account-verification page), you could pass
|
|
48
|
+
* request id & masked sub (one of the following: sub or q), depends on which one is available in the query parameter generated by cidaas.
|
|
49
|
+
*
|
|
50
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/ee688a9c52b63-list-of-configured-verification-methods for more details.
|
|
51
|
+
* @example
|
|
52
|
+
* ```js
|
|
53
|
+
* cidaasVerificationService.getMFAList({
|
|
54
|
+
* request_id: 'your request id',
|
|
55
|
+
* email: 'your email'
|
|
56
|
+
* }).then(function (response) {
|
|
57
|
+
* // the response will give you list of configured multi factor authentication
|
|
58
|
+
* }).catch(function(ex) {
|
|
59
|
+
* // your failure code here
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
getMFAList(options: GetMFAListRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
64
|
+
/**
|
|
65
|
+
* to cancel mfa process, call **cancelMFA()**.
|
|
66
|
+
* @example
|
|
67
|
+
* ```js
|
|
68
|
+
* cidaasVerificationService.cancelMFA({
|
|
69
|
+
* exchange_id: 'exchange id from initiateMFA() response',
|
|
70
|
+
* reason: 'reason of mfa cancelation',
|
|
71
|
+
* type: 'authentication type e.g. email'
|
|
72
|
+
* }).then(function (response) {
|
|
73
|
+
* // your success code here
|
|
74
|
+
* }).catch(function(ex) {
|
|
75
|
+
* // your failure code here
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
cancelMFA(options: CancelMFARequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
80
|
+
/**
|
|
81
|
+
* To get list of all verification type configured, call **getAllVerificationList()**. access_token must be passed as function parameter.
|
|
82
|
+
* @example
|
|
83
|
+
* ```js
|
|
84
|
+
* cidaasVerificationService.getAllVerificationList()
|
|
85
|
+
* .then(function (response) {
|
|
86
|
+
* // type your code here
|
|
87
|
+
* })
|
|
88
|
+
* .catch(function (ex) {
|
|
89
|
+
* // your failure code here
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
getAllVerificationList(access_token?: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
94
|
+
/**
|
|
95
|
+
* To initiate enrollment of new multi factor authentication, call **initiateEnrollment()**.
|
|
96
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/f85aef6754714-initiate-physical-verification-setup for more details.
|
|
97
|
+
* @example
|
|
98
|
+
* ```js
|
|
99
|
+
* const options = {
|
|
100
|
+
* verification_type: 'one of verification_type such as fido2, face, ivr',
|
|
101
|
+
* deviceInfo: {
|
|
102
|
+
* deviceId: '',
|
|
103
|
+
* location: {lat: '', lon: ''}
|
|
104
|
+
* }
|
|
105
|
+
* }
|
|
106
|
+
*
|
|
107
|
+
* cidaasVerificationService.initiateEnrollment(options)
|
|
108
|
+
* .then(function (response) {
|
|
109
|
+
* // type your code here
|
|
110
|
+
* })
|
|
111
|
+
* .catch(function (ex) {
|
|
112
|
+
* // your failure code here
|
|
113
|
+
* });
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
initiateEnrollment(options: InitiateEnrollmentRequest, access_token?: string): Promise<any>;
|
|
117
|
+
/**
|
|
118
|
+
* to get the status of MFA enrollment, call **getEnrollmentStatus()**.
|
|
119
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/b06447d02d8e0-get-status-of-physical-verification-setup-configuration for more details.
|
|
120
|
+
* @example
|
|
121
|
+
* ```js
|
|
122
|
+
* cidaasVerificationService.getEnrollmentStatus('statusId from initiateEnrollment()')
|
|
123
|
+
* .then(function (response) {
|
|
124
|
+
* // type your code here
|
|
125
|
+
* })
|
|
126
|
+
* .catch(function (ex) {
|
|
127
|
+
* // your failure code here
|
|
128
|
+
* });
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
getEnrollmentStatus(status_id: string, access_token?: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
132
|
+
/**
|
|
133
|
+
* to finish enrollment process of new multi factor authentication, call **enrollVerification()**.
|
|
134
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/20ec76e937b27-enroll-physical-verification-setup for more details.
|
|
135
|
+
* @example
|
|
136
|
+
* ```js
|
|
137
|
+
* const fidoPayload = {
|
|
138
|
+
* sub: 'your sub',
|
|
139
|
+
* exchange_id: 'exchange_id from initiateEnrollment()',
|
|
140
|
+
* verification_type: 'fido2',
|
|
141
|
+
* fido2_client_response: {
|
|
142
|
+
* client_response: 'client_response from doing fido process',
|
|
143
|
+
* fidoRequestId: 'fidoRequestId from initiateEnrollment',
|
|
144
|
+
* }
|
|
145
|
+
* }
|
|
146
|
+
* cidaasVerificationService.enrollVerification(fidoPayload)
|
|
147
|
+
* .then(function (response) {
|
|
148
|
+
* // type your code here
|
|
149
|
+
* })
|
|
150
|
+
* .catch(function (ex) {
|
|
151
|
+
* // your failure code here
|
|
152
|
+
* });
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
enrollVerification(options: EnrollVerificationRequest): Promise<any>;
|
|
156
|
+
/**
|
|
157
|
+
* to see details of configured verification type, call **checkVerificationTypeConfigured()**.
|
|
158
|
+
* @example
|
|
159
|
+
* ```js
|
|
160
|
+
* cidaasVerificationService.checkVerificationTypeConfigured({
|
|
161
|
+
* request_id: 'your request id',
|
|
162
|
+
* email: 'your email',
|
|
163
|
+
* verification_type: 'email'
|
|
164
|
+
* }).then(function (response) {
|
|
165
|
+
* // type your code here
|
|
166
|
+
* })
|
|
167
|
+
* .catch(function (ex) {
|
|
168
|
+
* // your failure code here
|
|
169
|
+
* });
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
checkVerificationTypeConfigured(options: CheckVerificationTypeConfiguredRequest): Promise<any>;
|
|
173
|
+
/**
|
|
174
|
+
* to initiate multi factor auhentication, call **initiateMFA()**.
|
|
175
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/2a3ea581bb249-initiate-verification for more details.
|
|
176
|
+
* @example
|
|
177
|
+
* ```js
|
|
178
|
+
* const options = {
|
|
179
|
+
* request_id: 'your request id',
|
|
180
|
+
* usage_type: 'PASSWORDLESS_AUTHENTICATION',
|
|
181
|
+
* type: 'email'
|
|
182
|
+
* email: 'your email'
|
|
183
|
+
* }
|
|
184
|
+
* }
|
|
185
|
+
*
|
|
186
|
+
* cidaasVerificationService.initiateMFA(options)
|
|
187
|
+
* .then(function (response) {
|
|
188
|
+
* // type your code here
|
|
189
|
+
* })
|
|
190
|
+
* .catch(function (ex) {
|
|
191
|
+
* // your failure code here
|
|
192
|
+
* });
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
initiateMFA(options: InitiateMFARequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
196
|
+
/**
|
|
197
|
+
* to authenticate with multi factor auhentication, call **authenticateMFA()**.
|
|
198
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/1aa38936252d6-perform-the-authentication-method for more details.
|
|
199
|
+
* @example
|
|
200
|
+
* ```js
|
|
201
|
+
* cidaasVerificationService.authenticateMFA({
|
|
202
|
+
* type: 'email',
|
|
203
|
+
* client_id: 'your client id',
|
|
204
|
+
* exchange_id: exchange id from initiateMFA(),
|
|
205
|
+
* pass_code: 'code to authenticate'
|
|
206
|
+
* }).then(function (response) {
|
|
207
|
+
* // type your code here
|
|
208
|
+
* })
|
|
209
|
+
* .catch(function (ex) {
|
|
210
|
+
* // your failure code here
|
|
211
|
+
* });
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
authenticateMFA(options: AuthenticateMFARequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
215
|
+
/**
|
|
216
|
+
* to initiate verification process, call **initiateVerification**
|
|
217
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/odmtzu2e53f5k-initiate-verification-enrollment for more details.
|
|
218
|
+
* @example
|
|
219
|
+
* ```js
|
|
220
|
+
* const options = {
|
|
221
|
+
* mobile_number: 'your mobile number',
|
|
222
|
+
* }
|
|
223
|
+
* }
|
|
224
|
+
* const trackId = 'your track id'
|
|
225
|
+
* const method = 'email'
|
|
226
|
+
*
|
|
227
|
+
* cidaasVerificationService.initiateVerification(options, trackId, method)
|
|
228
|
+
* .then(function (response) {
|
|
229
|
+
* // type your code here
|
|
230
|
+
* })
|
|
231
|
+
* .catch(function (ex) {
|
|
232
|
+
* // your failure code here
|
|
233
|
+
* });
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
initiateVerification(options: InitiateVerificationRequest, trackId: string, method: string): Promise<any>;
|
|
237
|
+
/**
|
|
238
|
+
* to finish configuring verification process, call **configureVerification**
|
|
239
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/vurqjgv46yyid-initiate-verification-setup-authenticate for more details.
|
|
240
|
+
* @example
|
|
241
|
+
* ```js
|
|
242
|
+
* const options = {
|
|
243
|
+
* exchange_id: 'your exchange id';
|
|
244
|
+
* sub: 'your sub;
|
|
245
|
+
* pass_code: 'your pass code';
|
|
246
|
+
* }
|
|
247
|
+
* }
|
|
248
|
+
* const method = 'email'
|
|
249
|
+
*
|
|
250
|
+
* cidaasVerificationService.initiateVerification(options, method)
|
|
251
|
+
* .then(function (response) {
|
|
252
|
+
* // type your code here
|
|
253
|
+
* })
|
|
254
|
+
* .catch(function (ex) {
|
|
255
|
+
* // your failure code here
|
|
256
|
+
* });
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
configureVerification(options: ConfigureVerificationRequest, method: string): Promise<any>;
|
|
260
|
+
/**
|
|
261
|
+
* to configure friendly name, call **configureFriendlyName**
|
|
262
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/f0i458vm5zo6z-add-a-friendly-name for more details.
|
|
263
|
+
* @example
|
|
264
|
+
* ```js
|
|
265
|
+
* const options = {
|
|
266
|
+
* sub: 'your sub;
|
|
267
|
+
* friendly_name: 'your friendly name';
|
|
268
|
+
* }
|
|
269
|
+
* }
|
|
270
|
+
* const trackId = 'your track id'
|
|
271
|
+
* const method = 'email'
|
|
272
|
+
*
|
|
273
|
+
* cidaasVerificationService.configureFriendlyName(options, trackId, method)
|
|
274
|
+
* .then(function (response) {
|
|
275
|
+
* // type your code here
|
|
276
|
+
* })
|
|
277
|
+
* .catch(function (ex) {
|
|
278
|
+
* // your failure code here
|
|
279
|
+
* });
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
configureFriendlyName(options: ConfigureFriendlyNameRequest, trackId: string, method: string): Promise<any>;
|
|
283
|
+
}
|