cidaas-javascript-sdk 4.3.0 → 4.3.2
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 +20 -3
- package/README.md +6 -6
- package/dist/common/Common.model.d.ts +4 -0
- package/dist/consent-service/ConsentService.d.ts +6 -5
- package/dist/consent-service/ConsentService.js +10 -10
- package/dist/login-service/LoginService.model.d.ts +4 -0
- package/dist/token-service/TokenService.d.ts +3 -3
- package/dist/token-service/TokenService.js +4 -4
- package/dist/user-service/UserService.d.ts +7 -7
- package/dist/user-service/UserService.js +14 -14
- package/dist/verification-service/VerificationService.d.ts +8 -7
- package/dist/verification-service/VerificationService.js +15 -15
- package/dist/web-auth/WebAuth.d.ts +57 -23
- package/dist/web-auth/WebAuth.js +82 -48
- package/dist/web-auth/webauth.model.d.ts +16 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
## [4.3.2](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v4.3.1...v4.3.2) (2024-11-14)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* rename const ([46b5363](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/46b5363ceaaac5255fbb3bf38e0f208bf18b0597))
|
|
7
|
+
* Update getRequestId() to support overriding single option ([c4f16ff](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/c4f16ff89ecaf1e6da7aaff319ab33354c67e8cb))
|
|
7
8
|
|
|
8
9
|
# Changelog
|
|
9
10
|
|
|
11
|
+
## V4.3.2
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Update getRequestId() to support overriding single option
|
|
15
|
+
|
|
16
|
+
## V4.3.1
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Update required functions to accept headers
|
|
20
|
+
- Expand resetPassword flow functions with optional handleResponseAsJson for compatibility with older cidaas version
|
|
21
|
+
- Define data model for getRequestId() function payload
|
|
22
|
+
- Expand getRequestId() function with optional payload as parameter
|
|
23
|
+
|
|
24
|
+
### Fix
|
|
25
|
+
- Fix redirection in readme file
|
|
26
|
+
|
|
10
27
|
## V4.3.0
|
|
11
28
|
|
|
12
29
|
### Added
|
package/README.md
CHANGED
|
@@ -114,7 +114,7 @@ Cidaas Javascript SDK features the following functionality:
|
|
|
114
114
|
|
|
115
115
|
#### Authentication Functions
|
|
116
116
|
|
|
117
|
-
The SDK offers multiple way to authenticate user. Whether using browser redirection, in a pop up window, or in an iframe for silent sign in. The functions for authentication could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/authentication/
|
|
117
|
+
The SDK offers multiple way to authenticate user. Whether using browser redirection, in a pop up window, or in an iframe for silent sign in. The functions for authentication could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/authentication/Authentication.ts)
|
|
118
118
|
|
|
119
119
|
| SDK Functions | Description |
|
|
120
120
|
|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -124,7 +124,7 @@ The SDK offers multiple way to authenticate user. Whether using browser redirect
|
|
|
124
124
|
|
|
125
125
|
#### Login Management
|
|
126
126
|
|
|
127
|
-
The login functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/
|
|
127
|
+
The login functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/login-service/LoginService.ts). The SDK support the following login management functions:
|
|
128
128
|
|
|
129
129
|
| SDK Functions | Description |
|
|
130
130
|
|----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -136,7 +136,7 @@ The login functions could be found [here](https://github.com/Cidaas/cidaas-javas
|
|
|
136
136
|
|
|
137
137
|
#### User Management
|
|
138
138
|
|
|
139
|
-
The user functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/
|
|
139
|
+
The user functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/user-service/UserService.ts). The SDK support the following user management functions:
|
|
140
140
|
|
|
141
141
|
| SDK Functions | Description |
|
|
142
142
|
|-------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -151,7 +151,7 @@ The user functions could be found [here](https://github.com/Cidaas/cidaas-javasc
|
|
|
151
151
|
|
|
152
152
|
#### Token Management
|
|
153
153
|
|
|
154
|
-
The token functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/
|
|
154
|
+
The token functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/token-service/TokenService.ts). The SDK support the following token management functions:
|
|
155
155
|
|
|
156
156
|
| SDK Functions | Description |
|
|
157
157
|
|--------------------------------------|-----------------------------------------------------------------------------------------------------|
|
|
@@ -163,7 +163,7 @@ The token functions could be found [here](https://github.com/Cidaas/cidaas-javas
|
|
|
163
163
|
|
|
164
164
|
#### Verification Management
|
|
165
165
|
|
|
166
|
-
The verification functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/
|
|
166
|
+
The verification functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/verification-service/VerificationService.ts). The SDK support the following verification management functions:
|
|
167
167
|
|
|
168
168
|
| SDK Functions | Description |
|
|
169
169
|
|---------------------------------------------------------------------|---------------------------------------------------------------------------------------|
|
|
@@ -176,7 +176,7 @@ The verification functions could be found [here](https://github.com/Cidaas/cidaa
|
|
|
176
176
|
|
|
177
177
|
#### Consent Management
|
|
178
178
|
|
|
179
|
-
The consent functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/
|
|
179
|
+
The consent functions could be found [here](https://github.com/Cidaas/cidaas-javascript-sdk/blob/master/src/main/consent-service/ConsentService.ts). The SDK support the following consent management functions:
|
|
180
180
|
|
|
181
181
|
| SDK Functions | Description |
|
|
182
182
|
|---------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
|
|
@@ -29,6 +29,10 @@ export interface HTTPRequestHeader {
|
|
|
29
29
|
bot_captcha_response?: string;
|
|
30
30
|
/** Identifier generated after successful authentication but unfulfilled prechecks */
|
|
31
31
|
trackId?: string;
|
|
32
|
+
/** Latitude is the string location parameter sent in the headers */
|
|
33
|
+
lat?: string;
|
|
34
|
+
/** Longitude is the string location parameter sent in the headers */
|
|
35
|
+
lon?: string;
|
|
32
36
|
}
|
|
33
37
|
/** defines whether the the process will be done via email link or whether the user needs to enter a code to complete the process. */
|
|
34
38
|
export declare enum ProcessingType {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HTTPRequestHeader } from "../common/Common.model";
|
|
1
2
|
import { AcceptClaimConsentRequest, AcceptConsentRequest, AcceptScopeConsentRequest, GetConsentDetailsRequest, GetConsentVersionDetailsRequest, RevokeClaimConsentRequest } from "./ConsentService.model";
|
|
2
3
|
/**
|
|
3
4
|
* To get consent details , call **getConsentDetails()**.
|
|
@@ -17,7 +18,7 @@ import { AcceptClaimConsentRequest, AcceptConsentRequest, AcceptScopeConsentRequ
|
|
|
17
18
|
* });
|
|
18
19
|
* ```
|
|
19
20
|
*/
|
|
20
|
-
export declare function getConsentDetails(options: GetConsentDetailsRequest): Promise<any>;
|
|
21
|
+
export declare function getConsentDetails(options: GetConsentDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
21
22
|
/**
|
|
22
23
|
* To accept consent, call **acceptConsent()**.
|
|
23
24
|
* @example
|
|
@@ -34,7 +35,7 @@ export declare function getConsentDetails(options: GetConsentDetailsRequest): Pr
|
|
|
34
35
|
* });
|
|
35
36
|
* ```
|
|
36
37
|
*/
|
|
37
|
-
export declare function acceptConsent(options: AcceptConsentRequest): Promise<any>;
|
|
38
|
+
export declare function acceptConsent(options: AcceptConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
38
39
|
/**
|
|
39
40
|
* To get version details of consent, call **getConsentVersionDetails()**.
|
|
40
41
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/7e24ac2113315-get-consent-version-details for more details.
|
|
@@ -51,7 +52,7 @@ export declare function acceptConsent(options: AcceptConsentRequest): Promise<an
|
|
|
51
52
|
* });
|
|
52
53
|
* ```
|
|
53
54
|
*/
|
|
54
|
-
export declare function getConsentVersionDetails(options: GetConsentVersionDetailsRequest): Promise<any>;
|
|
55
|
+
export declare function getConsentVersionDetails(options: GetConsentVersionDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
55
56
|
/**
|
|
56
57
|
* To accept scope consent, call **acceptScopeConsent()**.
|
|
57
58
|
* @example
|
|
@@ -63,7 +64,7 @@ export declare function getConsentVersionDetails(options: GetConsentVersionDetai
|
|
|
63
64
|
* });
|
|
64
65
|
* ```
|
|
65
66
|
*/
|
|
66
|
-
export declare function acceptScopeConsent(options: AcceptScopeConsentRequest): Promise<any>;
|
|
67
|
+
export declare function acceptScopeConsent(options: AcceptScopeConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
67
68
|
/**
|
|
68
69
|
* To accept claim consent, call **acceptClaimConsent()**.
|
|
69
70
|
* @example
|
|
@@ -75,7 +76,7 @@ export declare function acceptScopeConsent(options: AcceptScopeConsentRequest):
|
|
|
75
76
|
* });
|
|
76
77
|
* ```
|
|
77
78
|
*/
|
|
78
|
-
export declare function acceptClaimConsent(options: AcceptClaimConsentRequest): Promise<any>;
|
|
79
|
+
export declare function acceptClaimConsent(options: AcceptClaimConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
79
80
|
/**
|
|
80
81
|
* To revoke claim consent, call **revokeClaimConsent()**.
|
|
81
82
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/9ae62e98842fe-revoke-user-consent-claim for more details.
|
|
@@ -20,9 +20,9 @@ const Helper_1 = require("../common/Helper");
|
|
|
20
20
|
* });
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
function getConsentDetails(options) {
|
|
23
|
+
function getConsentDetails(options, headers) {
|
|
24
24
|
const _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/public/info";
|
|
25
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
|
|
25
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
|
|
26
26
|
}
|
|
27
27
|
exports.getConsentDetails = getConsentDetails;
|
|
28
28
|
/**
|
|
@@ -41,9 +41,9 @@ exports.getConsentDetails = getConsentDetails;
|
|
|
41
41
|
* });
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
function acceptConsent(options) {
|
|
44
|
+
function acceptConsent(options, headers) {
|
|
45
45
|
const _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/accept";
|
|
46
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
|
|
46
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
|
|
47
47
|
}
|
|
48
48
|
exports.acceptConsent = acceptConsent;
|
|
49
49
|
/**
|
|
@@ -62,13 +62,13 @@ exports.acceptConsent = acceptConsent;
|
|
|
62
62
|
* });
|
|
63
63
|
* ```
|
|
64
64
|
*/
|
|
65
|
-
function getConsentVersionDetails(options) {
|
|
65
|
+
function getConsentVersionDetails(options, headers) {
|
|
66
66
|
let _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/versions/details/" + options.consentid;
|
|
67
67
|
if (options.locale) {
|
|
68
68
|
_serviceURL += "?locale=" + options.locale;
|
|
69
69
|
}
|
|
70
70
|
// BREAKING TODO: remove access token as it is not needed to get consent version details
|
|
71
|
-
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET", options.access_token);
|
|
71
|
+
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET", options.access_token, headers);
|
|
72
72
|
}
|
|
73
73
|
exports.getConsentVersionDetails = getConsentVersionDetails;
|
|
74
74
|
/**
|
|
@@ -82,9 +82,9 @@ exports.getConsentVersionDetails = getConsentVersionDetails;
|
|
|
82
82
|
* });
|
|
83
83
|
* ```
|
|
84
84
|
*/
|
|
85
|
-
function acceptScopeConsent(options) {
|
|
85
|
+
function acceptScopeConsent(options, headers) {
|
|
86
86
|
const _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/scope/accept";
|
|
87
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
|
|
87
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
|
|
88
88
|
}
|
|
89
89
|
exports.acceptScopeConsent = acceptScopeConsent;
|
|
90
90
|
/**
|
|
@@ -98,9 +98,9 @@ exports.acceptScopeConsent = acceptScopeConsent;
|
|
|
98
98
|
* });
|
|
99
99
|
* ```
|
|
100
100
|
*/
|
|
101
|
-
function acceptClaimConsent(options) {
|
|
101
|
+
function acceptClaimConsent(options, headers) {
|
|
102
102
|
const _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/accept";
|
|
103
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
|
|
103
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
|
|
104
104
|
}
|
|
105
105
|
exports.acceptClaimConsent = acceptClaimConsent;
|
|
106
106
|
/**
|
|
@@ -123,6 +123,10 @@ export interface ProgressiveRegistrationHeader {
|
|
|
123
123
|
trackId: string;
|
|
124
124
|
/** Response language, which is configured in cidaas admin ui */
|
|
125
125
|
acceptlanguage?: string;
|
|
126
|
+
/** Latitude is the string location parameter sent in the headers */
|
|
127
|
+
lat?: string;
|
|
128
|
+
/** Longitude is the string location parameter sent in the headers */
|
|
129
|
+
lon?: string;
|
|
126
130
|
}
|
|
127
131
|
export interface LoginAfterRegisterRequest {
|
|
128
132
|
/** Deprecated: will be removed in the next major release */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GetAccessTokenRequest, RenewTokenRequest, TokenIntrospectionRequest } from "./TokenService.model";
|
|
2
|
-
import { LoginPrecheckRequest } from "../common/Common.model";
|
|
2
|
+
import { HTTPRequestHeader, LoginPrecheckRequest } from "../common/Common.model";
|
|
3
3
|
/**
|
|
4
4
|
* To get a new token with the grant type refresh_token, call **renewToken()**.
|
|
5
5
|
* The refresh token to create a new token. The refresh token is received while creating an access token using the token endpoint and later can be used to fetch a new token without using credentials
|
|
@@ -77,7 +77,7 @@ export declare function validateAccessToken(options: TokenIntrospectionRequest):
|
|
|
77
77
|
* });
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
export declare function loginPrecheck(options: LoginPrecheckRequest): Promise<any>;
|
|
80
|
+
export declare function loginPrecheck(options: LoginPrecheckRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
81
81
|
/**
|
|
82
82
|
* To get the missing fields after login, call **getMissingFields()**.
|
|
83
83
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/aappczju1t3uh-precheck-information for more details.
|
|
@@ -93,7 +93,7 @@ export declare function loginPrecheck(options: LoginPrecheckRequest): Promise<an
|
|
|
93
93
|
* });
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
|
-
export declare function getMissingFields(trackId: string): Promise<any>;
|
|
96
|
+
export declare function getMissingFields(trackId: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
97
97
|
/**
|
|
98
98
|
* To initiate device code, call **initiateDeviceCode()**.
|
|
99
99
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/b6d284f55be5e-authorization-request for more details.
|
|
@@ -123,9 +123,9 @@ exports.validateAccessToken = validateAccessToken;
|
|
|
123
123
|
* });
|
|
124
124
|
* ```
|
|
125
125
|
*/
|
|
126
|
-
function loginPrecheck(options) {
|
|
126
|
+
function loginPrecheck(options, headers) {
|
|
127
127
|
const _serviceURL = window.webAuthSettings.authority + "/token-srv/prelogin/metadata/" + options.track_id;
|
|
128
|
-
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
|
|
128
|
+
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET", undefined, headers);
|
|
129
129
|
}
|
|
130
130
|
exports.loginPrecheck = loginPrecheck;
|
|
131
131
|
/**
|
|
@@ -143,9 +143,9 @@ exports.loginPrecheck = loginPrecheck;
|
|
|
143
143
|
* });
|
|
144
144
|
* ```
|
|
145
145
|
*/
|
|
146
|
-
function getMissingFields(trackId) {
|
|
146
|
+
function getMissingFields(trackId, headers) {
|
|
147
147
|
const _serviceURL = window.webAuthSettings.authority + "/token-srv/prelogin/metadata/" + trackId;
|
|
148
|
-
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
|
|
148
|
+
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET", undefined, headers);
|
|
149
149
|
}
|
|
150
150
|
exports.getMissingFields = getMissingFields;
|
|
151
151
|
/**
|
|
@@ -65,7 +65,7 @@ export declare function register(options: RegisterRequest, headers: HTTPRequestH
|
|
|
65
65
|
* });
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export declare function getInviteUserDetails(options: GetInviteUserDetailsRequest): Promise<any>;
|
|
68
|
+
export declare function getInviteUserDetails(options: GetInviteUserDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
69
69
|
/**
|
|
70
70
|
* Once registration successful, verify the account based on the flow. To get the details, call **getCommunicationStatus()**.
|
|
71
71
|
* @example
|
|
@@ -97,7 +97,7 @@ export declare function getCommunicationStatus(options: getCommunicationStatusRe
|
|
|
97
97
|
* });
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
export declare function initiateResetPassword(options: InitiateResetPasswordRequest): Promise<any>;
|
|
100
|
+
export declare function initiateResetPassword(options: InitiateResetPasswordRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
101
101
|
/**
|
|
102
102
|
* To handle the reset password by entering the verification code you received, call **handleResetPassword()**. This will check if your verification code was valid or not, and allows you to proceed to the next step.
|
|
103
103
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/3t8ztokeb7cfz-handle-reset-password for more details.
|
|
@@ -114,7 +114,7 @@ export declare function initiateResetPassword(options: InitiateResetPasswordRequ
|
|
|
114
114
|
* });
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
|
-
export declare function handleResetPassword(options: HandleResetPasswordRequest, handleResponseAsJson?: boolean): Promise<any>;
|
|
117
|
+
export declare function handleResetPassword(options: HandleResetPasswordRequest, handleResponseAsJson?: boolean, headers?: HTTPRequestHeader): Promise<any>;
|
|
118
118
|
/**
|
|
119
119
|
* To finish reseting the password, call **resetPassword()**. This will allow you to change your password.
|
|
120
120
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/qa9ny0gkzlf6y-accept-reset-password for more details.
|
|
@@ -133,7 +133,7 @@ export declare function handleResetPassword(options: HandleResetPasswordRequest,
|
|
|
133
133
|
* });
|
|
134
134
|
* ```
|
|
135
135
|
*/
|
|
136
|
-
export declare function resetPassword(options: ResetPasswordRequest, handleResponseAsJson?: boolean): Promise<any>;
|
|
136
|
+
export declare function resetPassword(options: ResetPasswordRequest, handleResponseAsJson?: boolean, headers?: HTTPRequestHeader): Promise<any>;
|
|
137
137
|
/**
|
|
138
138
|
* To get the list of existing users in deduplication, call **getDeduplicationDetails()**.
|
|
139
139
|
* @example
|
|
@@ -147,7 +147,7 @@ export declare function resetPassword(options: ResetPasswordRequest, handleRespo
|
|
|
147
147
|
* });
|
|
148
148
|
* ```
|
|
149
149
|
*/
|
|
150
|
-
export declare function getDeduplicationDetails(options: GetDeduplicationDetailsRequest): Promise<any>;
|
|
150
|
+
export declare function getDeduplicationDetails(options: GetDeduplicationDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
151
151
|
/**
|
|
152
152
|
* To use the existing users in deduplication, you need to call **deduplicationLogin()**.
|
|
153
153
|
* @example
|
|
@@ -173,7 +173,7 @@ export declare function deduplicationLogin(options: DeduplicationLoginRequest):
|
|
|
173
173
|
* });
|
|
174
174
|
* ```
|
|
175
175
|
*/
|
|
176
|
-
export declare function registerDeduplication(options: RegisterDeduplicationRequest): Promise<any>;
|
|
176
|
+
export declare function registerDeduplication(options: RegisterDeduplicationRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
177
177
|
/**
|
|
178
178
|
* To change the password, call **changePassword()**. This will allow you to change your password.
|
|
179
179
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/8221883241464-change-password for more details.
|
|
@@ -314,4 +314,4 @@ export declare function deleteUserAccount(options: DeleteUserAccountRequest): Pr
|
|
|
314
314
|
* });
|
|
315
315
|
* ```
|
|
316
316
|
*/
|
|
317
|
-
export declare function userCheckExists(options: UserCheckExistsRequest): Promise<any>;
|
|
317
|
+
export declare function userCheckExists(options: UserCheckExistsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
@@ -80,7 +80,7 @@ exports.register = register;
|
|
|
80
80
|
* });
|
|
81
81
|
* ```
|
|
82
82
|
*/
|
|
83
|
-
function getInviteUserDetails(options) {
|
|
83
|
+
function getInviteUserDetails(options, headers) {
|
|
84
84
|
let _serviceURL = "";
|
|
85
85
|
if (options.callLatestAPI) {
|
|
86
86
|
_serviceURL = window.webAuthSettings.authority + "/useractions-srv/invitations/" + options.invite_id;
|
|
@@ -88,7 +88,7 @@ function getInviteUserDetails(options) {
|
|
|
88
88
|
else {
|
|
89
89
|
_serviceURL = window.webAuthSettings.authority + "/users-srv/invite/info/" + options.invite_id;
|
|
90
90
|
}
|
|
91
|
-
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
|
|
91
|
+
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET", undefined, headers);
|
|
92
92
|
}
|
|
93
93
|
exports.getInviteUserDetails = getInviteUserDetails;
|
|
94
94
|
/**
|
|
@@ -126,9 +126,9 @@ exports.getCommunicationStatus = getCommunicationStatus;
|
|
|
126
126
|
* });
|
|
127
127
|
* ```
|
|
128
128
|
*/
|
|
129
|
-
function initiateResetPassword(options) {
|
|
129
|
+
function initiateResetPassword(options, headers) {
|
|
130
130
|
const _serviceURL = window.webAuthSettings.authority + "/users-srv/resetpassword/initiate";
|
|
131
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
|
|
131
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
|
|
132
132
|
}
|
|
133
133
|
exports.initiateResetPassword = initiateResetPassword;
|
|
134
134
|
/**
|
|
@@ -147,7 +147,7 @@ exports.initiateResetPassword = initiateResetPassword;
|
|
|
147
147
|
* });
|
|
148
148
|
* ```
|
|
149
149
|
*/
|
|
150
|
-
function handleResetPassword(options, handleResponseAsJson) {
|
|
150
|
+
function handleResetPassword(options, handleResponseAsJson, headers) {
|
|
151
151
|
try {
|
|
152
152
|
const url = window.webAuthSettings.authority + "/users-srv/resetpassword/validatecode";
|
|
153
153
|
if (!handleResponseAsJson) {
|
|
@@ -158,7 +158,7 @@ function handleResetPassword(options, handleResponseAsJson) {
|
|
|
158
158
|
}
|
|
159
159
|
else {
|
|
160
160
|
// older cidaas service handling return json object
|
|
161
|
-
return Helper_1.Helper.createHttpPromise(options, url, false, "POST");
|
|
161
|
+
return Helper_1.Helper.createHttpPromise(options, url, false, "POST", undefined, headers);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
catch (ex) {
|
|
@@ -184,7 +184,7 @@ exports.handleResetPassword = handleResetPassword;
|
|
|
184
184
|
* });
|
|
185
185
|
* ```
|
|
186
186
|
*/
|
|
187
|
-
function resetPassword(options, handleResponseAsJson) {
|
|
187
|
+
function resetPassword(options, handleResponseAsJson, headers) {
|
|
188
188
|
const url = window.webAuthSettings.authority + "/users-srv/resetpassword/accept";
|
|
189
189
|
try {
|
|
190
190
|
if (!handleResponseAsJson) {
|
|
@@ -195,7 +195,7 @@ function resetPassword(options, handleResponseAsJson) {
|
|
|
195
195
|
}
|
|
196
196
|
else {
|
|
197
197
|
// older cidaas service handling return json object
|
|
198
|
-
return Helper_1.Helper.createHttpPromise(options, url, false, "POST");
|
|
198
|
+
return Helper_1.Helper.createHttpPromise(options, url, false, "POST", undefined, headers);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
catch (ex) {
|
|
@@ -216,9 +216,9 @@ exports.resetPassword = resetPassword;
|
|
|
216
216
|
* });
|
|
217
217
|
* ```
|
|
218
218
|
*/
|
|
219
|
-
function getDeduplicationDetails(options) {
|
|
219
|
+
function getDeduplicationDetails(options, headers) {
|
|
220
220
|
const _serviceURL = window.webAuthSettings.authority + "/users-srv/deduplication/info/" + options.trackId;
|
|
221
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "GET");
|
|
221
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "GET", undefined, headers);
|
|
222
222
|
}
|
|
223
223
|
exports.getDeduplicationDetails = getDeduplicationDetails;
|
|
224
224
|
/**
|
|
@@ -257,9 +257,9 @@ exports.deduplicationLogin = deduplicationLogin;
|
|
|
257
257
|
* });
|
|
258
258
|
* ```
|
|
259
259
|
*/
|
|
260
|
-
function registerDeduplication(options) {
|
|
260
|
+
function registerDeduplication(options, headers) {
|
|
261
261
|
const _serviceURL = window.webAuthSettings.authority + "/users-srv/deduplication/register/" + options.trackId;
|
|
262
|
-
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, undefined, "POST");
|
|
262
|
+
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, undefined, "POST", undefined, headers);
|
|
263
263
|
}
|
|
264
264
|
exports.registerDeduplication = registerDeduplication;
|
|
265
265
|
/**
|
|
@@ -431,7 +431,7 @@ exports.deleteUserAccount = deleteUserAccount;
|
|
|
431
431
|
* });
|
|
432
432
|
* ```
|
|
433
433
|
*/
|
|
434
|
-
function userCheckExists(options) {
|
|
434
|
+
function userCheckExists(options, headers) {
|
|
435
435
|
let queryParameter = '';
|
|
436
436
|
if (options.webfinger || options.rememberMe) {
|
|
437
437
|
queryParameter += '?';
|
|
@@ -446,6 +446,6 @@ function userCheckExists(options) {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
const _serviceURL = window.webAuthSettings.authority + "/useractions-srv/userexistence/" + options.requestId + queryParameter;
|
|
449
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, undefined, "POST");
|
|
449
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, undefined, "POST", undefined, headers);
|
|
450
450
|
}
|
|
451
451
|
exports.userCheckExists = userCheckExists;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HTTPRequestHeader } from "../common/Common.model";
|
|
1
2
|
import { AuthenticateMFARequest, CancelMFARequest, CheckVerificationTypeConfiguredRequest, ConfigureFriendlyNameRequest, ConfigureVerificationRequest, EnrollVerificationRequest, GetMFAListRequest, InitiateAccountVerificationRequest, InitiateEnrollmentRequest, InitiateMFARequest, InitiateVerificationRequest, VerifyAccountRequest } from "./VerificationService.model";
|
|
2
3
|
/**
|
|
3
4
|
* To initiate the account verification, call **initiateAccountVerification()**. This will send verification code email or sms or ivr based on the verificationMedium you mentioned.
|
|
@@ -32,7 +33,7 @@ export declare function initiateAccountVerification(options: InitiateAccountVeri
|
|
|
32
33
|
* });
|
|
33
34
|
* ```
|
|
34
35
|
*/
|
|
35
|
-
export declare function verifyAccount(options: VerifyAccountRequest): Promise<any>;
|
|
36
|
+
export declare function verifyAccount(options: VerifyAccountRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
36
37
|
/**
|
|
37
38
|
* To get all configured multi factor authentication, call **getMFAList()**.
|
|
38
39
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/ee688a9c52b63-list-of-configured-verification-methods for more details.
|
|
@@ -48,7 +49,7 @@ export declare function verifyAccount(options: VerifyAccountRequest): Promise<an
|
|
|
48
49
|
* });
|
|
49
50
|
* ```
|
|
50
51
|
*/
|
|
51
|
-
export declare function getMFAList(options: GetMFAListRequest): Promise<any>;
|
|
52
|
+
export declare function getMFAList(options: GetMFAListRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
52
53
|
/**
|
|
53
54
|
* to cancel mfa process, call **cancelMFA()**.
|
|
54
55
|
* @example
|
|
@@ -64,7 +65,7 @@ export declare function getMFAList(options: GetMFAListRequest): Promise<any>;
|
|
|
64
65
|
* });
|
|
65
66
|
* ```
|
|
66
67
|
*/
|
|
67
|
-
export declare function cancelMFA(options: CancelMFARequest): Promise<any>;
|
|
68
|
+
export declare function cancelMFA(options: CancelMFARequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
68
69
|
/**
|
|
69
70
|
* To get list of all verification type configured, call **getAllVerificationList()**. access_token must be passed as function parameter.
|
|
70
71
|
* @example
|
|
@@ -80,7 +81,7 @@ export declare function cancelMFA(options: CancelMFARequest): Promise<any>;
|
|
|
80
81
|
* });
|
|
81
82
|
* ```
|
|
82
83
|
*/
|
|
83
|
-
export declare function getAllVerificationList(access_token: string): Promise<any>;
|
|
84
|
+
export declare function getAllVerificationList(access_token: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
84
85
|
/**
|
|
85
86
|
* To initiate enrollment of new multi factor authentication, call **initiateEnrollment()**.
|
|
86
87
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/f85aef6754714-initiate-physical-verification-setup for more details.
|
|
@@ -119,7 +120,7 @@ export declare function initiateEnrollment(options: InitiateEnrollmentRequest, a
|
|
|
119
120
|
* });
|
|
120
121
|
* ```
|
|
121
122
|
*/
|
|
122
|
-
export declare function getEnrollmentStatus(status_id: string, accessToken: string): Promise<any>;
|
|
123
|
+
export declare function getEnrollmentStatus(status_id: string, accessToken: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
123
124
|
/**
|
|
124
125
|
* to finish enrollment process of new multi factor authentication, call **enrollVerification()**.
|
|
125
126
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/20ec76e937b27-enroll-physical-verification-setup for more details.
|
|
@@ -184,7 +185,7 @@ export declare function checkVerificationTypeConfigured(options: CheckVerificati
|
|
|
184
185
|
* });
|
|
185
186
|
* ```
|
|
186
187
|
*/
|
|
187
|
-
export declare function initiateMFA(options: InitiateMFARequest, accessToken?: string): Promise<any>;
|
|
188
|
+
export declare function initiateMFA(options: InitiateMFARequest, accessToken?: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
188
189
|
/**
|
|
189
190
|
* to authenticate with multi factor auhentication, call **authenticateMFA()**.
|
|
190
191
|
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/1aa38936252d6-perform-the-authentication-method for more details.
|
|
@@ -203,7 +204,7 @@ export declare function initiateMFA(options: InitiateMFARequest, accessToken?: s
|
|
|
203
204
|
* });
|
|
204
205
|
* ```
|
|
205
206
|
*/
|
|
206
|
-
export declare function authenticateMFA(options: AuthenticateMFARequest): Promise<any>;
|
|
207
|
+
export declare function authenticateMFA(options: AuthenticateMFARequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
207
208
|
/**
|
|
208
209
|
* to initiate verification process, call **initiateVerification**
|
|
209
210
|
*/
|
|
@@ -46,9 +46,9 @@ exports.initiateAccountVerification = initiateAccountVerification;
|
|
|
46
46
|
* });
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
|
-
function verifyAccount(options) {
|
|
49
|
+
function verifyAccount(options, headers) {
|
|
50
50
|
const _serviceURL = window.webAuthSettings.authority + "/verification-srv/account/verify";
|
|
51
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
|
|
51
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
|
|
52
52
|
}
|
|
53
53
|
exports.verifyAccount = verifyAccount;
|
|
54
54
|
/**
|
|
@@ -66,9 +66,9 @@ exports.verifyAccount = verifyAccount;
|
|
|
66
66
|
* });
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
|
-
function getMFAList(options) {
|
|
69
|
+
function getMFAList(options, headers) {
|
|
70
70
|
const _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/setup/public/configured/list";
|
|
71
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
|
|
71
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
|
|
72
72
|
}
|
|
73
73
|
exports.getMFAList = getMFAList;
|
|
74
74
|
/**
|
|
@@ -86,9 +86,9 @@ exports.getMFAList = getMFAList;
|
|
|
86
86
|
* });
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
function cancelMFA(options) {
|
|
89
|
+
function cancelMFA(options, headers) {
|
|
90
90
|
const _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/authenticate/cancel/" + options.type;
|
|
91
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, undefined, "POST");
|
|
91
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, undefined, "POST", undefined, headers);
|
|
92
92
|
}
|
|
93
93
|
exports.cancelMFA = cancelMFA;
|
|
94
94
|
/**
|
|
@@ -106,9 +106,9 @@ exports.cancelMFA = cancelMFA;
|
|
|
106
106
|
* });
|
|
107
107
|
* ```
|
|
108
108
|
*/
|
|
109
|
-
function getAllVerificationList(access_token) {
|
|
109
|
+
function getAllVerificationList(access_token, headers) {
|
|
110
110
|
const _serviceURL = `${window.webAuthSettings.authority}/verification-srv/config/list`;
|
|
111
|
-
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, undefined, "GET", access_token);
|
|
111
|
+
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, undefined, "GET", access_token, headers);
|
|
112
112
|
}
|
|
113
113
|
exports.getAllVerificationList = getAllVerificationList;
|
|
114
114
|
/**
|
|
@@ -153,9 +153,9 @@ exports.initiateEnrollment = initiateEnrollment;
|
|
|
153
153
|
* });
|
|
154
154
|
* ```
|
|
155
155
|
*/
|
|
156
|
-
function getEnrollmentStatus(status_id, accessToken) {
|
|
156
|
+
function getEnrollmentStatus(status_id, accessToken, headers) {
|
|
157
157
|
const _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/notification/status/" + status_id;
|
|
158
|
-
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, undefined, "POST", accessToken);
|
|
158
|
+
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, undefined, "POST", accessToken, headers);
|
|
159
159
|
}
|
|
160
160
|
exports.getEnrollmentStatus = getEnrollmentStatus;
|
|
161
161
|
/**
|
|
@@ -230,13 +230,13 @@ exports.checkVerificationTypeConfigured = checkVerificationTypeConfigured;
|
|
|
230
230
|
* });
|
|
231
231
|
* ```
|
|
232
232
|
*/
|
|
233
|
-
function initiateMFA(options, accessToken) {
|
|
233
|
+
function initiateMFA(options, accessToken, headers) {
|
|
234
234
|
const _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/authenticate/initiate/" + options.type;
|
|
235
235
|
// BREAKING TODO: remove accessToken parameter in the next major release
|
|
236
236
|
if (accessToken) {
|
|
237
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", accessToken);
|
|
237
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", accessToken, headers);
|
|
238
238
|
}
|
|
239
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
|
|
239
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
|
|
240
240
|
}
|
|
241
241
|
exports.initiateMFA = initiateMFA;
|
|
242
242
|
/**
|
|
@@ -257,9 +257,9 @@ exports.initiateMFA = initiateMFA;
|
|
|
257
257
|
* });
|
|
258
258
|
* ```
|
|
259
259
|
*/
|
|
260
|
-
function authenticateMFA(options) {
|
|
260
|
+
function authenticateMFA(options, headers) {
|
|
261
261
|
const _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/authenticate/authenticate/" + options.type;
|
|
262
|
-
return Helper_1.Helper.createHttpPromise(options, _serviceURL, undefined, "POST");
|
|
262
|
+
return Helper_1.Helper.createHttpPromise(options, _serviceURL, undefined, "POST", undefined, headers);
|
|
263
263
|
}
|
|
264
264
|
exports.authenticateMFA = authenticateMFA;
|
|
265
265
|
/**
|
|
@@ -8,7 +8,7 @@ import { HTTPRequestHeader } from "../common/Common.model";
|
|
|
8
8
|
import { User } from "oidc-client-ts";
|
|
9
9
|
import { OidcSettings, LoginRedirectOptions, PopupSignInOptions, SilentSignInOptions, LogoutRedirectOptions, PopupSignOutOptions, LogoutResponse, LoginRequestOptions } from "../authentication/Authentication.model";
|
|
10
10
|
import { AuthenticateMFARequest, CancelMFARequest, CheckVerificationTypeConfiguredRequest, ConfigureFriendlyNameRequest, ConfigureVerificationRequest, EnrollVerificationRequest, GetMFAListRequest, InitiateAccountVerificationRequest, InitiateEnrollmentRequest, InitiateMFARequest, InitiateVerificationRequest, VerifyAccountRequest } from "../verification-service/VerificationService.model";
|
|
11
|
-
import { DeleteDeviceRequest, GetClientInfoRequest, GetRegistrationSetupRequest, GetUserActivitiesRequest, LogoutUserRequest, UpdateProfileImageRequest, UserActionOnEnrollmentRequest } from "./webauth.model";
|
|
11
|
+
import { DeleteDeviceRequest, GetClientInfoRequest, GetRegistrationSetupRequest, GetUserActivitiesRequest, LogoutUserRequest, UpdateProfileImageRequest, UserActionOnEnrollmentRequest, GetRequestIdRequest } from "./webauth.model";
|
|
12
12
|
export declare const createPreloginWebauth: (authority: string) => WebAuth;
|
|
13
13
|
export declare class WebAuth {
|
|
14
14
|
constructor(settings: OidcSettings);
|
|
@@ -114,14 +114,26 @@ export declare class WebAuth {
|
|
|
114
114
|
* Each and every proccesses starts with requestId, it is an entry point to login or register. For getting the requestId, call **getRequestId()**.
|
|
115
115
|
* @example
|
|
116
116
|
* ```js
|
|
117
|
+
* // To get requestId using default configured settings, run the function without parameter
|
|
117
118
|
* cidaas.getRequestId().then(function (response) {
|
|
118
119
|
* // the response will give you request id.
|
|
119
120
|
* }).catch(function(ex) {
|
|
120
121
|
* // your failure code here
|
|
121
122
|
* });
|
|
123
|
+
*
|
|
124
|
+
* // To get requestId using custom settings, run the function with custom setting(s) inside option parameter. Example below will only override client_id & redirect_uri
|
|
125
|
+
* const option: GetRequestIdRequest = {
|
|
126
|
+
* 'client_id': 'your client id',
|
|
127
|
+
* 'redirect_uri': 'your redirect url',
|
|
128
|
+
* }
|
|
129
|
+
* cidaas.getRequestId(option).then(function (response) {
|
|
130
|
+
* // the response will give you request id.
|
|
131
|
+
* }).catch(function(ex) {
|
|
132
|
+
* // your failure code here
|
|
133
|
+
* });
|
|
122
134
|
* ```
|
|
123
135
|
*/
|
|
124
|
-
getRequestId(): Promise<any>;
|
|
136
|
+
getRequestId(option?: GetRequestIdRequest): Promise<any>;
|
|
125
137
|
/**
|
|
126
138
|
* To get the tenant basic information, call **getTenantInfo()**. This will return the basic tenant details such as tenant name and allowed login with types (Email, Mobile, Username).
|
|
127
139
|
* @example
|
|
@@ -272,12 +284,14 @@ export declare class WebAuth {
|
|
|
272
284
|
/**
|
|
273
285
|
* get invite info
|
|
274
286
|
* @param options
|
|
287
|
+
* @param headers
|
|
275
288
|
* @returns
|
|
276
289
|
*/
|
|
277
|
-
getInviteUserDetails(options: GetInviteUserDetailsRequest): Promise<any>;
|
|
290
|
+
getInviteUserDetails(options: GetInviteUserDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
278
291
|
/**
|
|
279
292
|
* get Communication status
|
|
280
293
|
* @param options
|
|
294
|
+
* @param headers
|
|
281
295
|
* @returns
|
|
282
296
|
*/
|
|
283
297
|
getCommunicationStatus(options: getCommunicationStatusRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
@@ -290,37 +304,45 @@ export declare class WebAuth {
|
|
|
290
304
|
/**
|
|
291
305
|
* verify account
|
|
292
306
|
* @param options
|
|
307
|
+
* @param headers
|
|
293
308
|
* @returns
|
|
294
309
|
*/
|
|
295
|
-
verifyAccount(options: VerifyAccountRequest): Promise<any>;
|
|
310
|
+
verifyAccount(options: VerifyAccountRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
296
311
|
/**
|
|
297
312
|
* initiate reset password
|
|
298
313
|
* @param options
|
|
314
|
+
* @param headers
|
|
299
315
|
* @returns
|
|
300
316
|
*/
|
|
301
|
-
initiateResetPassword(options: InitiateResetPasswordRequest): Promise<any>;
|
|
317
|
+
initiateResetPassword(options: InitiateResetPasswordRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
302
318
|
/**
|
|
303
319
|
* handle reset password
|
|
304
320
|
* @param options
|
|
321
|
+
* @param handleResponseAsJson
|
|
322
|
+
* @param headers
|
|
305
323
|
*/
|
|
306
|
-
handleResetPassword(options: HandleResetPasswordRequest): Promise<any>;
|
|
324
|
+
handleResetPassword(options: HandleResetPasswordRequest, handleResponseAsJson?: boolean, headers?: HTTPRequestHeader): Promise<any>;
|
|
307
325
|
/**
|
|
308
326
|
* reset password
|
|
309
327
|
* @param options
|
|
328
|
+
* @param handleResponseAsJson
|
|
329
|
+
* @param headers
|
|
310
330
|
*/
|
|
311
|
-
resetPassword(options: ResetPasswordRequest): Promise<any>;
|
|
331
|
+
resetPassword(options: ResetPasswordRequest, handleResponseAsJson?: boolean, headers?: HTTPRequestHeader): Promise<any>;
|
|
312
332
|
/**
|
|
313
333
|
* get mfa list
|
|
314
334
|
* @param options
|
|
335
|
+
* @param headers
|
|
315
336
|
* @returns
|
|
316
337
|
*/
|
|
317
|
-
getMFAList(options: GetMFAListRequest): Promise<any>;
|
|
338
|
+
getMFAList(options: GetMFAListRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
318
339
|
/**
|
|
319
340
|
* cancel mfa
|
|
320
341
|
* @param options
|
|
342
|
+
* @param headers
|
|
321
343
|
* @returns
|
|
322
344
|
*/
|
|
323
|
-
cancelMFA(options: CancelMFARequest): Promise<any>;
|
|
345
|
+
cancelMFA(options: CancelMFARequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
324
346
|
/**
|
|
325
347
|
* passwordless login
|
|
326
348
|
* @param options
|
|
@@ -331,37 +353,42 @@ export declare class WebAuth {
|
|
|
331
353
|
* @param options
|
|
332
354
|
* @returns
|
|
333
355
|
*/
|
|
334
|
-
getConsentDetails(options: GetConsentDetailsRequest): Promise<any>;
|
|
356
|
+
getConsentDetails(options: GetConsentDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
335
357
|
/**
|
|
336
358
|
* accept consent
|
|
337
359
|
* @param options
|
|
360
|
+
* @param headers
|
|
338
361
|
* @returns
|
|
339
362
|
*/
|
|
340
|
-
acceptConsent(options: AcceptConsentRequest): Promise<any>;
|
|
363
|
+
acceptConsent(options: AcceptConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
341
364
|
/**
|
|
342
365
|
* get scope consent details
|
|
343
366
|
* @param options
|
|
367
|
+
* @param headers
|
|
344
368
|
* @returns
|
|
345
369
|
*/
|
|
346
|
-
loginPrecheck(options: LoginPrecheckRequest): Promise<any>;
|
|
370
|
+
loginPrecheck(options: LoginPrecheckRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
347
371
|
/**
|
|
348
372
|
* get scope consent version details
|
|
349
373
|
* @param options
|
|
374
|
+
* @param headers
|
|
350
375
|
* @returns
|
|
351
376
|
*/
|
|
352
|
-
getConsentVersionDetails(options: GetConsentVersionDetailsRequest): Promise<any>;
|
|
377
|
+
getConsentVersionDetails(options: GetConsentVersionDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
353
378
|
/**
|
|
354
379
|
* accept scope Consent
|
|
355
380
|
* @param options
|
|
381
|
+
* @param headers
|
|
356
382
|
* @returns
|
|
357
383
|
*/
|
|
358
|
-
acceptScopeConsent(options: AcceptScopeConsentRequest): Promise<any>;
|
|
384
|
+
acceptScopeConsent(options: AcceptScopeConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
359
385
|
/**
|
|
360
386
|
* accept claim Consent
|
|
361
387
|
* @param options
|
|
388
|
+
* @param headers
|
|
362
389
|
* @returns
|
|
363
390
|
*/
|
|
364
|
-
acceptClaimConsent(options: AcceptClaimConsentRequest): Promise<any>;
|
|
391
|
+
acceptClaimConsent(options: AcceptClaimConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
365
392
|
/**
|
|
366
393
|
* revoke claim Consent
|
|
367
394
|
* @param options
|
|
@@ -371,9 +398,10 @@ export declare class WebAuth {
|
|
|
371
398
|
/**
|
|
372
399
|
* get Deduplication details
|
|
373
400
|
* @param options
|
|
401
|
+
* @param headers
|
|
374
402
|
* @returns
|
|
375
403
|
*/
|
|
376
|
-
getDeduplicationDetails(options: GetDeduplicationDetailsRequest): Promise<any>;
|
|
404
|
+
getDeduplicationDetails(options: GetDeduplicationDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
377
405
|
/**
|
|
378
406
|
* deduplication login
|
|
379
407
|
* @param options
|
|
@@ -382,9 +410,10 @@ export declare class WebAuth {
|
|
|
382
410
|
/**
|
|
383
411
|
* register Deduplication
|
|
384
412
|
* @param options
|
|
413
|
+
* @param headers
|
|
385
414
|
* @returns
|
|
386
415
|
*/
|
|
387
|
-
registerDeduplication(options: RegisterDeduplicationRequest): Promise<any>;
|
|
416
|
+
registerDeduplication(options: RegisterDeduplicationRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
388
417
|
/**
|
|
389
418
|
* consent continue login
|
|
390
419
|
* @param options
|
|
@@ -451,9 +480,10 @@ export declare class WebAuth {
|
|
|
451
480
|
userActionOnEnrollment(options: UserActionOnEnrollmentRequest, trackId: string): Promise<any>;
|
|
452
481
|
/**
|
|
453
482
|
* @param access_token
|
|
483
|
+
* @param headers
|
|
454
484
|
* @returns
|
|
455
485
|
*/
|
|
456
|
-
getAllVerificationList(access_token: string): Promise<any>;
|
|
486
|
+
getAllVerificationList(access_token: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
457
487
|
/**
|
|
458
488
|
* initiate link accoount
|
|
459
489
|
* @param options
|
|
@@ -509,9 +539,10 @@ export declare class WebAuth {
|
|
|
509
539
|
/**
|
|
510
540
|
* update the status of notification
|
|
511
541
|
* @param status_id
|
|
542
|
+
* @param headers
|
|
512
543
|
* @returns
|
|
513
544
|
*/
|
|
514
|
-
getEnrollmentStatus(status_id: string, accessToken: string): Promise<any>;
|
|
545
|
+
getEnrollmentStatus(status_id: string, accessToken: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
515
546
|
/**
|
|
516
547
|
* enrollVerification
|
|
517
548
|
* @param options
|
|
@@ -551,7 +582,7 @@ export declare class WebAuth {
|
|
|
551
582
|
*/
|
|
552
583
|
getMissingFields(trackId: string, useSocialProvider?: {
|
|
553
584
|
requestId: string;
|
|
554
|
-
}): Promise<any>;
|
|
585
|
+
}, headers?: HTTPRequestHeader): Promise<any>;
|
|
555
586
|
/**
|
|
556
587
|
* progressiveRegistration
|
|
557
588
|
* @param options
|
|
@@ -576,9 +607,10 @@ export declare class WebAuth {
|
|
|
576
607
|
/**
|
|
577
608
|
* check if an user exists
|
|
578
609
|
* @param options
|
|
610
|
+
* @param headers
|
|
579
611
|
* @returns
|
|
580
612
|
*/
|
|
581
|
-
userCheckExists(options: UserCheckExistsRequest): Promise<any>;
|
|
613
|
+
userCheckExists(options: UserCheckExistsRequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
582
614
|
/**
|
|
583
615
|
* To set accept language
|
|
584
616
|
* @param acceptLanguage
|
|
@@ -587,15 +619,17 @@ export declare class WebAuth {
|
|
|
587
619
|
/**
|
|
588
620
|
* initiate mfa
|
|
589
621
|
* @param options
|
|
622
|
+
* @param headers
|
|
590
623
|
* @returns
|
|
591
624
|
*/
|
|
592
|
-
initiateMFA(options: InitiateMFARequest, accessToken?: string): Promise<any>;
|
|
625
|
+
initiateMFA(options: InitiateMFARequest, accessToken?: string, headers?: HTTPRequestHeader): Promise<any>;
|
|
593
626
|
/**
|
|
594
627
|
* authenticate mfa
|
|
595
628
|
* @param options
|
|
629
|
+
* @param headers
|
|
596
630
|
* @returns
|
|
597
631
|
*/
|
|
598
|
-
authenticateMFA(options: AuthenticateMFARequest): Promise<any>;
|
|
632
|
+
authenticateMFA(options: AuthenticateMFARequest, headers?: HTTPRequestHeader): Promise<any>;
|
|
599
633
|
/**
|
|
600
634
|
* initiate verification
|
|
601
635
|
* @param options
|
package/dist/web-auth/WebAuth.js
CHANGED
|
@@ -224,19 +224,31 @@ class WebAuth {
|
|
|
224
224
|
* Each and every proccesses starts with requestId, it is an entry point to login or register. For getting the requestId, call **getRequestId()**.
|
|
225
225
|
* @example
|
|
226
226
|
* ```js
|
|
227
|
+
* // To get requestId using default configured settings, run the function without parameter
|
|
227
228
|
* cidaas.getRequestId().then(function (response) {
|
|
228
229
|
* // the response will give you request id.
|
|
229
230
|
* }).catch(function(ex) {
|
|
230
231
|
* // your failure code here
|
|
231
232
|
* });
|
|
233
|
+
*
|
|
234
|
+
* // To get requestId using custom settings, run the function with custom setting(s) inside option parameter. Example below will only override client_id & redirect_uri
|
|
235
|
+
* const option: GetRequestIdRequest = {
|
|
236
|
+
* 'client_id': 'your client id',
|
|
237
|
+
* 'redirect_uri': 'your redirect url',
|
|
238
|
+
* }
|
|
239
|
+
* cidaas.getRequestId(option).then(function (response) {
|
|
240
|
+
* // the response will give you request id.
|
|
241
|
+
* }).catch(function(ex) {
|
|
242
|
+
* // your failure code here
|
|
243
|
+
* });
|
|
232
244
|
* ```
|
|
233
245
|
*/
|
|
234
|
-
getRequestId() {
|
|
235
|
-
var _a, _b;
|
|
246
|
+
getRequestId(option) {
|
|
247
|
+
var _a, _b, _c, _d, _e;
|
|
236
248
|
const ui_locales = window.webAuthSettings.ui_locales;
|
|
237
|
-
const
|
|
249
|
+
const payload = Object.assign({ 'client_id': (_a = option === null || option === void 0 ? void 0 : option.client_id) !== null && _a !== void 0 ? _a : window.webAuthSettings.client_id, 'redirect_uri': (_b = option === null || option === void 0 ? void 0 : option.redirect_uri) !== null && _b !== void 0 ? _b : window.webAuthSettings.redirect_uri, 'response_type': (_c = option === null || option === void 0 ? void 0 : option.response_type) !== null && _c !== void 0 ? _c : (window.webAuthSettings.response_type || 'token'), 'response_mode': (_d = option === null || option === void 0 ? void 0 : option.response_mode) !== null && _d !== void 0 ? _d : (window.webAuthSettings.response_mode || 'fragment'), 'scope': (_e = option === null || option === void 0 ? void 0 : option.scope) !== null && _e !== void 0 ? _e : window.webAuthSettings.scope, 'nonce': new Date().getTime().toString() }, (ui_locales && { ui_locales } || {}));
|
|
238
250
|
const serviceURL = window.webAuthSettings.authority + '/authz-srv/authrequest/authz/generate';
|
|
239
|
-
return Helper_1.Helper.createHttpPromise(
|
|
251
|
+
return Helper_1.Helper.createHttpPromise(payload, serviceURL, false, "POST");
|
|
240
252
|
}
|
|
241
253
|
/**
|
|
242
254
|
* To get the tenant basic information, call **getTenantInfo()**. This will return the basic tenant details such as tenant name and allowed login with types (Email, Mobile, Username).
|
|
@@ -435,14 +447,16 @@ class WebAuth {
|
|
|
435
447
|
/**
|
|
436
448
|
* get invite info
|
|
437
449
|
* @param options
|
|
450
|
+
* @param headers
|
|
438
451
|
* @returns
|
|
439
452
|
*/
|
|
440
|
-
getInviteUserDetails(options) {
|
|
441
|
-
return UserService.getInviteUserDetails(options);
|
|
453
|
+
getInviteUserDetails(options, headers) {
|
|
454
|
+
return UserService.getInviteUserDetails(options, headers);
|
|
442
455
|
}
|
|
443
456
|
/**
|
|
444
457
|
* get Communication status
|
|
445
458
|
* @param options
|
|
459
|
+
* @param headers
|
|
446
460
|
* @returns
|
|
447
461
|
*/
|
|
448
462
|
getCommunicationStatus(options, headers) {
|
|
@@ -459,48 +473,56 @@ class WebAuth {
|
|
|
459
473
|
/**
|
|
460
474
|
* verify account
|
|
461
475
|
* @param options
|
|
476
|
+
* @param headers
|
|
462
477
|
* @returns
|
|
463
478
|
*/
|
|
464
|
-
verifyAccount(options) {
|
|
465
|
-
return VerificationService.verifyAccount(options);
|
|
479
|
+
verifyAccount(options, headers) {
|
|
480
|
+
return VerificationService.verifyAccount(options, headers);
|
|
466
481
|
}
|
|
467
482
|
/**
|
|
468
483
|
* initiate reset password
|
|
469
484
|
* @param options
|
|
485
|
+
* @param headers
|
|
470
486
|
* @returns
|
|
471
487
|
*/
|
|
472
|
-
initiateResetPassword(options) {
|
|
473
|
-
return UserService.initiateResetPassword(options);
|
|
488
|
+
initiateResetPassword(options, headers) {
|
|
489
|
+
return UserService.initiateResetPassword(options, headers);
|
|
474
490
|
}
|
|
475
491
|
/**
|
|
476
492
|
* handle reset password
|
|
477
493
|
* @param options
|
|
494
|
+
* @param handleResponseAsJson
|
|
495
|
+
* @param headers
|
|
478
496
|
*/
|
|
479
|
-
handleResetPassword(options) {
|
|
480
|
-
return UserService.handleResetPassword(options);
|
|
497
|
+
handleResetPassword(options, handleResponseAsJson, headers) {
|
|
498
|
+
return UserService.handleResetPassword(options, handleResponseAsJson, headers);
|
|
481
499
|
}
|
|
482
500
|
/**
|
|
483
501
|
* reset password
|
|
484
502
|
* @param options
|
|
503
|
+
* @param handleResponseAsJson
|
|
504
|
+
* @param headers
|
|
485
505
|
*/
|
|
486
|
-
resetPassword(options) {
|
|
487
|
-
return UserService.resetPassword(options);
|
|
506
|
+
resetPassword(options, handleResponseAsJson, headers) {
|
|
507
|
+
return UserService.resetPassword(options, handleResponseAsJson, headers);
|
|
488
508
|
}
|
|
489
509
|
/**
|
|
490
510
|
* get mfa list
|
|
491
511
|
* @param options
|
|
512
|
+
* @param headers
|
|
492
513
|
* @returns
|
|
493
514
|
*/
|
|
494
|
-
getMFAList(options) {
|
|
495
|
-
return VerificationService.getMFAList(options);
|
|
515
|
+
getMFAList(options, headers) {
|
|
516
|
+
return VerificationService.getMFAList(options, headers);
|
|
496
517
|
}
|
|
497
518
|
/**
|
|
498
519
|
* cancel mfa
|
|
499
520
|
* @param options
|
|
521
|
+
* @param headers
|
|
500
522
|
* @returns
|
|
501
523
|
*/
|
|
502
|
-
cancelMFA(options) {
|
|
503
|
-
return VerificationService.cancelMFA(options);
|
|
524
|
+
cancelMFA(options, headers) {
|
|
525
|
+
return VerificationService.cancelMFA(options, headers);
|
|
504
526
|
}
|
|
505
527
|
/**
|
|
506
528
|
* passwordless login
|
|
@@ -514,48 +536,53 @@ class WebAuth {
|
|
|
514
536
|
* @param options
|
|
515
537
|
* @returns
|
|
516
538
|
*/
|
|
517
|
-
getConsentDetails(options) {
|
|
518
|
-
return ConsentService.getConsentDetails(options);
|
|
539
|
+
getConsentDetails(options, headers) {
|
|
540
|
+
return ConsentService.getConsentDetails(options, headers);
|
|
519
541
|
}
|
|
520
542
|
/**
|
|
521
543
|
* accept consent
|
|
522
544
|
* @param options
|
|
545
|
+
* @param headers
|
|
523
546
|
* @returns
|
|
524
547
|
*/
|
|
525
|
-
acceptConsent(options) {
|
|
526
|
-
return ConsentService.acceptConsent(options);
|
|
548
|
+
acceptConsent(options, headers) {
|
|
549
|
+
return ConsentService.acceptConsent(options, headers);
|
|
527
550
|
}
|
|
528
551
|
/**
|
|
529
552
|
* get scope consent details
|
|
530
553
|
* @param options
|
|
554
|
+
* @param headers
|
|
531
555
|
* @returns
|
|
532
556
|
*/
|
|
533
|
-
loginPrecheck(options) {
|
|
534
|
-
return TokenService.loginPrecheck(options);
|
|
557
|
+
loginPrecheck(options, headers) {
|
|
558
|
+
return TokenService.loginPrecheck(options, headers);
|
|
535
559
|
}
|
|
536
560
|
/**
|
|
537
561
|
* get scope consent version details
|
|
538
562
|
* @param options
|
|
563
|
+
* @param headers
|
|
539
564
|
* @returns
|
|
540
565
|
*/
|
|
541
|
-
getConsentVersionDetails(options) {
|
|
542
|
-
return ConsentService.getConsentVersionDetails(options);
|
|
566
|
+
getConsentVersionDetails(options, headers) {
|
|
567
|
+
return ConsentService.getConsentVersionDetails(options, headers);
|
|
543
568
|
}
|
|
544
569
|
/**
|
|
545
570
|
* accept scope Consent
|
|
546
571
|
* @param options
|
|
572
|
+
* @param headers
|
|
547
573
|
* @returns
|
|
548
574
|
*/
|
|
549
|
-
acceptScopeConsent(options) {
|
|
550
|
-
return ConsentService.acceptScopeConsent(options);
|
|
575
|
+
acceptScopeConsent(options, headers) {
|
|
576
|
+
return ConsentService.acceptScopeConsent(options, headers);
|
|
551
577
|
}
|
|
552
578
|
/**
|
|
553
579
|
* accept claim Consent
|
|
554
580
|
* @param options
|
|
581
|
+
* @param headers
|
|
555
582
|
* @returns
|
|
556
583
|
*/
|
|
557
|
-
acceptClaimConsent(options) {
|
|
558
|
-
return ConsentService.acceptClaimConsent(options);
|
|
584
|
+
acceptClaimConsent(options, headers) {
|
|
585
|
+
return ConsentService.acceptClaimConsent(options, headers);
|
|
559
586
|
}
|
|
560
587
|
/**
|
|
561
588
|
* revoke claim Consent
|
|
@@ -568,10 +595,11 @@ class WebAuth {
|
|
|
568
595
|
/**
|
|
569
596
|
* get Deduplication details
|
|
570
597
|
* @param options
|
|
598
|
+
* @param headers
|
|
571
599
|
* @returns
|
|
572
600
|
*/
|
|
573
|
-
getDeduplicationDetails(options) {
|
|
574
|
-
return UserService.getDeduplicationDetails(options);
|
|
601
|
+
getDeduplicationDetails(options, headers) {
|
|
602
|
+
return UserService.getDeduplicationDetails(options, headers);
|
|
575
603
|
}
|
|
576
604
|
/**
|
|
577
605
|
* deduplication login
|
|
@@ -583,10 +611,11 @@ class WebAuth {
|
|
|
583
611
|
/**
|
|
584
612
|
* register Deduplication
|
|
585
613
|
* @param options
|
|
614
|
+
* @param headers
|
|
586
615
|
* @returns
|
|
587
616
|
*/
|
|
588
|
-
registerDeduplication(options) {
|
|
589
|
-
return UserService.registerDeduplication(options);
|
|
617
|
+
registerDeduplication(options, headers) {
|
|
618
|
+
return UserService.registerDeduplication(options, headers);
|
|
590
619
|
}
|
|
591
620
|
/**
|
|
592
621
|
* consent continue login
|
|
@@ -670,10 +699,11 @@ class WebAuth {
|
|
|
670
699
|
}
|
|
671
700
|
/**
|
|
672
701
|
* @param access_token
|
|
702
|
+
* @param headers
|
|
673
703
|
* @returns
|
|
674
704
|
*/
|
|
675
|
-
getAllVerificationList(access_token) {
|
|
676
|
-
return VerificationService.getAllVerificationList(access_token);
|
|
705
|
+
getAllVerificationList(access_token, headers) {
|
|
706
|
+
return VerificationService.getAllVerificationList(access_token, headers);
|
|
677
707
|
}
|
|
678
708
|
/**
|
|
679
709
|
* initiate link accoount
|
|
@@ -758,10 +788,11 @@ class WebAuth {
|
|
|
758
788
|
/**
|
|
759
789
|
* update the status of notification
|
|
760
790
|
* @param status_id
|
|
791
|
+
* @param headers
|
|
761
792
|
* @returns
|
|
762
793
|
*/
|
|
763
|
-
getEnrollmentStatus(status_id, accessToken) {
|
|
764
|
-
return VerificationService.getEnrollmentStatus(status_id, accessToken);
|
|
794
|
+
getEnrollmentStatus(status_id, accessToken, headers) {
|
|
795
|
+
return VerificationService.getEnrollmentStatus(status_id, accessToken, headers);
|
|
765
796
|
}
|
|
766
797
|
/**
|
|
767
798
|
* enrollVerification
|
|
@@ -806,13 +837,13 @@ class WebAuth {
|
|
|
806
837
|
* ```
|
|
807
838
|
*
|
|
808
839
|
*/
|
|
809
|
-
getMissingFields(trackId, useSocialProvider) {
|
|
840
|
+
getMissingFields(trackId, useSocialProvider, headers) {
|
|
810
841
|
if (useSocialProvider) {
|
|
811
842
|
const _serviceURL = window.webAuthSettings.authority + "/public-srv/public/trackinfo/" + useSocialProvider.requestId + "/" + trackId;
|
|
812
|
-
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
|
|
843
|
+
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET", undefined, headers);
|
|
813
844
|
}
|
|
814
845
|
else {
|
|
815
|
-
return TokenService.getMissingFields(trackId);
|
|
846
|
+
return TokenService.getMissingFields(trackId, headers);
|
|
816
847
|
}
|
|
817
848
|
}
|
|
818
849
|
/**
|
|
@@ -847,10 +878,11 @@ class WebAuth {
|
|
|
847
878
|
/**
|
|
848
879
|
* check if an user exists
|
|
849
880
|
* @param options
|
|
881
|
+
* @param headers
|
|
850
882
|
* @returns
|
|
851
883
|
*/
|
|
852
|
-
userCheckExists(options) {
|
|
853
|
-
return UserService.userCheckExists(options);
|
|
884
|
+
userCheckExists(options, headers) {
|
|
885
|
+
return UserService.userCheckExists(options, headers);
|
|
854
886
|
}
|
|
855
887
|
/**
|
|
856
888
|
* To set accept language
|
|
@@ -862,22 +894,24 @@ class WebAuth {
|
|
|
862
894
|
/**
|
|
863
895
|
* initiate mfa
|
|
864
896
|
* @param options
|
|
897
|
+
* @param headers
|
|
865
898
|
* @returns
|
|
866
899
|
*/
|
|
867
|
-
initiateMFA(options, accessToken) {
|
|
900
|
+
initiateMFA(options, accessToken, headers) {
|
|
868
901
|
// BREAKING TODO: remove accessToken parameter in the next major release
|
|
869
902
|
if (accessToken) {
|
|
870
|
-
return VerificationService.initiateMFA(options, accessToken);
|
|
903
|
+
return VerificationService.initiateMFA(options, accessToken, headers);
|
|
871
904
|
}
|
|
872
|
-
return VerificationService.initiateMFA(options);
|
|
905
|
+
return VerificationService.initiateMFA(options, undefined, headers);
|
|
873
906
|
}
|
|
874
907
|
/**
|
|
875
908
|
* authenticate mfa
|
|
876
909
|
* @param options
|
|
910
|
+
* @param headers
|
|
877
911
|
* @returns
|
|
878
912
|
*/
|
|
879
|
-
authenticateMFA(options) {
|
|
880
|
-
return VerificationService.authenticateMFA(options);
|
|
913
|
+
authenticateMFA(options, headers) {
|
|
914
|
+
return VerificationService.authenticateMFA(options, headers);
|
|
881
915
|
}
|
|
882
916
|
/**
|
|
883
917
|
* initiate verification
|
|
@@ -48,3 +48,19 @@ export interface UserActionOnEnrollmentRequest {
|
|
|
48
48
|
/** action to be executed */
|
|
49
49
|
action: string;
|
|
50
50
|
}
|
|
51
|
+
export interface GetRequestIdRequest {
|
|
52
|
+
/** Unique identifier of client app, can be found in app setting under admin ui */
|
|
53
|
+
client_id?: string;
|
|
54
|
+
/** Specify the url where the user needs to be redirected after successful login */
|
|
55
|
+
redirect_uri?: string;
|
|
56
|
+
/** Permissions that are requested for this requestId */
|
|
57
|
+
scope?: string;
|
|
58
|
+
/** Response type expected for the process e.g. token or code */
|
|
59
|
+
response_type?: string;
|
|
60
|
+
/** Response mode defines how the redirect_uri will receive the token or code e.g. as query or fragment */
|
|
61
|
+
response_mode?: string;
|
|
62
|
+
/** String value used to associate a client session with an id token, and to mitigate replay attacks */
|
|
63
|
+
nonce?: string;
|
|
64
|
+
/** Preferred locale of the user */
|
|
65
|
+
ui_locales?: string;
|
|
66
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cidaas-javascript-sdk",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"author": "cidaas by Widas ID GmbH",
|
|
5
5
|
"description": "Cidaas native javascript sdk",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@toolz/is-a-regular-object": "^1.0.1",
|
|
30
|
-
"oidc-client-ts": "^2.4.
|
|
30
|
+
"oidc-client-ts": "^2.4.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/core": "^7.22.9",
|