@opengeoweb/authentication 12.11.0 → 12.13.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.esm.js
CHANGED
|
@@ -947,7 +947,8 @@ var HandleOAuth2Code = function HandleOAuth2Code() {
|
|
|
947
947
|
config = {
|
|
948
948
|
headers: {
|
|
949
949
|
'content-type': useDefaultContentType ? 'application/json' : 'application/x-www-form-urlencoded'
|
|
950
|
-
}
|
|
950
|
+
},
|
|
951
|
+
timeout: 30000
|
|
951
952
|
};
|
|
952
953
|
_context.prev = 15;
|
|
953
954
|
_context.next = 18;
|
|
@@ -1244,16 +1245,6 @@ var UserMenuRolesConnect = function UserMenuRolesConnect(_ref) {
|
|
|
1244
1245
|
});
|
|
1245
1246
|
};
|
|
1246
1247
|
|
|
1247
|
-
var RequireAuth = function RequireAuth(_ref) {
|
|
1248
|
-
var children = _ref.children;
|
|
1249
|
-
var _useAuthenticationCon = useAuthenticationContext(),
|
|
1250
|
-
isLoggedIn = _useAuthenticationCon.isLoggedIn;
|
|
1251
|
-
if (!isLoggedIn) {
|
|
1252
|
-
window.location.assign('/login');
|
|
1253
|
-
}
|
|
1254
|
-
return children;
|
|
1255
|
-
};
|
|
1256
|
-
|
|
1257
1248
|
var _excluded = ["children", "createApi", "name"];
|
|
1258
1249
|
var ApiContext = /*#__PURE__*/React.createContext({
|
|
1259
1250
|
api: null
|
|
@@ -1271,7 +1262,7 @@ var ApiProvider = function ApiProvider(_ref) {
|
|
|
1271
1262
|
name = _ref.name,
|
|
1272
1263
|
apiModuleProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1273
1264
|
var handleNewApi = React.useCallback(function () {
|
|
1274
|
-
var newApi = createApi(apiModuleProps);
|
|
1265
|
+
var newApi = createApi == null ? void 0 : createApi(apiModuleProps);
|
|
1275
1266
|
if (name) {
|
|
1276
1267
|
registerApi(name, newApi);
|
|
1277
1268
|
}
|
|
@@ -1348,8 +1339,8 @@ params, callbacks) {
|
|
|
1348
1339
|
case 5:
|
|
1349
1340
|
response = _context.sent;
|
|
1350
1341
|
if (isMounted.current) {
|
|
1351
|
-
data = Array.isArray(response) ? response.map(function (
|
|
1352
|
-
return
|
|
1342
|
+
data = Array.isArray(response) ? response.map(function (dimension) {
|
|
1343
|
+
return dimension.data;
|
|
1353
1344
|
}) : response.data;
|
|
1354
1345
|
(_callbacksRef$current2 = callbacksRef.current) == null || _callbacksRef$current2.onSuccess == null || _callbacksRef$current2.onSuccess(data);
|
|
1355
1346
|
setResult(data);
|
|
@@ -1396,4 +1387,4 @@ params, callbacks) {
|
|
|
1396
1387
|
};
|
|
1397
1388
|
};
|
|
1398
1389
|
|
|
1399
|
-
export { AUTH_NAMESPACE, ApiProvider, AuthenticationContext, AuthenticationProvider, HandleOAuth2Code as Code, GEOWEB_ROLE_PRESETS_ADMIN, GEOWEB_ROLE_USER, KEEP_ALIVE_POLLER_IN_SECONDS, OAuth2Login as Login, OAuth2Logout as Logout, MILLISECOND_TO_SECOND, REFRESH_TOKEN_WHEN_PCT_EXPIRED,
|
|
1390
|
+
export { AUTH_NAMESPACE, ApiProvider, AuthenticationContext, AuthenticationProvider, HandleOAuth2Code as Code, GEOWEB_ROLE_PRESETS_ADMIN, GEOWEB_ROLE_USER, KEEP_ALIVE_POLLER_IN_SECONDS, OAuth2Login as Login, OAuth2Logout as Logout, MILLISECOND_TO_SECOND, REFRESH_TOKEN_WHEN_PCT_EXPIRED, UserMenuRoles, UserMenuRolesConnect, apiTranslations, authTranslations, createApiInstance, createFakeApiInstance, createNonAuthApiInstance, fakeApiRequest, getApi, getAuthConfig, getCodeChallenge, getCurrentTimeInSeconds, getCurrentUrlLocation, getRandomString, groupsToRoles, makeCredentialsFromTokenResponse, refreshAccessToken, refreshAccessTokenAndSetAuthContext, useApi, useApiContext, useAuthenticationContext, useAuthenticationDefaultProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/authentication",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.13.0",
|
|
4
4
|
"description": "GeoWeb authentication library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"axios": "^1.7.7",
|
|
12
12
|
"react-router-dom": "^6.23.1",
|
|
13
|
-
"@opengeoweb/shared": "12.
|
|
14
|
-
"@opengeoweb/theme": "12.
|
|
13
|
+
"@opengeoweb/shared": "12.13.0",
|
|
14
|
+
"@opengeoweb/theme": "12.13.0",
|
|
15
15
|
"i18next": "^25.0.1",
|
|
16
16
|
"react-i18next": "^15.1.1",
|
|
17
|
-
"@opengeoweb/snackbar": "12.
|
|
17
|
+
"@opengeoweb/snackbar": "12.13.0",
|
|
18
18
|
"react-redux": "^9.2.0",
|
|
19
19
|
"@reduxjs/toolkit": "^2.6.1",
|
|
20
20
|
"@mui/material": "^7.0.1"
|
package/src/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export { default as Login } from './lib/components/pages/Login';
|
|
|
5
5
|
export { default as Logout } from './lib/components/pages/Logout';
|
|
6
6
|
export * from './lib/components/UserMenuRoles';
|
|
7
7
|
export * from './lib/components/AuthenticationContext';
|
|
8
|
-
export * from './lib/components/PrivateRoute';
|
|
9
8
|
export * from './lib/components/ApiContext';
|
|
10
9
|
export * from './lib/components/apiHooks';
|
|
11
10
|
export * from './lib/utils/utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './RequireAuth';
|