@frontegg/redux-store 6.69.0 → 6.70.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/audits/AuditLogsState/index.js +1 -1
- package/audits/AuditLogsState/saga.js +1 -18
- package/audits/AuditsMetadataState/index.js +1 -1
- package/audits/AuditsMetadataState/saga.js +1 -5
- package/audits/backward-compatibility/saga.js +0 -18
- package/audits/dummy.js +0 -16
- package/audits/index.js +4 -2
- package/audits/reducer.js +0 -2
- package/auth/AcceptInvitationState/index.d.ts +2 -0
- package/auth/AcceptInvitationState/index.js +1 -1
- package/auth/AcceptInvitationState/interfaces.js +0 -1
- package/auth/AcceptInvitationState/saga.js +0 -3
- package/auth/AccountSettingsState/index.d.ts +2 -0
- package/auth/AccountSettingsState/index.js +1 -1
- package/auth/AccountSettingsState/interfaces.d.ts +2 -0
- package/auth/AccountSettingsState/saga.js +1 -11
- package/auth/ActivateState/index.d.ts +3 -0
- package/auth/ActivateState/index.js +1 -1
- package/auth/ActivateState/interfaces.js +0 -1
- package/auth/ActivateState/saga.js +14 -34
- package/auth/ApiTokensState/index.d.ts +2 -0
- package/auth/ApiTokensState/index.js +1 -1
- package/auth/ApiTokensState/interfaces.d.ts +1 -0
- package/auth/ApiTokensState/interfaces.js +0 -1
- package/auth/ApiTokensState/saga.js +1 -44
- package/auth/ForgotPasswordState/index.d.ts +2 -0
- package/auth/ForgotPasswordState/index.js +1 -1
- package/auth/ForgotPasswordState/interfaces.js +0 -1
- package/auth/ForgotPasswordState/saga.js +5 -12
- package/auth/ImpersonationState/index.d.ts +2 -0
- package/auth/ImpersonationState/index.js +1 -1
- package/auth/ImpersonationState/interfaces.js +0 -1
- package/auth/ImpersonationState/saga.js +5 -9
- package/auth/LoginState/index.d.ts +2 -0
- package/auth/LoginState/index.js +1 -1
- package/auth/LoginState/interfaces.js +0 -6
- package/auth/LoginState/saga.d.ts +2 -38
- package/auth/LoginState/saga.js +132 -292
- package/auth/MfaState/index.d.ts +4 -2
- package/auth/MfaState/index.js +1 -1
- package/auth/MfaState/interfaces.d.ts +2 -2
- package/auth/MfaState/interfaces.js +0 -1
- package/auth/MfaState/saga.js +64 -143
- package/auth/ProfileState/index.d.ts +2 -0
- package/auth/ProfileState/index.js +1 -1
- package/auth/ProfileState/saga.js +22 -50
- package/auth/Provisioning/index.d.ts +2 -0
- package/auth/Provisioning/index.js +1 -1
- package/auth/Provisioning/saga.js +11 -23
- package/auth/ResetPhoneNumberState/index.d.ts +2 -0
- package/auth/ResetPhoneNumberState/index.js +1 -1
- package/auth/ResetPhoneNumberState/interfaces.js +0 -1
- package/auth/ResetPhoneNumberState/saga.js +17 -26
- package/auth/RestrictionsState/index.d.ts +3 -0
- package/auth/RestrictionsState/index.js +1 -1
- package/auth/RestrictionsState/saga.js +52 -105
- package/auth/RolesState/index.d.ts +2 -0
- package/auth/RolesState/index.js +1 -1
- package/auth/RolesState/saga.js +30 -51
- package/auth/SSOState/index.d.ts +2 -0
- package/auth/SSOState/index.js +1 -1
- package/auth/SSOState/interfaces.js +0 -3
- package/auth/SSOState/saga.js +10 -58
- package/auth/SSOState/saga.v2.js +13 -49
- package/auth/SecurityPolicyState/index.d.ts +13 -0
- package/auth/SecurityPolicyState/index.js +1 -1
- package/auth/SecurityPolicyState/saga.js +36 -90
- package/auth/SessionsPolicyState/index.d.ts +2 -0
- package/auth/SessionsPolicyState/index.js +1 -1
- package/auth/SessionsPolicyState/saga.js +7 -19
- package/auth/SessionsState/index.d.ts +2 -0
- package/auth/SessionsState/index.js +1 -1
- package/auth/SessionsState/saga.js +1 -15
- package/auth/SignUp/index.d.ts +2 -0
- package/auth/SignUp/index.js +1 -1
- package/auth/SignUp/interfaces.js +0 -1
- package/auth/SignUp/saga.js +6 -15
- package/auth/SocialLogins/index.d.ts +2 -0
- package/auth/SocialLogins/index.js +1 -1
- package/auth/SocialLogins/saga.js +10 -20
- package/auth/TeamState/index.d.ts +2 -0
- package/auth/TeamState/index.js +1 -1
- package/auth/TeamState/interfaces.js +0 -1
- package/auth/TeamState/saga.js +85 -205
- package/auth/TenantsState/index.d.ts +2 -0
- package/auth/TenantsState/index.js +1 -1
- package/auth/TenantsState/saga.js +1 -17
- package/auth/index.d.ts +2 -2
- package/auth/index.js +4 -3
- package/auth/interfaces.d.ts +2 -1
- package/auth/interfaces.js +0 -6
- package/auth/reducer.d.ts +2 -2
- package/auth/reducer.js +0 -2
- package/auth/saga.js +2 -1
- package/auth/utils.d.ts +4 -0
- package/auth/utils.js +7 -21
- package/connectivity/ConnectivityState/index.d.ts +9 -0
- package/connectivity/ConnectivityState/index.js +1 -1
- package/connectivity/consts.js +0 -5
- package/connectivity/index.js +4 -2
- package/connectivity/interfaces.d.ts +1 -0
- package/connectivity/reducer.js +0 -2
- package/connectivity/saga.js +48 -85
- package/helpers.js +4 -7
- package/index.js +1 -1
- package/node/audits/AuditLogsState/index.js +1 -8
- package/node/audits/AuditLogsState/saga.js +1 -26
- package/node/audits/AuditsMetadataState/index.js +1 -8
- package/node/audits/AuditsMetadataState/saga.js +1 -10
- package/node/audits/backward-compatibility/index.js +0 -8
- package/node/audits/backward-compatibility/reducer.js +0 -5
- package/node/audits/backward-compatibility/saga.js +0 -23
- package/node/audits/dummy.js +0 -19
- package/node/audits/index.js +0 -14
- package/node/audits/initialState.js +0 -3
- package/node/audits/reducer.js +0 -8
- package/node/audits/saga.js +0 -5
- package/node/audits/utils.js +0 -4
- package/node/auth/AcceptInvitationState/index.js +1 -7
- package/node/auth/AcceptInvitationState/interfaces.js +0 -1
- package/node/auth/AcceptInvitationState/saga.js +0 -7
- package/node/auth/AccountSettingsState/index.js +1 -6
- package/node/auth/AccountSettingsState/saga.js +1 -16
- package/node/auth/ActivateState/index.js +1 -7
- package/node/auth/ActivateState/interfaces.js +0 -1
- package/node/auth/ActivateState/saga.js +14 -41
- package/node/auth/ApiTokensState/index.js +1 -6
- package/node/auth/ApiTokensState/interfaces.js +0 -1
- package/node/auth/ApiTokensState/saga.js +1 -51
- package/node/auth/ForgotPasswordState/index.js +1 -7
- package/node/auth/ForgotPasswordState/interfaces.js +0 -1
- package/node/auth/ForgotPasswordState/saga.js +5 -19
- package/node/auth/ImpersonationState/index.js +1 -7
- package/node/auth/ImpersonationState/interfaces.js +0 -1
- package/node/auth/ImpersonationState/saga.js +5 -15
- package/node/auth/LoginState/index.js +1 -7
- package/node/auth/LoginState/interfaces.js +0 -7
- package/node/auth/LoginState/saga.js +132 -322
- package/node/auth/MfaState/index.js +1 -7
- package/node/auth/MfaState/interfaces.js +0 -1
- package/node/auth/MfaState/saga.js +64 -137
- package/node/auth/ProfileState/index.js +1 -6
- package/node/auth/ProfileState/saga.js +22 -58
- package/node/auth/Provisioning/index.js +1 -6
- package/node/auth/Provisioning/saga.js +11 -28
- package/node/auth/ResetPhoneNumberState/index.js +1 -7
- package/node/auth/ResetPhoneNumberState/interfaces.js +0 -1
- package/node/auth/ResetPhoneNumberState/saga.js +17 -32
- package/node/auth/RestrictionsState/index.js +1 -7
- package/node/auth/RestrictionsState/saga.js +52 -109
- package/node/auth/RolesState/index.js +1 -6
- package/node/auth/RolesState/saga.js +30 -54
- package/node/auth/SSOState/index.js +1 -6
- package/node/auth/SSOState/interfaces.js +0 -3
- package/node/auth/SSOState/saga.js +10 -63
- package/node/auth/SSOState/saga.v2.js +13 -53
- package/node/auth/SecurityPolicyState/index.js +1 -6
- package/node/auth/SecurityPolicyState/saga.js +36 -89
- package/node/auth/SessionsPolicyState/index.js +1 -6
- package/node/auth/SessionsPolicyState/saga.js +7 -24
- package/node/auth/SessionsState/index.js +1 -6
- package/node/auth/SessionsState/saga.js +1 -22
- package/node/auth/SignUp/index.js +1 -7
- package/node/auth/SignUp/interfaces.js +0 -1
- package/node/auth/SignUp/saga.js +6 -30
- package/node/auth/SocialLogins/index.js +1 -6
- package/node/auth/SocialLogins/saga.js +10 -33
- package/node/auth/TeamState/index.js +1 -6
- package/node/auth/TeamState/interfaces.js +0 -1
- package/node/auth/TeamState/saga.js +86 -190
- package/node/auth/TenantsState/index.js +1 -6
- package/node/auth/TenantsState/saga.js +1 -24
- package/node/auth/dummy.js +0 -5
- package/node/auth/index.js +0 -90
- package/node/auth/initialState.js +0 -23
- package/node/auth/interfaces.js +0 -6
- package/node/auth/reducer.js +0 -28
- package/node/auth/saga.js +2 -26
- package/node/auth/utils.js +7 -42
- package/node/connectivity/ConnectivityState/index.js +1 -7
- package/node/connectivity/consts.js +1 -7
- package/node/connectivity/index.js +0 -5
- package/node/connectivity/reducer.js +0 -6
- package/node/connectivity/saga.js +47 -91
- package/node/helpers.js +2 -14
- package/node/index.js +1 -17
- package/node/subscriptions/Billing/Information/index.js +0 -7
- package/node/subscriptions/Billing/Information/saga.js +1 -25
- package/node/subscriptions/Billing/Invoices/index.js +0 -6
- package/node/subscriptions/Billing/Invoices/saga.js +1 -13
- package/node/subscriptions/Billing/PaymentMethod/index.js +2 -8
- package/node/subscriptions/Billing/PaymentMethod/interfaces.js +0 -1
- package/node/subscriptions/Billing/PaymentMethod/saga.js +1 -17
- package/node/subscriptions/Billing/Subscription/index.js +0 -6
- package/node/subscriptions/Billing/Subscription/saga.js +3 -23
- package/node/subscriptions/Billing/index.js +0 -6
- package/node/subscriptions/Billing/interfaces.js +0 -8
- package/node/subscriptions/Billing/saga.js +0 -7
- package/node/subscriptions/Checkout/index.js +0 -6
- package/node/subscriptions/Checkout/saga.js +2 -22
- package/node/subscriptions/Config/index.js +0 -6
- package/node/subscriptions/Config/saga.js +1 -12
- package/node/subscriptions/Plans/index.js +0 -6
- package/node/subscriptions/Plans/saga.js +1 -13
- package/node/subscriptions/Stripe/index.js +0 -6
- package/node/subscriptions/Stripe/saga.js +0 -8
- package/node/subscriptions/VendorPublicConfig/index.js +0 -6
- package/node/subscriptions/VendorPublicConfig/saga.js +1 -9
- package/node/subscriptions/dummy.js +2 -4
- package/node/subscriptions/general.interfaces.js +0 -5
- package/node/subscriptions/index.js +0 -5
- package/node/subscriptions/interfaces.js +0 -14
- package/node/subscriptions/mapper.js +0 -11
- package/node/subscriptions/reducer.js +0 -9
- package/node/subscriptions/saga.js +0 -9
- package/node/subscriptions/utils.js +0 -6
- package/node/toolkit/index.js +0 -31
- package/node/toolkit/redux-saga.js +0 -3
- package/node/toolkit/redux.js +0 -1
- package/node/vendor/VendorState/index.js +1 -7
- package/node/vendor/index.js +0 -5
- package/node/vendor/reducer.js +0 -6
- package/node/vendor/saga.js +1 -9
- package/package.json +1 -1
- package/subscriptions/Billing/Information/index.js +0 -4
- package/subscriptions/Billing/Information/saga.js +1 -12
- package/subscriptions/Billing/Invoices/index.js +0 -4
- package/subscriptions/Billing/Invoices/saga.js +1 -5
- package/subscriptions/Billing/PaymentMethod/index.js +2 -6
- package/subscriptions/Billing/PaymentMethod/interfaces.js +1 -1
- package/subscriptions/Billing/PaymentMethod/saga.js +1 -9
- package/subscriptions/Billing/Subscription/index.js +0 -4
- package/subscriptions/Billing/Subscription/saga.js +3 -17
- package/subscriptions/Billing/interfaces.js +1 -0
- package/subscriptions/Checkout/index.js +0 -4
- package/subscriptions/Checkout/saga.js +2 -12
- package/subscriptions/Config/index.js +0 -4
- package/subscriptions/Config/saga.js +1 -7
- package/subscriptions/Plans/index.js +0 -2
- package/subscriptions/Plans/saga.js +1 -6
- package/subscriptions/Stripe/index.js +0 -4
- package/subscriptions/Stripe/saga.js +0 -4
- package/subscriptions/VendorPublicConfig/index.js +0 -2
- package/subscriptions/VendorPublicConfig/saga.js +1 -4
- package/subscriptions/dummy.js +3 -2
- package/subscriptions/general.interfaces.js +0 -5
- package/subscriptions/index.js +3 -1
- package/subscriptions/mapper.js +0 -5
- package/toolkit/index.d.ts +1 -1
- package/toolkit/index.js +0 -9
- package/vendor/VendorState/index.js +1 -0
- package/vendor/index.js +4 -2
- package/vendor/reducer.js +0 -2
- package/vendor/saga.js +1 -2
|
@@ -75,13 +75,13 @@ const actions = {
|
|
|
75
75
|
loadVendorPasswordConfig: createAction(`${authStoreName}/loadVendorPasswordConfig`),
|
|
76
76
|
loadPublicAuthStrategiesPolicy: createAction(`${authStoreName}/loadPublicAuthStrategiesPolicy`)
|
|
77
77
|
};
|
|
78
|
+
|
|
78
79
|
/**
|
|
79
80
|
* To be used for actions types after dispatch, and should contains
|
|
80
81
|
* the reducers and actions as standalone function
|
|
81
82
|
*/
|
|
82
83
|
|
|
83
84
|
// noinspection JSUnusedLocalSymbols
|
|
84
|
-
|
|
85
85
|
/**
|
|
86
86
|
* if you see error in matcher that's mean the DispatchAction does not
|
|
87
87
|
* contains the same functions in reducers and actions
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["callback"],
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
_excluded2 = ["callback"],
|
|
5
|
+
_excluded3 = ["callback"],
|
|
6
|
+
_excluded4 = ["callback"],
|
|
7
|
+
_excluded5 = ["callback"],
|
|
8
|
+
_excluded6 = ["callback"];
|
|
9
9
|
import { call, put, takeEvery, takeLeading } from 'redux-saga/effects';
|
|
10
10
|
import { api } from '@frontegg/rest-api';
|
|
11
11
|
import { actions } from '../reducer';
|
|
12
12
|
import { delay } from '../utils';
|
|
13
13
|
import { policyDemo, policyMfaDemo, policyLockoutDemo, policyPasswordHistoryDemo, publicSecurityPolicy } from '../dummy';
|
|
14
|
-
|
|
15
14
|
function* loadSecurityPolicy() {
|
|
16
15
|
yield put(actions.setSecurityPolicyGlobalState({
|
|
17
16
|
loading: true,
|
|
18
17
|
error: null
|
|
19
18
|
}));
|
|
20
|
-
|
|
21
19
|
try {
|
|
22
20
|
const policy = yield call(api.auth.getGlobalSecurityPolicy);
|
|
23
21
|
yield put(actions.setSecurityPolicyGlobalState({
|
|
@@ -30,7 +28,6 @@ function* loadSecurityPolicy() {
|
|
|
30
28
|
loading: false
|
|
31
29
|
}));
|
|
32
30
|
}
|
|
33
|
-
|
|
34
31
|
yield put(actions.loadSecurityPolicyMfa());
|
|
35
32
|
yield put(actions.loadSecurityPolicyVendorMfa());
|
|
36
33
|
yield put(actions.loadSecurityPolicyLockout());
|
|
@@ -39,13 +36,11 @@ function* loadSecurityPolicy() {
|
|
|
39
36
|
yield put(actions.loadSecurityPolicyCaptcha());
|
|
40
37
|
yield put(actions.loadPublicAuthStrategiesPolicy());
|
|
41
38
|
}
|
|
42
|
-
|
|
43
39
|
export function* loadPublicSecurityPolicy() {
|
|
44
40
|
yield put(actions.setSecurityPolicyPublicState({
|
|
45
41
|
loading: true,
|
|
46
42
|
error: null
|
|
47
43
|
}));
|
|
48
|
-
|
|
49
44
|
try {
|
|
50
45
|
const policy = yield call(api.auth.getVendorConfig);
|
|
51
46
|
yield put(actions.setSecurityPolicyPublicState({
|
|
@@ -64,7 +59,6 @@ export function* loadPublicAuthStrategiesPolicy() {
|
|
|
64
59
|
loading: true,
|
|
65
60
|
error: null
|
|
66
61
|
}));
|
|
67
|
-
|
|
68
62
|
try {
|
|
69
63
|
const policy = yield call(api.auth.getVendorPublicAuthStrategiesConfig);
|
|
70
64
|
yield put(actions.setSecurityPolicyAuthStrategyPublicState({
|
|
@@ -78,13 +72,11 @@ export function* loadPublicAuthStrategiesPolicy() {
|
|
|
78
72
|
}));
|
|
79
73
|
}
|
|
80
74
|
}
|
|
81
|
-
|
|
82
75
|
function* loadSecurityPolicyMfa() {
|
|
83
76
|
yield put(actions.setSecurityPolicyMfaState({
|
|
84
77
|
loading: true,
|
|
85
78
|
error: null
|
|
86
79
|
}));
|
|
87
|
-
|
|
88
80
|
try {
|
|
89
81
|
const policy = yield call(api.auth.getMfaPolicy);
|
|
90
82
|
yield put(actions.setSecurityPolicyMfaState({
|
|
@@ -98,13 +90,11 @@ function* loadSecurityPolicyMfa() {
|
|
|
98
90
|
}));
|
|
99
91
|
}
|
|
100
92
|
}
|
|
101
|
-
|
|
102
93
|
function* loadSecurityPolicyVendorMfa() {
|
|
103
94
|
yield put(actions.setSecurityPolicyMfaState({
|
|
104
95
|
loading: true,
|
|
105
96
|
error: null
|
|
106
97
|
}));
|
|
107
|
-
|
|
108
98
|
try {
|
|
109
99
|
const policy = yield call(api.auth.getVendorMfaPolicy);
|
|
110
100
|
yield put(actions.setSecurityPolicyVendorMfaState({
|
|
@@ -118,20 +108,17 @@ function* loadSecurityPolicyVendorMfa() {
|
|
|
118
108
|
}));
|
|
119
109
|
}
|
|
120
110
|
}
|
|
121
|
-
|
|
122
111
|
function* saveSecurityPolicyMfa(_ref) {
|
|
123
112
|
let {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
113
|
+
payload: {
|
|
114
|
+
callback
|
|
115
|
+
}
|
|
116
|
+
} = _ref,
|
|
117
|
+
newSecurityPolicy = _objectWithoutPropertiesLoose(_ref.payload, _excluded);
|
|
130
118
|
yield put(actions.setSecurityPolicyMfaState({
|
|
131
119
|
saving: true,
|
|
132
120
|
error: null
|
|
133
121
|
}));
|
|
134
|
-
|
|
135
122
|
try {
|
|
136
123
|
const policy = yield call(api.auth.saveMfaPolicy, newSecurityPolicy);
|
|
137
124
|
yield put(actions.setSecurityPolicyMfaState({
|
|
@@ -147,13 +134,11 @@ function* saveSecurityPolicyMfa(_ref) {
|
|
|
147
134
|
callback == null ? void 0 : callback(null, e);
|
|
148
135
|
}
|
|
149
136
|
}
|
|
150
|
-
|
|
151
137
|
function* loadSecurityPolicyLockout() {
|
|
152
138
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
153
139
|
loading: true,
|
|
154
140
|
error: null
|
|
155
141
|
}));
|
|
156
|
-
|
|
157
142
|
try {
|
|
158
143
|
const policy = yield call(api.auth.getLockoutPolicy);
|
|
159
144
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
@@ -167,20 +152,17 @@ function* loadSecurityPolicyLockout() {
|
|
|
167
152
|
}));
|
|
168
153
|
}
|
|
169
154
|
}
|
|
170
|
-
|
|
171
155
|
function* saveSecurityPolicyLockout(_ref2) {
|
|
172
156
|
let {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
157
|
+
payload: {
|
|
158
|
+
callback
|
|
159
|
+
}
|
|
160
|
+
} = _ref2,
|
|
161
|
+
newSecurityPolicy = _objectWithoutPropertiesLoose(_ref2.payload, _excluded2);
|
|
179
162
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
180
163
|
saving: true,
|
|
181
164
|
error: null
|
|
182
165
|
}));
|
|
183
|
-
|
|
184
166
|
try {
|
|
185
167
|
const policy = yield call(api.auth.saveLockoutPolicy, newSecurityPolicy);
|
|
186
168
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
@@ -196,13 +178,11 @@ function* saveSecurityPolicyLockout(_ref2) {
|
|
|
196
178
|
callback == null ? void 0 : callback(null, e);
|
|
197
179
|
}
|
|
198
180
|
}
|
|
199
|
-
|
|
200
181
|
function* loadSecurityPolicyVendorLockout() {
|
|
201
182
|
yield put(actions.setSecurityPolicyVendorLockoutState({
|
|
202
183
|
loading: true,
|
|
203
184
|
error: null
|
|
204
185
|
}));
|
|
205
|
-
|
|
206
186
|
try {
|
|
207
187
|
const policy = yield call(api.auth.getVendorLockoutPolicy);
|
|
208
188
|
yield put(actions.setSecurityPolicyVendorLockoutState({
|
|
@@ -216,13 +196,11 @@ function* loadSecurityPolicyVendorLockout() {
|
|
|
216
196
|
}));
|
|
217
197
|
}
|
|
218
198
|
}
|
|
219
|
-
|
|
220
199
|
function* loadSecurityPolicyCaptcha() {
|
|
221
200
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
222
201
|
loading: true,
|
|
223
202
|
error: null
|
|
224
203
|
}));
|
|
225
|
-
|
|
226
204
|
try {
|
|
227
205
|
const policy = yield call(api.auth.getCaptchaPolicy);
|
|
228
206
|
yield put(actions.setSecurityPolicyCaptchaState({
|
|
@@ -236,13 +214,11 @@ function* loadSecurityPolicyCaptcha() {
|
|
|
236
214
|
}));
|
|
237
215
|
}
|
|
238
216
|
}
|
|
239
|
-
|
|
240
217
|
function* loadSecurityPolicyPasswordHistory() {
|
|
241
218
|
yield put(actions.setSecurityPolicyPasswordHistoryState({
|
|
242
219
|
loading: true,
|
|
243
220
|
error: null
|
|
244
221
|
}));
|
|
245
|
-
|
|
246
222
|
try {
|
|
247
223
|
const policy = yield call(api.auth.getPasswordHistoryPolicy);
|
|
248
224
|
yield put(actions.setSecurityPolicyPasswordHistoryState({
|
|
@@ -256,13 +232,11 @@ function* loadSecurityPolicyPasswordHistory() {
|
|
|
256
232
|
}));
|
|
257
233
|
}
|
|
258
234
|
}
|
|
259
|
-
|
|
260
235
|
function* loadSecurityPolicyVendorPasswordHistory() {
|
|
261
236
|
yield put(actions.setSecurityPolicyVendorPasswordHistoryState({
|
|
262
237
|
loading: true,
|
|
263
238
|
error: null
|
|
264
239
|
}));
|
|
265
|
-
|
|
266
240
|
try {
|
|
267
241
|
const policy = yield call(api.auth.getVendorPasswordHistoryPolicy);
|
|
268
242
|
yield put(actions.setSecurityPolicyVendorPasswordHistoryState({
|
|
@@ -276,20 +250,17 @@ function* loadSecurityPolicyVendorPasswordHistory() {
|
|
|
276
250
|
}));
|
|
277
251
|
}
|
|
278
252
|
}
|
|
279
|
-
|
|
280
253
|
function* saveSecurityPolicyPasswordHistory(_ref3) {
|
|
281
254
|
let {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
255
|
+
payload: {
|
|
256
|
+
callback
|
|
257
|
+
}
|
|
258
|
+
} = _ref3,
|
|
259
|
+
newSecurityPolicy = _objectWithoutPropertiesLoose(_ref3.payload, _excluded3);
|
|
288
260
|
yield put(actions.setSecurityPolicyPasswordHistoryState({
|
|
289
261
|
saving: true,
|
|
290
262
|
error: null
|
|
291
263
|
}));
|
|
292
|
-
|
|
293
264
|
try {
|
|
294
265
|
const policy = yield call(api.auth.savePasswordHistoryPolicy, newSecurityPolicy);
|
|
295
266
|
yield put(actions.setSecurityPolicyPasswordHistoryState({
|
|
@@ -305,13 +276,11 @@ function* saveSecurityPolicyPasswordHistory(_ref3) {
|
|
|
305
276
|
callback == null ? void 0 : callback(null, e);
|
|
306
277
|
}
|
|
307
278
|
}
|
|
308
|
-
|
|
309
279
|
function* loadVendorPasswordConfig() {
|
|
310
280
|
yield put(actions.setSecurityPolicyPasswordState({
|
|
311
281
|
loading: true,
|
|
312
282
|
error: null
|
|
313
283
|
}));
|
|
314
|
-
|
|
315
284
|
try {
|
|
316
285
|
const policy = yield call(api.auth.getPasswordConfigPolicy);
|
|
317
286
|
yield put(actions.setSecurityPolicyPasswordState({
|
|
@@ -325,7 +294,6 @@ function* loadVendorPasswordConfig() {
|
|
|
325
294
|
}));
|
|
326
295
|
}
|
|
327
296
|
}
|
|
328
|
-
|
|
329
297
|
export function* securityPolicySagas() {
|
|
330
298
|
yield takeLeading(actions.loadSecurityPolicy, loadSecurityPolicy);
|
|
331
299
|
yield takeEvery(actions.saveSecurityPolicyMfa, saveSecurityPolicyMfa);
|
|
@@ -342,6 +310,7 @@ export function* securityPolicySagas() {
|
|
|
342
310
|
yield takeEvery(actions.loadPublicSecurityPolicy, loadPublicSecurityPolicy);
|
|
343
311
|
yield takeEvery(actions.loadPublicAuthStrategiesPolicy, loadPublicAuthStrategiesPolicy);
|
|
344
312
|
}
|
|
313
|
+
|
|
345
314
|
/*********************************
|
|
346
315
|
* Preview Sagas
|
|
347
316
|
*********************************/
|
|
@@ -351,7 +320,6 @@ export function* loadPublicSecurityPolicyMock() {
|
|
|
351
320
|
loading: true,
|
|
352
321
|
error: null
|
|
353
322
|
}));
|
|
354
|
-
|
|
355
323
|
try {
|
|
356
324
|
yield put(actions.setSecurityPolicyPublicState({
|
|
357
325
|
policy: publicSecurityPolicy,
|
|
@@ -364,7 +332,6 @@ export function* loadPublicSecurityPolicyMock() {
|
|
|
364
332
|
}));
|
|
365
333
|
}
|
|
366
334
|
}
|
|
367
|
-
|
|
368
335
|
function* loadSecurityPolicyMock() {
|
|
369
336
|
yield put(actions.setSecurityPolicyGlobalState({
|
|
370
337
|
loading: true,
|
|
@@ -383,7 +350,6 @@ function* loadSecurityPolicyMock() {
|
|
|
383
350
|
yield put(actions.loadSecurityPolicyVendorPasswordHistory());
|
|
384
351
|
yield put(actions.loadSecurityPolicyCaptcha());
|
|
385
352
|
}
|
|
386
|
-
|
|
387
353
|
function* loadSecurityPolicyMfaMock() {
|
|
388
354
|
yield put(actions.setSecurityPolicyMfaState({
|
|
389
355
|
loading: true,
|
|
@@ -395,7 +361,6 @@ function* loadSecurityPolicyMfaMock() {
|
|
|
395
361
|
loading: false
|
|
396
362
|
}));
|
|
397
363
|
}
|
|
398
|
-
|
|
399
364
|
function* loadSecurityPolicyVendorMfaMock() {
|
|
400
365
|
yield put(actions.setSecurityPolicyVendorMfaState({
|
|
401
366
|
loading: true,
|
|
@@ -407,27 +372,22 @@ function* loadSecurityPolicyVendorMfaMock() {
|
|
|
407
372
|
loading: false
|
|
408
373
|
}));
|
|
409
374
|
}
|
|
410
|
-
|
|
411
375
|
function* saveSecurityPolicyMfaMock(_ref4) {
|
|
412
376
|
var _newSecurityPolicy$id;
|
|
413
|
-
|
|
414
377
|
let {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
378
|
+
payload: {
|
|
379
|
+
callback
|
|
380
|
+
}
|
|
381
|
+
} = _ref4,
|
|
382
|
+
newSecurityPolicy = _objectWithoutPropertiesLoose(_ref4.payload, _excluded4);
|
|
421
383
|
yield put(actions.setSecurityPolicyMfaState({
|
|
422
384
|
saving: true,
|
|
423
385
|
error: null
|
|
424
386
|
}));
|
|
425
|
-
|
|
426
387
|
const policy = _extends({}, policyLockoutDemo, {
|
|
427
388
|
id: (_newSecurityPolicy$id = newSecurityPolicy.id) != null ? _newSecurityPolicy$id : policyLockoutDemo.id,
|
|
428
389
|
enforceMFAType: newSecurityPolicy.enforceMFAType
|
|
429
390
|
});
|
|
430
|
-
|
|
431
391
|
yield delay();
|
|
432
392
|
yield put(actions.setSecurityPolicyMfaState({
|
|
433
393
|
policy,
|
|
@@ -435,7 +395,6 @@ function* saveSecurityPolicyMfaMock(_ref4) {
|
|
|
435
395
|
}));
|
|
436
396
|
callback == null ? void 0 : callback(policy);
|
|
437
397
|
}
|
|
438
|
-
|
|
439
398
|
function* loadSecurityPolicyLockoutMock() {
|
|
440
399
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
441
400
|
loading: true,
|
|
@@ -447,7 +406,6 @@ function* loadSecurityPolicyLockoutMock() {
|
|
|
447
406
|
loading: false
|
|
448
407
|
}));
|
|
449
408
|
}
|
|
450
|
-
|
|
451
409
|
function* loadSecurityPolicyVendorLockoutMock() {
|
|
452
410
|
yield put(actions.setSecurityPolicyVendorLockoutState({
|
|
453
411
|
loading: true,
|
|
@@ -459,32 +417,27 @@ function* loadSecurityPolicyVendorLockoutMock() {
|
|
|
459
417
|
loading: false
|
|
460
418
|
}));
|
|
461
419
|
}
|
|
462
|
-
|
|
463
420
|
function* saveSecurityPolicyLockoutMock(_ref5) {
|
|
464
421
|
let {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
422
|
+
payload: {
|
|
423
|
+
callback
|
|
424
|
+
}
|
|
425
|
+
} = _ref5,
|
|
426
|
+
newSecurityPolicy = _objectWithoutPropertiesLoose(_ref5.payload, _excluded5);
|
|
471
427
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
472
428
|
saving: true,
|
|
473
429
|
error: null
|
|
474
430
|
}));
|
|
475
431
|
yield delay();
|
|
476
|
-
|
|
477
432
|
const policy = _extends({}, policyLockoutDemo, newSecurityPolicy, {
|
|
478
433
|
id: newSecurityPolicy.id ? newSecurityPolicy.id : policyLockoutDemo.id
|
|
479
434
|
});
|
|
480
|
-
|
|
481
435
|
callback == null ? void 0 : callback(policy);
|
|
482
436
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
483
437
|
policy,
|
|
484
438
|
saving: false
|
|
485
439
|
}));
|
|
486
440
|
}
|
|
487
|
-
|
|
488
441
|
function* loadSecurityPolicyCaptchaMock() {
|
|
489
442
|
yield put(actions.setSecurityPolicyLockoutState({
|
|
490
443
|
loading: true,
|
|
@@ -496,7 +449,6 @@ function* loadSecurityPolicyCaptchaMock() {
|
|
|
496
449
|
loading: false
|
|
497
450
|
}));
|
|
498
451
|
}
|
|
499
|
-
|
|
500
452
|
function* loadSecurityPolicyPasswordHistoryMock() {
|
|
501
453
|
yield put(actions.setSecurityPolicyPasswordHistoryState({
|
|
502
454
|
loading: true,
|
|
@@ -508,7 +460,6 @@ function* loadSecurityPolicyPasswordHistoryMock() {
|
|
|
508
460
|
loading: false
|
|
509
461
|
}));
|
|
510
462
|
}
|
|
511
|
-
|
|
512
463
|
function* loadSecurityPolicyVendorPasswordHistoryMock() {
|
|
513
464
|
yield put(actions.setSecurityPolicyVendorPasswordHistoryState({
|
|
514
465
|
loading: true,
|
|
@@ -520,32 +471,27 @@ function* loadSecurityPolicyVendorPasswordHistoryMock() {
|
|
|
520
471
|
loading: false
|
|
521
472
|
}));
|
|
522
473
|
}
|
|
523
|
-
|
|
524
474
|
function* saveSecurityPolicyPasswordHistoryMock(_ref6) {
|
|
525
475
|
let {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
476
|
+
payload: {
|
|
477
|
+
callback
|
|
478
|
+
}
|
|
479
|
+
} = _ref6,
|
|
480
|
+
newSecurityPolicy = _objectWithoutPropertiesLoose(_ref6.payload, _excluded6);
|
|
532
481
|
yield put(actions.setSecurityPolicyPasswordHistoryState({
|
|
533
482
|
saving: true,
|
|
534
483
|
error: null
|
|
535
484
|
}));
|
|
536
485
|
yield delay();
|
|
537
|
-
|
|
538
486
|
const policy = _extends({}, policyPasswordHistoryDemo, newSecurityPolicy, {
|
|
539
487
|
id: newSecurityPolicy.id ? newSecurityPolicy.id : policyPasswordHistoryDemo.id
|
|
540
488
|
});
|
|
541
|
-
|
|
542
489
|
callback == null ? void 0 : callback(policy);
|
|
543
490
|
yield put(actions.setSecurityPolicyPasswordHistoryState({
|
|
544
491
|
policy,
|
|
545
492
|
saving: false
|
|
546
493
|
}));
|
|
547
494
|
}
|
|
548
|
-
|
|
549
495
|
export function* securityPolicySagasMock() {
|
|
550
496
|
yield takeLeading(actions.loadSecurityPolicy, loadSecurityPolicyMock);
|
|
551
497
|
yield takeEvery(actions.loadPublicSecurityPolicy, loadPublicSecurityPolicyMock);
|
|
@@ -20,6 +20,7 @@ declare const reducers: {
|
|
|
20
20
|
user?: import("..").User | null | undefined;
|
|
21
21
|
isSSOAuth: boolean;
|
|
22
22
|
ssoACS?: string | undefined;
|
|
23
|
+
includeQueryParam?: boolean | undefined;
|
|
23
24
|
loginState: import("..").LoginState;
|
|
24
25
|
activateState: import("..").ActivateAccountState;
|
|
25
26
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
@@ -58,6 +59,7 @@ declare const reducers: {
|
|
|
58
59
|
user?: import("..").User | null | undefined;
|
|
59
60
|
isSSOAuth: boolean;
|
|
60
61
|
ssoACS?: string | undefined;
|
|
62
|
+
includeQueryParam?: boolean | undefined;
|
|
61
63
|
loginState: import("..").LoginState;
|
|
62
64
|
activateState: import("..").ActivateAccountState;
|
|
63
65
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
@@ -17,13 +17,13 @@ const actions = {
|
|
|
17
17
|
payload
|
|
18
18
|
}))
|
|
19
19
|
};
|
|
20
|
+
|
|
20
21
|
/**
|
|
21
22
|
* To be used for actions types after dispatch, and should contains
|
|
22
23
|
* the reducers and actions as standalone function
|
|
23
24
|
*/
|
|
24
25
|
|
|
25
26
|
// noinspection JSUnusedLocalSymbols
|
|
26
|
-
|
|
27
27
|
/**
|
|
28
28
|
* if you see error in matcher that's mean the DispatchAction does not
|
|
29
29
|
* contains the same functions in reducers and actions
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["callback"],
|
|
4
|
-
|
|
4
|
+
_excluded2 = ["callback"];
|
|
5
5
|
import { takeLatest, put, call, takeLeading, select } from 'redux-saga/effects';
|
|
6
6
|
import { api } from '@frontegg/rest-api';
|
|
7
7
|
import { actions } from '../reducer';
|
|
8
8
|
import { sessionsConfigDummies } from '../dummy';
|
|
9
|
-
|
|
10
9
|
function* loadSessionPolicyState() {
|
|
11
10
|
yield put(actions.setSessionsPolicyState({
|
|
12
11
|
loading: true,
|
|
13
12
|
error: null
|
|
14
13
|
}));
|
|
15
|
-
|
|
16
14
|
try {
|
|
17
15
|
const sessionsPolicy = yield call(api.auth.getSessionConfigurations);
|
|
18
16
|
yield put(actions.setSessionsPolicyState({
|
|
@@ -26,7 +24,6 @@ function* loadSessionPolicyState() {
|
|
|
26
24
|
}));
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
function* createOrUpdateSessionsPolicy({
|
|
31
28
|
payload
|
|
32
29
|
}) {
|
|
@@ -34,13 +31,11 @@ function* createOrUpdateSessionsPolicy({
|
|
|
34
31
|
loading: true,
|
|
35
32
|
error: null
|
|
36
33
|
}));
|
|
37
|
-
|
|
38
34
|
try {
|
|
39
35
|
const {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
callback
|
|
37
|
+
} = payload,
|
|
38
|
+
rest = _objectWithoutPropertiesLoose(payload, _excluded);
|
|
44
39
|
yield call(api.auth.createOrUpdateSessionConfigrations, rest);
|
|
45
40
|
yield put(actions.loadSessionsPolicy());
|
|
46
41
|
callback == null ? void 0 : callback(true);
|
|
@@ -51,12 +46,10 @@ function* createOrUpdateSessionsPolicy({
|
|
|
51
46
|
}));
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
|
-
|
|
55
49
|
export function* sessionsPolicySaga() {
|
|
56
50
|
yield takeLeading(actions.loadSessionsPolicy, loadSessionPolicyState);
|
|
57
51
|
yield takeLatest(actions.createOrUpdateSessionsPolicy, createOrUpdateSessionsPolicy);
|
|
58
52
|
}
|
|
59
|
-
|
|
60
53
|
function* loadSessionPolicyStateMock() {
|
|
61
54
|
yield put(actions.setSessionsPolicyState({
|
|
62
55
|
loading: true,
|
|
@@ -64,14 +57,12 @@ function* loadSessionPolicyStateMock() {
|
|
|
64
57
|
}));
|
|
65
58
|
const sessionPolicyState = yield select(state => {
|
|
66
59
|
var _state$auth$sessionsP, _state$auth;
|
|
67
|
-
|
|
68
60
|
return (_state$auth$sessionsP = state == null ? void 0 : (_state$auth = state.auth) == null ? void 0 : _state$auth.sessionsPolicyState) != null ? _state$auth$sessionsP : sessionsConfigDummies;
|
|
69
61
|
});
|
|
70
62
|
yield put(actions.setSessionsPolicyState(_extends({}, sessionPolicyState, {
|
|
71
63
|
loading: false
|
|
72
64
|
})));
|
|
73
65
|
}
|
|
74
|
-
|
|
75
66
|
function* createOrUpdateSessionsPolicyMock({
|
|
76
67
|
payload
|
|
77
68
|
}) {
|
|
@@ -79,19 +70,16 @@ function* createOrUpdateSessionsPolicyMock({
|
|
|
79
70
|
loading: true,
|
|
80
71
|
error: null
|
|
81
72
|
}));
|
|
82
|
-
|
|
83
73
|
const {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
74
|
+
callback
|
|
75
|
+
} = payload,
|
|
76
|
+
rest = _objectWithoutPropertiesLoose(payload, _excluded2);
|
|
88
77
|
callback == null ? void 0 : callback(true);
|
|
89
78
|
yield put(actions.setSessionsPolicyState({
|
|
90
79
|
configurations: rest,
|
|
91
80
|
loading: false
|
|
92
81
|
}));
|
|
93
82
|
}
|
|
94
|
-
|
|
95
83
|
export function* sessionsPolicySagaMock() {
|
|
96
84
|
yield takeLeading(actions.loadSessionsPolicy, loadSessionPolicyStateMock);
|
|
97
85
|
yield takeLatest(actions.createOrUpdateSessionsPolicy, createOrUpdateSessionsPolicyMock);
|
|
@@ -19,6 +19,7 @@ declare const reducers: {
|
|
|
19
19
|
user?: import("..").User | null | undefined;
|
|
20
20
|
isSSOAuth: boolean;
|
|
21
21
|
ssoACS?: string | undefined;
|
|
22
|
+
includeQueryParam?: boolean | undefined;
|
|
22
23
|
loginState: import("..").LoginState;
|
|
23
24
|
activateState: import("..").ActivateAccountState;
|
|
24
25
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
@@ -57,6 +58,7 @@ declare const reducers: {
|
|
|
57
58
|
user?: import("..").User | null | undefined;
|
|
58
59
|
isSSOAuth: boolean;
|
|
59
60
|
ssoACS?: string | undefined;
|
|
61
|
+
includeQueryParam?: boolean | undefined;
|
|
60
62
|
loginState: import("..").LoginState;
|
|
61
63
|
activateState: import("..").ActivateAccountState;
|
|
62
64
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
@@ -22,13 +22,13 @@ const actions = {
|
|
|
22
22
|
payload
|
|
23
23
|
}))
|
|
24
24
|
};
|
|
25
|
+
|
|
25
26
|
/**
|
|
26
27
|
* To be used for actions types after dispatch, and should contains
|
|
27
28
|
* the reducers and actions as standalone function
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
31
|
// noinspection JSUnusedLocalSymbols
|
|
31
|
-
|
|
32
32
|
/**
|
|
33
33
|
* if you see error in matcher that's mean the DispatchAction does not
|
|
34
34
|
* contains the same functions in reducers and actions
|