@frontegg/redux-store 6.31.0-alpha.1 → 6.31.0-alpha.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/auth/SessionsPolicyState/saga.js +9 -4
- package/auth/dummy.js +2 -2
- package/index.js +1 -1
- package/node/auth/SessionsPolicyState/saga.js +9 -3
- package/node/auth/dummy.js +2 -2
- package/node/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
3
|
const _excluded = ["callback"],
|
|
3
4
|
_excluded2 = ["callback"];
|
|
4
|
-
import { takeLatest, put, call, takeLeading } from 'redux-saga/effects';
|
|
5
|
+
import { takeLatest, put, call, takeLeading, select } from 'redux-saga/effects';
|
|
5
6
|
import { api } from '@frontegg/rest-api';
|
|
6
7
|
import { actions } from '../reducer';
|
|
7
8
|
import { sessionsConfigDummies } from '../dummy';
|
|
@@ -61,10 +62,14 @@ function* loadSessionPolicyStateMock() {
|
|
|
61
62
|
loading: true,
|
|
62
63
|
error: null
|
|
63
64
|
}));
|
|
64
|
-
yield
|
|
65
|
-
|
|
65
|
+
const sessionPolicyState = yield select(state => {
|
|
66
|
+
var _state$auth$sessionsP, _state$auth;
|
|
67
|
+
|
|
68
|
+
return (_state$auth$sessionsP = state == null ? void 0 : (_state$auth = state.auth) == null ? void 0 : _state$auth.sessionsPolicyState) != null ? _state$auth$sessionsP : sessionsConfigDummies;
|
|
69
|
+
});
|
|
70
|
+
yield put(actions.setSessionsPolicyState(_extends({}, sessionPolicyState, {
|
|
66
71
|
loading: false
|
|
67
|
-
}));
|
|
72
|
+
})));
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
function* createOrUpdateSessionsPolicyMock({
|
package/auth/dummy.js
CHANGED
|
@@ -274,11 +274,11 @@ export const sessionsConfigDummies = {
|
|
|
274
274
|
},
|
|
275
275
|
sessionIdleTimeoutConfiguration: {
|
|
276
276
|
isActive: true,
|
|
277
|
-
timeout:
|
|
277
|
+
timeout: 3600
|
|
278
278
|
},
|
|
279
279
|
sessionTimeoutConfiguration: {
|
|
280
280
|
isActive: true,
|
|
281
|
-
timeout:
|
|
281
|
+
timeout: 7776000
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
284
|
export const dummyIpConfig = {
|
package/index.js
CHANGED
|
@@ -8,6 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.sessionsPolicySaga = sessionsPolicySaga;
|
|
9
9
|
exports.sessionsPolicySagaMock = sessionsPolicySagaMock;
|
|
10
10
|
|
|
11
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
|
+
|
|
11
13
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
14
|
|
|
13
15
|
var _effects = require("redux-saga/effects");
|
|
@@ -75,10 +77,14 @@ function* loadSessionPolicyStateMock() {
|
|
|
75
77
|
loading: true,
|
|
76
78
|
error: null
|
|
77
79
|
}));
|
|
78
|
-
yield (0, _effects.
|
|
79
|
-
|
|
80
|
+
const sessionPolicyState = yield (0, _effects.select)(state => {
|
|
81
|
+
var _state$auth$sessionsP, _state$auth;
|
|
82
|
+
|
|
83
|
+
return (_state$auth$sessionsP = state == null ? void 0 : (_state$auth = state.auth) == null ? void 0 : _state$auth.sessionsPolicyState) != null ? _state$auth$sessionsP : _dummy.sessionsConfigDummies;
|
|
84
|
+
});
|
|
85
|
+
yield (0, _effects.put)(_reducer.actions.setSessionsPolicyState((0, _extends2.default)({}, sessionPolicyState, {
|
|
80
86
|
loading: false
|
|
81
|
-
}));
|
|
87
|
+
})));
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
function* createOrUpdateSessionsPolicyMock({
|
package/node/auth/dummy.js
CHANGED
|
@@ -309,11 +309,11 @@ const sessionsConfigDummies = {
|
|
|
309
309
|
},
|
|
310
310
|
sessionIdleTimeoutConfiguration: {
|
|
311
311
|
isActive: true,
|
|
312
|
-
timeout:
|
|
312
|
+
timeout: 3600
|
|
313
313
|
},
|
|
314
314
|
sessionTimeoutConfiguration: {
|
|
315
315
|
isActive: true,
|
|
316
|
-
timeout:
|
|
316
|
+
timeout: 7776000
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
319
|
exports.sessionsConfigDummies = sessionsConfigDummies;
|
package/node/index.js
CHANGED