@frontegg/js 7.49.0 → 7.50.0-alpha.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/index.js +1 -1
- package/node/index.js +1 -1
- package/node/version.js +1 -1
- package/package.json +2 -2
- package/umd/frontegg.development.js +115 -5
- package/umd/frontegg.production.min.js +1 -1
- package/umd/frontegg.production.min.js.LICENSE.txt +1 -1
- package/version.js +1 -1
package/index.js
CHANGED
package/node/index.js
CHANGED
package/node/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/js",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.50.0-alpha.0",
|
|
4
4
|
"main": "./node/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frontegg LTD",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/runtime": "^7.18.6",
|
|
9
|
-
"@frontegg/types": "7.
|
|
9
|
+
"@frontegg/types": "7.50.0-alpha.0"
|
|
10
10
|
},
|
|
11
11
|
"browserslist": {
|
|
12
12
|
"production": [
|
|
@@ -1625,7 +1625,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1625
1625
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1626
1626
|
/* harmony export */ });
|
|
1627
1627
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
1628
|
-
cdnVersion: '7.
|
|
1628
|
+
cdnVersion: '7.50.0-alpha.0'
|
|
1629
1629
|
});
|
|
1630
1630
|
|
|
1631
1631
|
/***/ }),
|
|
@@ -12383,11 +12383,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12383
12383
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/common.js");
|
|
12384
12384
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../helpers */ "../../dist/@frontegg/redux-store/helpers/handlers.js");
|
|
12385
12385
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./state */ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/state.js");
|
|
12386
|
+
/* harmony import */ var _helpers_timeConvertors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers/timeConvertors */ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/helpers/timeConvertors.js");
|
|
12386
12387
|
|
|
12387
12388
|
|
|
12388
12389
|
const _excluded = ["callback"],
|
|
12389
12390
|
_excluded2 = ["callback"],
|
|
12390
|
-
_excluded3 = ["callback"]
|
|
12391
|
+
_excluded3 = ["callback"],
|
|
12392
|
+
_excluded4 = ["callback"];
|
|
12393
|
+
|
|
12391
12394
|
|
|
12392
12395
|
|
|
12393
12396
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((store, api, sharedActions) => {
|
|
@@ -12476,6 +12479,9 @@ const _excluded = ["callback"],
|
|
|
12476
12479
|
const setSecurityPolicyVendorPasswordHistoryState = state => {
|
|
12477
12480
|
Object.assign(store.auth.securityPolicyState.vendorPasswordHistoryPolicy, state);
|
|
12478
12481
|
};
|
|
12482
|
+
const setSecurityPolicyPasswordRotationState = state => {
|
|
12483
|
+
Object.assign(store.auth.securityPolicyState.passwordRotationPolicy, state);
|
|
12484
|
+
};
|
|
12479
12485
|
const setSecurityPolicyPasswordState = state => {
|
|
12480
12486
|
Object.assign(store.auth.securityPolicyState.passwordPolicy, state);
|
|
12481
12487
|
};
|
|
@@ -12682,6 +12688,30 @@ const _excluded = ["callback"],
|
|
|
12682
12688
|
});
|
|
12683
12689
|
}
|
|
12684
12690
|
};
|
|
12691
|
+
const loadSecurityPolicyPasswordRotation = async () => {
|
|
12692
|
+
setSecurityPolicyPasswordRotationState({
|
|
12693
|
+
loading: true,
|
|
12694
|
+
error: null
|
|
12695
|
+
});
|
|
12696
|
+
try {
|
|
12697
|
+
const policy = await api.securityPolicy.getPasswordRotationPolicy();
|
|
12698
|
+
const vendorPolicy = await api.securityPolicy.getVendorPasswordRotationPolicy();
|
|
12699
|
+
policy.notificationPeriod = (0,_helpers_timeConvertors__WEBPACK_IMPORTED_MODULE_5__.minutesToDays)(policy.notificationPeriod);
|
|
12700
|
+
const vendorPolicyInDays = (0,_helpers_timeConvertors__WEBPACK_IMPORTED_MODULE_5__.minutesToDays)(vendorPolicy.rotationPeriod);
|
|
12701
|
+
const policyInDays = (0,_helpers_timeConvertors__WEBPACK_IMPORTED_MODULE_5__.minutesToDays)(policy.rotationPeriod);
|
|
12702
|
+
policy.rotationPeriod = Math.min(vendorPolicyInDays, policyInDays);
|
|
12703
|
+
policy.vendorRotationPeriod = vendorPolicyInDays;
|
|
12704
|
+
setSecurityPolicyPasswordRotationState({
|
|
12705
|
+
policy,
|
|
12706
|
+
loading: false
|
|
12707
|
+
});
|
|
12708
|
+
} catch (e) {
|
|
12709
|
+
setSecurityPolicyPasswordRotationState({
|
|
12710
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.errorHandler)(e),
|
|
12711
|
+
loading: false
|
|
12712
|
+
});
|
|
12713
|
+
}
|
|
12714
|
+
};
|
|
12685
12715
|
const loadPublicAuthStrategiesPolicy = async payload => {
|
|
12686
12716
|
setSecurityPolicyAuthStrategyPublicState({
|
|
12687
12717
|
loading: true,
|
|
@@ -12777,6 +12807,33 @@ const _excluded = ["callback"],
|
|
|
12777
12807
|
callback == null ? void 0 : callback(null, e);
|
|
12778
12808
|
}
|
|
12779
12809
|
};
|
|
12810
|
+
const saveSecurityPolicyPasswordRotation = async payload => {
|
|
12811
|
+
const {
|
|
12812
|
+
callback
|
|
12813
|
+
} = payload,
|
|
12814
|
+
newSecurityPolicy = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(payload, _excluded4);
|
|
12815
|
+
setSecurityPolicyPasswordRotationState({
|
|
12816
|
+
saving: true,
|
|
12817
|
+
error: null
|
|
12818
|
+
});
|
|
12819
|
+
try {
|
|
12820
|
+
const policy = await api.securityPolicy.savePasswordRotationPolicy((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, newSecurityPolicy, {
|
|
12821
|
+
notificationPeriod: (0,_helpers_timeConvertors__WEBPACK_IMPORTED_MODULE_5__.daysToMinutes)(newSecurityPolicy.notificationPeriod),
|
|
12822
|
+
rotationPeriod: (0,_helpers_timeConvertors__WEBPACK_IMPORTED_MODULE_5__.daysToMinutes)(newSecurityPolicy.rotationPeriod)
|
|
12823
|
+
}));
|
|
12824
|
+
setSecurityPolicyPasswordRotationState({
|
|
12825
|
+
policy: newSecurityPolicy,
|
|
12826
|
+
saving: false
|
|
12827
|
+
});
|
|
12828
|
+
callback == null ? void 0 : callback(policy);
|
|
12829
|
+
} catch (e) {
|
|
12830
|
+
setSecurityPolicyPasswordRotationState({
|
|
12831
|
+
saving: false,
|
|
12832
|
+
error: (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.errorHandler)(e)
|
|
12833
|
+
});
|
|
12834
|
+
callback == null ? void 0 : callback(null, e);
|
|
12835
|
+
}
|
|
12836
|
+
};
|
|
12780
12837
|
return {
|
|
12781
12838
|
// reducers
|
|
12782
12839
|
setSecurityPolicyState,
|
|
@@ -12789,6 +12846,7 @@ const _excluded = ["callback"],
|
|
|
12789
12846
|
setSecurityPolicyCaptchaState,
|
|
12790
12847
|
setSecurityPolicyPasswordHistoryState,
|
|
12791
12848
|
setSecurityPolicyVendorPasswordHistoryState,
|
|
12849
|
+
setSecurityPolicyPasswordRotationState,
|
|
12792
12850
|
resetSecurityPolicyState,
|
|
12793
12851
|
setSecurityPolicyPasswordState,
|
|
12794
12852
|
setSecurityPolicyAuthStrategyPublicState,
|
|
@@ -12804,10 +12862,12 @@ const _excluded = ["callback"],
|
|
|
12804
12862
|
loadSecurityPolicyCaptcha,
|
|
12805
12863
|
loadSecurityPolicyPasswordHistory,
|
|
12806
12864
|
loadSecurityPolicyVendorPasswordHistory,
|
|
12865
|
+
loadSecurityPolicyPasswordRotation,
|
|
12807
12866
|
loadPublicAuthStrategiesPolicy,
|
|
12808
12867
|
saveSecurityPolicyMfa,
|
|
12809
12868
|
saveSecurityPolicyLockout,
|
|
12810
12869
|
saveSecurityPolicyPasswordHistory,
|
|
12870
|
+
saveSecurityPolicyPasswordRotation,
|
|
12811
12871
|
// protected
|
|
12812
12872
|
__getSecurityPolicyPublicStateWithCustomLogin
|
|
12813
12873
|
};
|
|
@@ -12815,6 +12875,44 @@ const _excluded = ["callback"],
|
|
|
12815
12875
|
|
|
12816
12876
|
/***/ }),
|
|
12817
12877
|
|
|
12878
|
+
/***/ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/consts.js":
|
|
12879
|
+
/*!************************************************************************************!*\
|
|
12880
|
+
!*** ../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/consts.js ***!
|
|
12881
|
+
\************************************************************************************/
|
|
12882
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12883
|
+
|
|
12884
|
+
"use strict";
|
|
12885
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12886
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12887
|
+
/* harmony export */ oneDayInMinutes: () => (/* binding */ oneDayInMinutes)
|
|
12888
|
+
/* harmony export */ });
|
|
12889
|
+
const oneDayInMinutes = 24 * 60;
|
|
12890
|
+
|
|
12891
|
+
/***/ }),
|
|
12892
|
+
|
|
12893
|
+
/***/ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/helpers/timeConvertors.js":
|
|
12894
|
+
/*!****************************************************************************************************!*\
|
|
12895
|
+
!*** ../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/helpers/timeConvertors.js ***!
|
|
12896
|
+
\****************************************************************************************************/
|
|
12897
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12898
|
+
|
|
12899
|
+
"use strict";
|
|
12900
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12901
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12902
|
+
/* harmony export */ daysToMinutes: () => (/* binding */ daysToMinutes),
|
|
12903
|
+
/* harmony export */ minutesToDays: () => (/* binding */ minutesToDays)
|
|
12904
|
+
/* harmony export */ });
|
|
12905
|
+
/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../consts */ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/consts.js");
|
|
12906
|
+
|
|
12907
|
+
const minutesToDays = minutes => {
|
|
12908
|
+
return Math.floor(minutes / _consts__WEBPACK_IMPORTED_MODULE_0__.oneDayInMinutes);
|
|
12909
|
+
};
|
|
12910
|
+
const daysToMinutes = days => {
|
|
12911
|
+
return days * _consts__WEBPACK_IMPORTED_MODULE_0__.oneDayInMinutes;
|
|
12912
|
+
};
|
|
12913
|
+
|
|
12914
|
+
/***/ }),
|
|
12915
|
+
|
|
12818
12916
|
/***/ "../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/state.js":
|
|
12819
12917
|
/*!***********************************************************************************!*\
|
|
12820
12918
|
!*** ../../dist/@frontegg/redux-store/auth/Security/SecurityPolicyState/state.js ***!
|
|
@@ -12862,6 +12960,9 @@ const initialState = {
|
|
|
12862
12960
|
},
|
|
12863
12961
|
publicAuthStrategyPolicy: {
|
|
12864
12962
|
loading: true
|
|
12963
|
+
},
|
|
12964
|
+
passwordRotationPolicy: {
|
|
12965
|
+
loading: true
|
|
12865
12966
|
}
|
|
12866
12967
|
};
|
|
12867
12968
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (overrideState => (0,_toolkit_proxy__WEBPACK_IMPORTED_MODULE_0__.createProxy)(initialState, overrideState));
|
|
@@ -17943,7 +18044,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17943
18044
|
/* harmony import */ var _subscriptions_interfaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./subscriptions/interfaces */ "../../dist/@frontegg/redux-store/subscriptions/interfaces.js");
|
|
17944
18045
|
/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./vendor */ "../../dist/@frontegg/redux-store/vendor/index.js");
|
|
17945
18046
|
/* harmony import */ var _audits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./audits */ "../../dist/@frontegg/redux-store/audits/index.js");
|
|
17946
|
-
/** @license Frontegg v7.
|
|
18047
|
+
/** @license Frontegg v7.50.0-alpha.0
|
|
17947
18048
|
*
|
|
17948
18049
|
* This source code is licensed under the MIT license found in the
|
|
17949
18050
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -26916,6 +27017,15 @@ class SecurityPolicyApi extends _BaseApiClient__WEBPACK_IMPORTED_MODULE_0__.Base
|
|
|
26916
27017
|
return this.post(`${_constants__WEBPACK_IMPORTED_MODULE_1__.urls.identity.configurations.v1}/password-history-policy`, body);
|
|
26917
27018
|
}
|
|
26918
27019
|
};
|
|
27020
|
+
this.getPasswordRotationPolicy = async () => {
|
|
27021
|
+
return this.get(`${_constants__WEBPACK_IMPORTED_MODULE_1__.urls.identity.configurations.v1}/password-rotation`);
|
|
27022
|
+
};
|
|
27023
|
+
this.getVendorPasswordRotationPolicy = async () => {
|
|
27024
|
+
return this.get(`${_constants__WEBPACK_IMPORTED_MODULE_1__.urls.identity.configurations.v1}/password-rotation/vendor`);
|
|
27025
|
+
};
|
|
27026
|
+
this.savePasswordRotationPolicy = async body => {
|
|
27027
|
+
return this.post(`${_constants__WEBPACK_IMPORTED_MODULE_1__.urls.identity.configurations.v1}/password-rotation`, body);
|
|
27028
|
+
};
|
|
26919
27029
|
this.getPasswordConfigPolicy = async () => {
|
|
26920
27030
|
return this.get(`${_constants__WEBPACK_IMPORTED_MODULE_1__.urls.identity.configurations.v1}/password`);
|
|
26921
27031
|
};
|
|
@@ -27978,7 +28088,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27978
28088
|
/* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./security-center/interfaces */ "../../dist/@frontegg/rest-api/security-center/interfaces.js");
|
|
27979
28089
|
/* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./applications/interfaces */ "../../dist/@frontegg/rest-api/applications/interfaces.js");
|
|
27980
28090
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./constants */ "../../dist/@frontegg/rest-api/constants.js");
|
|
27981
|
-
/** @license Frontegg v7.
|
|
28091
|
+
/** @license Frontegg v7.50.0-alpha.0
|
|
27982
28092
|
*
|
|
27983
28093
|
* This source code is licensed under the MIT license found in the
|
|
27984
28094
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -30608,7 +30718,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30608
30718
|
/* harmony export */ });
|
|
30609
30719
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
30610
30720
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
30611
|
-
/** @license Frontegg v7.
|
|
30721
|
+
/** @license Frontegg v7.50.0-alpha.0
|
|
30612
30722
|
*
|
|
30613
30723
|
* This source code is licensed under the MIT license found in the
|
|
30614
30724
|
* LICENSE file in the root directory of this source tree.
|