mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-13 19:55:24 +00:00
Bump jwt-decode from 3.1.2 to 4.0.0 in /spiffworkflow-frontend (#1691)
* Bump jwt-decode from 3.1.2 to 4.0.0 in /spiffworkflow-frontend Bumps [jwt-decode](https://github.com/auth0/jwt-decode) from 3.1.2 to 4.0.0. - [Release notes](https://github.com/auth0/jwt-decode/releases) - [Changelog](https://github.com/auth0/jwt-decode/blob/main/CHANGELOG.md) - [Commits](https://github.com/auth0/jwt-decode/compare/v3.1.2...v4.0.0) --- updated-dependencies: - dependency-name: jwt-decode dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * The jwtDecode function is now no longer the default export --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com> Co-authored-by: burnettk <burnettk@users.noreply.github.com>
This commit is contained in:
parent
6fad14ae6f
commit
295c191c17
32
spiffworkflow-frontend/package-lock.json
generated
32
spiffworkflow-frontend/package-lock.json
generated
@ -48,7 +48,7 @@
|
||||
"dmn-js": "^16.0.0",
|
||||
"dmn-js-properties-panel": "^3.0.0",
|
||||
"dmn-js-shared": "^16.4.0",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"keycloak-js": "^24.0.4",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"prop-types": "^15.8.1",
|
||||
@ -17670,9 +17670,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/jwt-decode": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz",
|
||||
"integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A=="
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
|
||||
"integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/keycloak-js": {
|
||||
"version": "24.0.4",
|
||||
@ -17683,14 +17686,6 @@
|
||||
"jwt-decode": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/keycloak-js/node_modules/jwt-decode": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
|
||||
"integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/keyv": {
|
||||
"version": "4.5.4",
|
||||
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
|
||||
@ -38727,9 +38722,9 @@
|
||||
}
|
||||
},
|
||||
"jwt-decode": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz",
|
||||
"integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A=="
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
|
||||
"integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA=="
|
||||
},
|
||||
"keycloak-js": {
|
||||
"version": "24.0.4",
|
||||
@ -38738,13 +38733,6 @@
|
||||
"requires": {
|
||||
"js-sha256": "^0.11.0",
|
||||
"jwt-decode": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jwt-decode": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
|
||||
"integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"keyv": {
|
||||
|
@ -44,7 +44,7 @@
|
||||
"dmn-js": "^16.0.0",
|
||||
"dmn-js-properties-panel": "^3.0.0",
|
||||
"dmn-js-shared": "^16.4.0",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"keycloak-js": "^24.0.4",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"prop-types": "^15.8.1",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import jwt from 'jwt-decode';
|
||||
import { jwtDecode } from 'jwt-decode';
|
||||
import cookie from 'cookie';
|
||||
import { BACKEND_BASE_URL } from '../config';
|
||||
import { AuthenticationOption } from '../interfaces';
|
||||
@ -61,7 +61,7 @@ const isLoggedIn = () => {
|
||||
const isPublicUser = () => {
|
||||
const idToken = getIdToken();
|
||||
if (idToken) {
|
||||
const idObject = jwt(idToken);
|
||||
const idObject = jwtDecode(idToken);
|
||||
return (idObject as any).public;
|
||||
}
|
||||
return false;
|
||||
@ -107,7 +107,7 @@ const doLogout = () => {
|
||||
const getUserEmail = () => {
|
||||
const idToken = getIdToken();
|
||||
if (idToken) {
|
||||
const idObject = jwt(idToken);
|
||||
const idObject = jwtDecode(idToken);
|
||||
return (idObject as any).email;
|
||||
}
|
||||
return null;
|
||||
@ -116,7 +116,7 @@ const getUserEmail = () => {
|
||||
const authenticationDisabled = () => {
|
||||
const idToken = getIdToken();
|
||||
if (idToken) {
|
||||
const idObject = jwt(idToken);
|
||||
const idObject = jwtDecode(idToken);
|
||||
return (idObject as any).authentication_disabled;
|
||||
}
|
||||
return false;
|
||||
@ -133,7 +133,7 @@ const authenticationDisabled = () => {
|
||||
const getPreferredUsername = () => {
|
||||
const idToken = getIdToken();
|
||||
if (idToken) {
|
||||
const idObject = jwt(idToken);
|
||||
const idObject = jwtDecode(idToken);
|
||||
|
||||
if (idToken === undefined || idToken === 'undefined') {
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user