cidaas-javascript-sdk 3.1.2 → 3.1.4
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 +2 -2
- package/README.md +0 -1
- package/dist/authentication/index.d.ts +55 -0
- package/{src/main/authentication/index.ts → dist/authentication/index.js} +127 -88
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/web-auth/ConsentService.d.ts +59 -0
- package/dist/web-auth/ConsentService.js +73 -0
- package/dist/web-auth/Entities.d.ts +533 -0
- package/dist/web-auth/Entities.js +78 -0
- package/dist/web-auth/Helper.d.ts +24 -0
- package/dist/web-auth/Helper.js +89 -0
- package/dist/web-auth/LoginService.d.ts +103 -0
- package/dist/web-auth/LoginService.js +248 -0
- package/dist/web-auth/TokenService.d.ts +48 -0
- package/dist/web-auth/TokenService.js +160 -0
- package/dist/web-auth/UserService.d.ts +143 -0
- package/dist/web-auth/UserService.js +311 -0
- package/dist/web-auth/VerificationService.d.ts +125 -0
- package/dist/web-auth/VerificationService.js +251 -0
- package/dist/web-auth/WebAuth.d.ts +882 -0
- package/dist/web-auth/WebAuth.js +1570 -0
- package/package.json +7 -8
- package/src/main/global.d.ts +0 -10
- package/src/main/index.ts +0 -6
- package/src/main/web-auth/ConsentService.ts +0 -76
- package/src/main/web-auth/Entities.ts +0 -610
- package/src/main/web-auth/Helper.ts +0 -75
- package/src/main/web-auth/LoginService.ts +0 -249
- package/src/main/web-auth/TokenService.ts +0 -106
- package/src/main/web-auth/UserService.ts +0 -297
- package/src/main/web-auth/VerificationService.ts +0 -247
- package/src/main/web-auth/WebAuth.ts +0 -1516
|
@@ -1,610 +0,0 @@
|
|
|
1
|
-
import { UserManagerSettings } from "oidc-client-ts";
|
|
2
|
-
|
|
3
|
-
export interface AcceptResetPasswordEntity {
|
|
4
|
-
resetRequestId: string ;
|
|
5
|
-
exchangeId: string;
|
|
6
|
-
password: string;
|
|
7
|
-
confirmPassword: string;
|
|
8
|
-
provider?: string;
|
|
9
|
-
requestId?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class AccessTokenRequest {
|
|
13
|
-
grant_type?: string;
|
|
14
|
-
code?: string;
|
|
15
|
-
redirect_uri?: string;
|
|
16
|
-
client_id?: string;
|
|
17
|
-
client_secret?: string;
|
|
18
|
-
state?: string;
|
|
19
|
-
scope?: string;
|
|
20
|
-
refresh_token?: string;
|
|
21
|
-
code_verifier?: string;
|
|
22
|
-
username?: string;
|
|
23
|
-
password?: string;
|
|
24
|
-
requestId?: string;
|
|
25
|
-
provider?: string;
|
|
26
|
-
host?: string;
|
|
27
|
-
client_assertion?: string;
|
|
28
|
-
client_assertion_type?: string;
|
|
29
|
-
|
|
30
|
-
client_ip?: string;
|
|
31
|
-
captcha?: string;
|
|
32
|
-
locale?: string;
|
|
33
|
-
username_type?: string;
|
|
34
|
-
signature?: string;
|
|
35
|
-
remember_me?: boolean;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
user_agent: string = "";
|
|
39
|
-
ip_address: string = "";
|
|
40
|
-
accept_language: string = "";
|
|
41
|
-
lat: string = "";
|
|
42
|
-
lng: string = "";
|
|
43
|
-
finger_print: string = "";
|
|
44
|
-
referrer: string = "";
|
|
45
|
-
|
|
46
|
-
pre_login_id: string = "";
|
|
47
|
-
|
|
48
|
-
login_type: string = "";
|
|
49
|
-
|
|
50
|
-
// device code flow
|
|
51
|
-
device_code: string = "";
|
|
52
|
-
|
|
53
|
-
// for social logins
|
|
54
|
-
sub?: string;
|
|
55
|
-
identityId?: string;
|
|
56
|
-
providerUserId?: string;
|
|
57
|
-
|
|
58
|
-
mfa_exchange_id?: string;
|
|
59
|
-
dc?: string;
|
|
60
|
-
|
|
61
|
-
field_key?: string;
|
|
62
|
-
}
|
|
63
|
-
export class PhysicalVerificationLoginRequest {
|
|
64
|
-
q?: string;
|
|
65
|
-
sub?: string;
|
|
66
|
-
requestId?: string;
|
|
67
|
-
status_id?: string;
|
|
68
|
-
verificationType?: string;
|
|
69
|
-
deviceInfo?: IDeviceRequest;
|
|
70
|
-
device_fp?: string;
|
|
71
|
-
}
|
|
72
|
-
export interface IDeviceRequest {
|
|
73
|
-
userAgent: string;
|
|
74
|
-
ipAddress: string;
|
|
75
|
-
lat: string;
|
|
76
|
-
lon: string;
|
|
77
|
-
deviceId: string;
|
|
78
|
-
usedTime: Date;
|
|
79
|
-
purpose: string;
|
|
80
|
-
requestId: string;
|
|
81
|
-
sub: string;
|
|
82
|
-
pushNotificationId: string;
|
|
83
|
-
deviceMake: string;
|
|
84
|
-
deviceModel: string;
|
|
85
|
-
deviceType: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export type AccountVerificationRequestEntity = {
|
|
89
|
-
email?: string;
|
|
90
|
-
mobile?: string;
|
|
91
|
-
phone?: string;
|
|
92
|
-
username?: string;
|
|
93
|
-
verificationMedium?: string;
|
|
94
|
-
processingType?: string;
|
|
95
|
-
requestId?: string;
|
|
96
|
-
client_id?: string;
|
|
97
|
-
redirect_uri?: string;
|
|
98
|
-
response_type?: string;
|
|
99
|
-
sub: string;
|
|
100
|
-
templateKey?: string;
|
|
101
|
-
name?: string;
|
|
102
|
-
accept_language?: string;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface ChangePasswordEntity {
|
|
106
|
-
sub: string;
|
|
107
|
-
identityId: string;
|
|
108
|
-
old_password: string;
|
|
109
|
-
new_password: string;
|
|
110
|
-
confirm_password: string;
|
|
111
|
-
accessToken: string;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface FidoSetupEntity {
|
|
115
|
-
track_id: string;
|
|
116
|
-
fido_request_type: string;
|
|
117
|
-
mobile_number: string;
|
|
118
|
-
phone: string;
|
|
119
|
-
security_questions: string[];
|
|
120
|
-
verification_type: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export class FindUserEntity {
|
|
124
|
-
sub: string = "";
|
|
125
|
-
email: string = "";
|
|
126
|
-
mobile: string = "";
|
|
127
|
-
username: string = "";
|
|
128
|
-
customFields: any;
|
|
129
|
-
provider: string = "";
|
|
130
|
-
providerUserId: string = "";
|
|
131
|
-
rememberMe: string = "";
|
|
132
|
-
webfinger: string = "";
|
|
133
|
-
sub_not: string = "";
|
|
134
|
-
|
|
135
|
-
//additional param
|
|
136
|
-
requestId: string
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface IAddressEntity {
|
|
140
|
-
formatted: string;
|
|
141
|
-
street_address: string;
|
|
142
|
-
locality: string;
|
|
143
|
-
region: string;
|
|
144
|
-
postal_code: string;
|
|
145
|
-
country: string;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface IAuthVerificationAuthenticationRequestEntity extends FaceVerificationAuthenticationRequestEntity {
|
|
149
|
-
type: string;
|
|
150
|
-
verification_type?: string
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export interface FIDO2EnrollEntity {
|
|
154
|
-
client_response?: any;
|
|
155
|
-
fidoRequestId?: string;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export interface FaceVerificationAuthenticationRequestEntity {
|
|
159
|
-
exchange_id: string;
|
|
160
|
-
pass_code?: string;
|
|
161
|
-
client_id: string;
|
|
162
|
-
device_id?: string;
|
|
163
|
-
push_id?: string;
|
|
164
|
-
password?: string;
|
|
165
|
-
upload_attempt?: number;
|
|
166
|
-
fido2_client_response?: FIDO2EnrollEntity;
|
|
167
|
-
single_factor_auth?: boolean;
|
|
168
|
-
captcha?: string;
|
|
169
|
-
captcha_ref?: string;
|
|
170
|
-
bot_captcha_response?: string;
|
|
171
|
-
csrf_token?: string;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export interface IConfiguredListRequestEntity {
|
|
175
|
-
sub: string;
|
|
176
|
-
email: string;
|
|
177
|
-
mobile_number: string;
|
|
178
|
-
username: string;
|
|
179
|
-
request_id: string;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
verification_types: string[];
|
|
183
|
-
single_factor_sub_ref: string;
|
|
184
|
-
device_fp: string;
|
|
185
|
-
provider: string;
|
|
186
|
-
device_id: string;
|
|
187
|
-
|
|
188
|
-
// additional params
|
|
189
|
-
verification_type: string
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export interface IConsentAcceptEntity {
|
|
194
|
-
client_id: string;
|
|
195
|
-
consent_id: string;
|
|
196
|
-
consent_version_id: string;
|
|
197
|
-
sub: string;
|
|
198
|
-
scopes: string[];
|
|
199
|
-
url: string;
|
|
200
|
-
matcher: any;
|
|
201
|
-
field_key: string;
|
|
202
|
-
accepted_fields: string[];
|
|
203
|
-
accepted_by: string;
|
|
204
|
-
skipped: boolean;
|
|
205
|
-
action_type: string;
|
|
206
|
-
action_id: string;
|
|
207
|
-
q: string;
|
|
208
|
-
revoked: boolean;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
export interface IEnrollVerificationSetupRequestEntity {
|
|
213
|
-
exchange_id: string;
|
|
214
|
-
device_id: string;
|
|
215
|
-
finger_print: string;
|
|
216
|
-
client_id: string;
|
|
217
|
-
push_id: string;
|
|
218
|
-
pass_code: string;
|
|
219
|
-
pkce_key: string;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
face_attempt: number;
|
|
223
|
-
attempt: number;
|
|
224
|
-
|
|
225
|
-
fido2_client_response: FIDO2EnrollEntity;
|
|
226
|
-
|
|
227
|
-
//additional params
|
|
228
|
-
verification_type: string;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export interface IInitVerificationAuthenticationRequestEntity {
|
|
232
|
-
q: string;
|
|
233
|
-
sub: string;
|
|
234
|
-
email: string;
|
|
235
|
-
mobile_number: string;
|
|
236
|
-
username: string;
|
|
237
|
-
|
|
238
|
-
client_id: string;
|
|
239
|
-
request_id: string;
|
|
240
|
-
usage_type: string;
|
|
241
|
-
|
|
242
|
-
medium_id: string;
|
|
243
|
-
|
|
244
|
-
single_factor_auth: boolean;
|
|
245
|
-
|
|
246
|
-
push_id: string;
|
|
247
|
-
device_id: string;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
single_factor_sub_ref: string;
|
|
251
|
-
|
|
252
|
-
verification_types: string[];
|
|
253
|
-
device_fp: string;
|
|
254
|
-
provider: string;
|
|
255
|
-
processingType: string;
|
|
256
|
-
trackId: string;
|
|
257
|
-
|
|
258
|
-
//added additionaly
|
|
259
|
-
type?: string
|
|
260
|
-
verification_type?: string
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export interface IMobileEntity {
|
|
264
|
-
given_phone: string;
|
|
265
|
-
phone: string;
|
|
266
|
-
country: string;
|
|
267
|
-
dail_code: string;
|
|
268
|
-
carrier_type: string;
|
|
269
|
-
carrier_name: string;
|
|
270
|
-
national_format: string;
|
|
271
|
-
international_format: string;
|
|
272
|
-
E164_format: string;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
export interface ISuggestedMFAActionConfig {
|
|
277
|
-
sub?: string;
|
|
278
|
-
do_not_ask_again?: boolean;
|
|
279
|
-
later?: boolean;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export interface IUserEntity {
|
|
283
|
-
userStatus: string;
|
|
284
|
-
user_status: string;
|
|
285
|
-
user_status_reason: string;
|
|
286
|
-
username: string;
|
|
287
|
-
sub: string;
|
|
288
|
-
given_name: string;
|
|
289
|
-
family_name: string;
|
|
290
|
-
middle_name: string;
|
|
291
|
-
nickname: string;
|
|
292
|
-
originalProviderUserId?: string[];
|
|
293
|
-
email: string;
|
|
294
|
-
email_verified: boolean;
|
|
295
|
-
mobile_number: string;
|
|
296
|
-
mobile_number_obj: IMobileEntity | null;
|
|
297
|
-
mobile_number_verified: boolean;
|
|
298
|
-
phone_number: string;
|
|
299
|
-
phone_number_obj: IMobileEntity | null;
|
|
300
|
-
phone_number_verified: boolean;
|
|
301
|
-
profile: string;
|
|
302
|
-
picture: string;
|
|
303
|
-
website: string;
|
|
304
|
-
gender: string;
|
|
305
|
-
zoneinfo: string;
|
|
306
|
-
locale: string;
|
|
307
|
-
birthdate: Date | null;
|
|
308
|
-
address?: IAddressEntity;
|
|
309
|
-
customFields?: any;
|
|
310
|
-
identityCustomFields?: any;
|
|
311
|
-
password: string;
|
|
312
|
-
provider: string;
|
|
313
|
-
providerUserId: string;
|
|
314
|
-
identityId: string;
|
|
315
|
-
mfa_enabled?: boolean;
|
|
316
|
-
roles: string[];
|
|
317
|
-
userGroups: IUserGroupMap[];
|
|
318
|
-
groups?: IUserGroupMap[];
|
|
319
|
-
rawJSON: string;
|
|
320
|
-
trackId: string;
|
|
321
|
-
need_reset_password: boolean;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
export interface IUserGroupMap {
|
|
326
|
-
sub: string;
|
|
327
|
-
groupId: string;
|
|
328
|
-
roles: string[];
|
|
329
|
-
appendRole: boolean;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export interface IUserLinkEntity {
|
|
333
|
-
master_sub: string;
|
|
334
|
-
user_name_type: string;
|
|
335
|
-
user_name_to_link: string;
|
|
336
|
-
link_accepted_by: string;
|
|
337
|
-
link_response_time: Date;
|
|
338
|
-
link_accepted: boolean;
|
|
339
|
-
communication_type: string;
|
|
340
|
-
verification_status_id: string;
|
|
341
|
-
type: string;
|
|
342
|
-
status: string;
|
|
343
|
-
}
|
|
344
|
-
export type LoginFormRequestAsyncEntity = {
|
|
345
|
-
username: string;
|
|
346
|
-
password: string;
|
|
347
|
-
requestId: string;
|
|
348
|
-
provider: string;
|
|
349
|
-
captcha: string;
|
|
350
|
-
username_type: string;
|
|
351
|
-
field_key: string;
|
|
352
|
-
bot_captcha_response: string;
|
|
353
|
-
csrf_token: string;
|
|
354
|
-
dc?: string;
|
|
355
|
-
device_fp?: string;
|
|
356
|
-
captcha_ref?: string;
|
|
357
|
-
locale?: string;
|
|
358
|
-
rememberMe: string;
|
|
359
|
-
remember_me: string;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
export interface LoginFormRequestEntity {
|
|
363
|
-
username: string;
|
|
364
|
-
password: string;
|
|
365
|
-
requestId: string;
|
|
366
|
-
provider?: string;
|
|
367
|
-
captcha?: string;
|
|
368
|
-
username_type?: string;
|
|
369
|
-
field_key?: string;
|
|
370
|
-
bot_captcha_response?: string;
|
|
371
|
-
csrf_token?: string;
|
|
372
|
-
dc?: string;
|
|
373
|
-
device_fp?: string;
|
|
374
|
-
captcha_ref?: string;
|
|
375
|
-
locale?: string;
|
|
376
|
-
rememberMe?: boolean;
|
|
377
|
-
remember_me?: boolean;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export interface ResetPasswordEntity {
|
|
381
|
-
email: string;
|
|
382
|
-
mobile?: string;
|
|
383
|
-
phone?: string;
|
|
384
|
-
username?: string;
|
|
385
|
-
resetMedium: "SMS" | "EMAIL" | "IVR";
|
|
386
|
-
processingType: "CODE" | "LINK";
|
|
387
|
-
requestId: string;
|
|
388
|
-
provider?: string;
|
|
389
|
-
resetPasswordId?: string;
|
|
390
|
-
sub?: string;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
export class TokenIntrospectionEntity {
|
|
394
|
-
token: string = "";
|
|
395
|
-
token_type_hint?: string;
|
|
396
|
-
roles?: string[];
|
|
397
|
-
scopes?: string[];
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
groups?: GroupValidationEntity[];
|
|
402
|
-
strictGroupValidation: boolean = false;
|
|
403
|
-
strictScopeValidation: boolean = false;
|
|
404
|
-
|
|
405
|
-
strictRoleValidation: boolean = false;
|
|
406
|
-
strictValidation: boolean = false;
|
|
407
|
-
|
|
408
|
-
client_id?: string;
|
|
409
|
-
client_secret?: string;
|
|
410
|
-
|
|
411
|
-
request_url?: string;
|
|
412
|
-
request_time?: number;
|
|
413
|
-
request_headers?: any;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
export class GroupValidationEntity {
|
|
418
|
-
groupId?: string;
|
|
419
|
-
groupType?: string;
|
|
420
|
-
roles?: string[];
|
|
421
|
-
strictRoleValidation: boolean = false;
|
|
422
|
-
strictValidation: boolean = false;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
export class UpdateReviewDeviceEntity {
|
|
426
|
-
userId: string = "";
|
|
427
|
-
device: string = "";
|
|
428
|
-
browser: string = "";
|
|
429
|
-
location: string = "";
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
export interface UserActivityEntity {
|
|
433
|
-
skip?: Number;
|
|
434
|
-
take?: Number;
|
|
435
|
-
sub?: string;
|
|
436
|
-
startDate?: string;
|
|
437
|
-
endDate?: string;
|
|
438
|
-
events?: [string];
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
export declare class UserEntity {
|
|
442
|
-
userStatus?: string;
|
|
443
|
-
user_status?: string;
|
|
444
|
-
user_status_reason?: string;
|
|
445
|
-
username?: string;
|
|
446
|
-
sub?: string;
|
|
447
|
-
originalProviderUserId?: string[];
|
|
448
|
-
given_name: string;
|
|
449
|
-
family_name: string;
|
|
450
|
-
middle_name?: string;
|
|
451
|
-
nickname?: string;
|
|
452
|
-
email: string;
|
|
453
|
-
email_verified?: boolean;
|
|
454
|
-
mobile_number?: string;
|
|
455
|
-
mobile_number_obj?: IMobileEntity | null;
|
|
456
|
-
mobile_number_verified?: boolean;
|
|
457
|
-
phone_number?: string;
|
|
458
|
-
phone_number_obj?: IMobileEntity | null;
|
|
459
|
-
phone_number_verified?: boolean;
|
|
460
|
-
profile?: string;
|
|
461
|
-
picture?: string;
|
|
462
|
-
website?: string;
|
|
463
|
-
gender?: string;
|
|
464
|
-
zoneinfo?: string;
|
|
465
|
-
locale?: string;
|
|
466
|
-
birthdate?: Date | string;
|
|
467
|
-
address?: AddressEntity;
|
|
468
|
-
customFields?: any;
|
|
469
|
-
identityCustomFields?: any;
|
|
470
|
-
password: string;
|
|
471
|
-
password_echo: string;
|
|
472
|
-
password_hash_info?: any | null;
|
|
473
|
-
generate_password?: boolean;
|
|
474
|
-
provider?: string;
|
|
475
|
-
identityId?: string;
|
|
476
|
-
providerUserId?: string;
|
|
477
|
-
providerBusinessIds?: string[];
|
|
478
|
-
street_address?: string;
|
|
479
|
-
mfa_enabled?: boolean;
|
|
480
|
-
roles?: string[];
|
|
481
|
-
groups?: IUserGroupMap[];
|
|
482
|
-
userGroups?: IUserGroupMap[];
|
|
483
|
-
trackId?: string;
|
|
484
|
-
rawJSON?: string;
|
|
485
|
-
need_reset_password?: boolean;
|
|
486
|
-
no_event?: boolean;
|
|
487
|
-
consents?: IConsentField[] | IConsentTrackingEntity[];
|
|
488
|
-
consent_track_ids?: string[];
|
|
489
|
-
ignore_default_roles?: string[];
|
|
490
|
-
createdTime?: Date;
|
|
491
|
-
identities?: IIdentity[];
|
|
492
|
-
_id?: string;
|
|
493
|
-
id?: string;
|
|
494
|
-
invite_id?: string
|
|
495
|
-
}
|
|
496
|
-
export interface IConsentTrackingEntity {
|
|
497
|
-
state?: string;
|
|
498
|
-
fieldKey: string;
|
|
499
|
-
consentId: string;
|
|
500
|
-
versionId?: string;
|
|
501
|
-
time?: Date;
|
|
502
|
-
scopes: string[];
|
|
503
|
-
acceptedBy: string;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
export interface IConsentField {
|
|
507
|
-
field_key?: string;
|
|
508
|
-
value?: boolean;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
export interface IUserGroupMap {
|
|
512
|
-
sub: string;
|
|
513
|
-
groupId: string;
|
|
514
|
-
roles: string[];
|
|
515
|
-
appendRole: boolean;
|
|
516
|
-
eventType: string;
|
|
517
|
-
status: number;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
export declare class AddressEntity {
|
|
521
|
-
formatted: string;
|
|
522
|
-
street_address: string;
|
|
523
|
-
locality: string;
|
|
524
|
-
region: string;
|
|
525
|
-
postal_code: string;
|
|
526
|
-
country: string;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
export interface IIdentity {
|
|
530
|
-
identityId: string;
|
|
531
|
-
sub: string;
|
|
532
|
-
given_name: string;
|
|
533
|
-
family_name: string;
|
|
534
|
-
middle_name: string;
|
|
535
|
-
nickname: string;
|
|
536
|
-
email: string;
|
|
537
|
-
email_verified: boolean;
|
|
538
|
-
mobile_number: string;
|
|
539
|
-
mobile_number_obj: IMobileEntity;
|
|
540
|
-
mobile_number_verified: boolean;
|
|
541
|
-
phone_number: string;
|
|
542
|
-
phone_number_obj: IMobileEntity;
|
|
543
|
-
phone_number_verified: boolean;
|
|
544
|
-
profile: string;
|
|
545
|
-
picture: string;
|
|
546
|
-
website: string;
|
|
547
|
-
gender: string;
|
|
548
|
-
zoneinfo: string;
|
|
549
|
-
locale: string;
|
|
550
|
-
birthdate: Date | string;
|
|
551
|
-
address: IUserAddress;
|
|
552
|
-
street_address: string;
|
|
553
|
-
provider: string;
|
|
554
|
-
providerUserId: string;
|
|
555
|
-
username: string;
|
|
556
|
-
identityCustomFields: any;
|
|
557
|
-
providerBusinessIds: string[];
|
|
558
|
-
originalProviderUserId?: string[];
|
|
559
|
-
raw_json: string;
|
|
560
|
-
password_hash_info: any | null;
|
|
561
|
-
password: string;
|
|
562
|
-
createdTime: Date;
|
|
563
|
-
updatedTime: Date;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
export interface IMobileEntity {
|
|
567
|
-
_id: string;
|
|
568
|
-
id: string;
|
|
569
|
-
given_phone: string;
|
|
570
|
-
phone: string;
|
|
571
|
-
country: string;
|
|
572
|
-
dail_code: string;
|
|
573
|
-
carrier_type: string;
|
|
574
|
-
carrier_name: string;
|
|
575
|
-
national_format: string;
|
|
576
|
-
international_format: string;
|
|
577
|
-
E164_format: string;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
export interface IUserAddress {
|
|
581
|
-
_id: string;
|
|
582
|
-
id: string;
|
|
583
|
-
formatted: string;
|
|
584
|
-
street_address: string;
|
|
585
|
-
locality: string;
|
|
586
|
-
region: string;
|
|
587
|
-
postal_code: string;
|
|
588
|
-
country: string;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
export class ValidateResetPasswordEntity {
|
|
592
|
-
resetRequestId: string = "";
|
|
593
|
-
code: string = "";
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
export interface IChangePasswordEntity {
|
|
597
|
-
sub?: string;
|
|
598
|
-
identityId?: string;
|
|
599
|
-
old_password: string;
|
|
600
|
-
new_password: string;
|
|
601
|
-
confirm_password: string;
|
|
602
|
-
accessToken?: string;
|
|
603
|
-
loginSettingsId: string;
|
|
604
|
-
client_id?: string;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
export interface ICidaasSDKSettings extends UserManagerSettings {
|
|
608
|
-
mode?: string;
|
|
609
|
-
cidaas_version?: number;
|
|
610
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export class Helper {
|
|
2
|
-
/**
|
|
3
|
-
* create form
|
|
4
|
-
* @param form
|
|
5
|
-
* @param options
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
static createForm(url: string, options: any, method: string = 'POST') {
|
|
9
|
-
var form = document.createElement('form');
|
|
10
|
-
form.action = url;
|
|
11
|
-
form.method = method;
|
|
12
|
-
for (var key in options) {
|
|
13
|
-
if (options.hasOwnProperty(key)) {
|
|
14
|
-
var hiddenField = document.createElement("input");
|
|
15
|
-
hiddenField.setAttribute("type", "hidden");
|
|
16
|
-
hiddenField.setAttribute("name", key);
|
|
17
|
-
hiddenField.setAttribute("value", options[key]);
|
|
18
|
-
form.appendChild(hiddenField);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return form;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* utility function to create and make post request
|
|
26
|
-
* @param options
|
|
27
|
-
* @param serviceurl
|
|
28
|
-
* @param errorResolver
|
|
29
|
-
* @param access_token??
|
|
30
|
-
* @param headers??
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
static createPostPromise(options: any, serviceurl: string, errorResolver: boolean, method:string, access_token?: string, headers?: any) {
|
|
34
|
-
return new Promise((resolve, reject) => {
|
|
35
|
-
try {
|
|
36
|
-
var http = new XMLHttpRequest();
|
|
37
|
-
http.onreadystatechange = function () {
|
|
38
|
-
if (http.readyState == 4) {
|
|
39
|
-
if (http.responseText) {
|
|
40
|
-
resolve(JSON.parse(http.responseText));
|
|
41
|
-
} else {
|
|
42
|
-
resolve(errorResolver);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
http.open(method, serviceurl, true);
|
|
47
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
48
|
-
if (headers) {
|
|
49
|
-
for (var key in headers) {
|
|
50
|
-
if (headers.hasOwnProperty(key)) {
|
|
51
|
-
http.setRequestHeader(key, headers[key]);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (access_token) {
|
|
56
|
-
http.setRequestHeader("Authorization", `Bearer ${access_token}`);
|
|
57
|
-
}
|
|
58
|
-
if (window.localeSettings) {
|
|
59
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
60
|
-
}
|
|
61
|
-
if (options) {
|
|
62
|
-
http.send(JSON.stringify(options));
|
|
63
|
-
} else {
|
|
64
|
-
http.send();
|
|
65
|
-
}
|
|
66
|
-
} catch (ex) {
|
|
67
|
-
reject(ex);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export class CustomException {
|
|
74
|
-
constructor(public errorMessage: string, public statusCode: number) { }
|
|
75
|
-
}
|