@frontegg/redux-store 5.3.0 → 5.4.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/auth/index.js +24 -10
- package/node/auth/index.js +24 -10
- package/package.json +1 -1
package/auth/index.js
CHANGED
|
@@ -1747,20 +1747,34 @@ function* ssoSagasMock() {
|
|
|
1747
1747
|
yield takeEvery(actions.updateSSOAuthorizationRoles, updateAuthorizationRolesMock);
|
|
1748
1748
|
}
|
|
1749
1749
|
|
|
1750
|
-
function*
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1750
|
+
function* loadOidc() {
|
|
1751
|
+
try {
|
|
1752
|
+
const oidcConfiguration = yield call(api.auth.getOidcConfiguration);
|
|
1753
|
+
return oidcConfiguration;
|
|
1754
|
+
}
|
|
1755
|
+
catch (e) {
|
|
1756
|
+
return null;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
function* loadSaml() {
|
|
1760
|
+
try {
|
|
1761
|
+
const samlMetadata = yield call(api.metadata.getSamlMetadata);
|
|
1762
|
+
return samlMetadata;
|
|
1763
|
+
}
|
|
1764
|
+
catch (e) {
|
|
1765
|
+
return null;
|
|
1766
|
+
}
|
|
1759
1767
|
}
|
|
1760
1768
|
function* loadSSOConfigurationsV2() {
|
|
1761
1769
|
try {
|
|
1762
1770
|
yield put(actions.setSSOLoader({ key: SSOStateKeys.LOAD_SSO_CONFIGURATIONS, value: true }));
|
|
1763
|
-
yield
|
|
1771
|
+
const [oidcConfiguration, samlMetadata] = yield all([loadOidc, loadSaml]);
|
|
1772
|
+
const ssoConfigurations = yield call(api.auth.getSSOConfigurations);
|
|
1773
|
+
yield put(actions.setSSOState({
|
|
1774
|
+
ssoConfigurations,
|
|
1775
|
+
oidcConfiguration,
|
|
1776
|
+
samlMetadata
|
|
1777
|
+
}));
|
|
1764
1778
|
}
|
|
1765
1779
|
catch (error) {
|
|
1766
1780
|
yield put(actions.setSSOError({ key: SSOStateKeys.LOAD_SSO_CONFIGURATIONS, value: error.message }));
|
package/node/auth/index.js
CHANGED
|
@@ -1749,20 +1749,34 @@ function* ssoSagasMock() {
|
|
|
1749
1749
|
yield effects.takeEvery(actions.updateSSOAuthorizationRoles, updateAuthorizationRolesMock);
|
|
1750
1750
|
}
|
|
1751
1751
|
|
|
1752
|
-
function*
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1752
|
+
function* loadOidc() {
|
|
1753
|
+
try {
|
|
1754
|
+
const oidcConfiguration = yield effects.call(restApi.api.auth.getOidcConfiguration);
|
|
1755
|
+
return oidcConfiguration;
|
|
1756
|
+
}
|
|
1757
|
+
catch (e) {
|
|
1758
|
+
return null;
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
function* loadSaml() {
|
|
1762
|
+
try {
|
|
1763
|
+
const samlMetadata = yield effects.call(restApi.api.metadata.getSamlMetadata);
|
|
1764
|
+
return samlMetadata;
|
|
1765
|
+
}
|
|
1766
|
+
catch (e) {
|
|
1767
|
+
return null;
|
|
1768
|
+
}
|
|
1761
1769
|
}
|
|
1762
1770
|
function* loadSSOConfigurationsV2() {
|
|
1763
1771
|
try {
|
|
1764
1772
|
yield effects.put(actions.setSSOLoader({ key: exports.SSOStateKeys.LOAD_SSO_CONFIGURATIONS, value: true }));
|
|
1765
|
-
yield
|
|
1773
|
+
const [oidcConfiguration, samlMetadata] = yield effects.all([loadOidc, loadSaml]);
|
|
1774
|
+
const ssoConfigurations = yield effects.call(restApi.api.auth.getSSOConfigurations);
|
|
1775
|
+
yield effects.put(actions.setSSOState({
|
|
1776
|
+
ssoConfigurations,
|
|
1777
|
+
oidcConfiguration,
|
|
1778
|
+
samlMetadata
|
|
1779
|
+
}));
|
|
1766
1780
|
}
|
|
1767
1781
|
catch (error) {
|
|
1768
1782
|
yield effects.put(actions.setSSOError({ key: exports.SSOStateKeys.LOAD_SSO_CONFIGURATIONS, value: error.message }));
|