From c8416705bb10269dc64cda53f41f5b21752336c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:47:01 +0000 Subject: [PATCH 1/7] build(deps): bump keycloak-js from 25.0.6 to 26.0.0 Bumps [keycloak-js](https://github.com/keycloak/keycloak) from 25.0.6 to 26.0.0. - [Release notes](https://github.com/keycloak/keycloak/releases) - [Commits](https://github.com/keycloak/keycloak/compare/25.0.6...26.0.0) --- updated-dependencies: - dependency-name: keycloak-js dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 28 ++++------------------------ package.json | 2 +- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index fa6cbbe1..9b39e9bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "date-fns": "^4.1.0", "glob": "^11.0.0", "jsroot": "^7.7.4", - "keycloak-js": "^25.0.6", + "keycloak-js": "^26.0.0", "keycloak-react-web": "^0.1.19", "ky": "^1.7.2", "material-ui-popup-state": "^5.3.1", @@ -18582,12 +18582,6 @@ "jiti": "bin/jiti.js" } }, - "node_modules/js-sha256": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.11.0.tgz", - "integrity": "sha512-6xNlKayMZvds9h1Y1VWc0fQHQ82BxTXizWPEtEeGvmOUYpBRy4gbWroHLpzowe6xiQhHpelCQiE7HEdznyBL9Q==", - "license": "MIT" - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -18840,24 +18834,10 @@ "safe-buffer": "~5.1.0" } }, - "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==", - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/keycloak-js": { - "version": "25.0.6", - "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-25.0.6.tgz", - "integrity": "sha512-Km+dc+XfNvY6a4az5jcxTK0zPk52ns9mAxLrHj7lF3V+riVYvQujfHmhayltJDjEpSOJ4C8a57LFNNKnNnRP2g==", - "license": "Apache-2.0", - "dependencies": { - "js-sha256": "^0.11.0", - "jwt-decode": "^4.0.0" - } + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-26.0.0.tgz", + "integrity": "sha512-uUvoc6luDuAOQ74i4/wKm1tGduYcJ/2jSh29Krekkt+ytn1mLL+mHug27FfpwgxcTb6yx+uL0OcehXwl3WIRMQ==" }, "node_modules/keycloak-react-web": { "version": "0.1.19", diff --git a/package.json b/package.json index a5f46005..d56a397b 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "date-fns": "^4.1.0", "glob": "^11.0.0", "jsroot": "^7.7.4", - "keycloak-js": "^25.0.6", + "keycloak-js": "^26.0.0", "keycloak-react-web": "^0.1.19", "ky": "^1.7.2", "material-ui-popup-state": "^5.3.1", From 1b017bd241d5f449518ab094ead0b7eae234c3e0 Mon Sep 17 00:00:00 2001 From: dudiiiiiiii Date: Thu, 17 Oct 2024 17:20:51 +0200 Subject: [PATCH 2/7] change typescript module resolution option --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 3af1623f..bc5986e0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, From cf7fee01784ef017b1de449e2cb20038af05a6d7 Mon Sep 17 00:00:00 2001 From: dudiiiiiiii Date: Wed, 23 Oct 2024 18:54:57 +0200 Subject: [PATCH 3/7] first changes cookie issues still --- .../Sidebar/SidebarTree/SidebarTree.tsx | 2 +- .../Sidebar/properties/fields/PropertyField.tsx | 2 +- .../js/viewport/Viewport.ClippedViewCSG.ts | 2 +- src/services/AuthService.tsx | 3 +-- src/services/KeycloakAuthService.tsx | 15 ++++++++++----- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/ThreeEditor/components/Sidebar/SidebarTree/SidebarTree.tsx b/src/ThreeEditor/components/Sidebar/SidebarTree/SidebarTree.tsx index c3c4b5ad..ad2ce905 100644 --- a/src/ThreeEditor/components/Sidebar/SidebarTree/SidebarTree.tsx +++ b/src/ThreeEditor/components/Sidebar/SidebarTree/SidebarTree.tsx @@ -4,7 +4,7 @@ import { Tree, TreeMethods } from '@minoru/react-dnd-treeview'; import { Divider } from '@mui/material'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { Object3D } from 'three'; -import { generateUUID } from 'three/src/math/MathUtils'; +import { generateUUID } from 'three/src/math/MathUtils.js'; import { hasVisibleChildren } from '../../../../util/hooks/useKeyboardEditorControls'; import { ChangeObjectOrderCommand } from '../../../js/commands/ChangeObjectOrderCommand'; diff --git a/src/ThreeEditor/components/Sidebar/properties/fields/PropertyField.tsx b/src/ThreeEditor/components/Sidebar/properties/fields/PropertyField.tsx index e6a69bcc..8d087f95 100644 --- a/src/ThreeEditor/components/Sidebar/properties/fields/PropertyField.tsx +++ b/src/ThreeEditor/components/Sidebar/properties/fields/PropertyField.tsx @@ -1,7 +1,7 @@ import { Box, Checkbox, Grid, Stack, TextField, Typography } from '@mui/material'; import { ReactNode, useCallback, useEffect, useMemo, useRef } from 'react'; import { Vector2 } from 'three'; -import { Vector3 } from 'three/src/math/Vector3'; +import { Vector3 } from 'three/src/math/Vector3.js'; import { InfoTooltip } from '../../../../../shared/components/tooltip/InfoTooltip'; import { diff --git a/src/ThreeEditor/js/viewport/Viewport.ClippedViewCSG.ts b/src/ThreeEditor/js/viewport/Viewport.ClippedViewCSG.ts index cae6a1a6..a05331f7 100644 --- a/src/ThreeEditor/js/viewport/Viewport.ClippedViewCSG.ts +++ b/src/ThreeEditor/js/viewport/Viewport.ClippedViewCSG.ts @@ -1,6 +1,6 @@ import { Signal } from 'signals'; import * as THREE from 'three'; -import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min'; +import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js'; import { debounce } from 'throttle-debounce'; import { CSG } from '../../CSG/CSG'; diff --git a/src/services/AuthService.tsx b/src/services/AuthService.tsx index 54ca6ed9..c9dc613a 100644 --- a/src/services/AuthService.tsx +++ b/src/services/AuthService.tsx @@ -1,7 +1,6 @@ import { Backdrop, CircularProgress, Theme, Typography } from '@mui/material'; import { KeycloakTokenParsed } from 'keycloak-js'; -import ky, { HTTPError } from 'ky'; -import { KyInstance } from 'ky/distribution/types/ky'; +import ky, { HTTPError, KyInstance } from 'ky'; import { useSnackbar } from 'notistack'; import { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/src/services/KeycloakAuthService.tsx b/src/services/KeycloakAuthService.tsx index a5021bb3..5e0f90ce 100644 --- a/src/services/KeycloakAuthService.tsx +++ b/src/services/KeycloakAuthService.tsx @@ -7,8 +7,8 @@ import { createSubstituteContext, GenericContextProviderProps } from './GenericC const keycloakParams = { url: `${process.env.REACT_APP_KEYCLOAK_BASE_URL ?? 'https://localhost:8080'}/auth/`, - realm: `${process.env.REACT_APP_KEYCLOAK_REALM ?? ''}`, - clientId: `${process.env.REACT_APP_KEYCLOAK_CLIENT_ID ?? ''}` + realm: `${process.env.REACT_APP_KEYCLOAK_REALM ?? 'placeholder'}`, + clientId: `${process.env.REACT_APP_KEYCLOAK_CLIENT_ID ?? 'placeholder'}` }; const authInstance = new Keycloak(keycloakParams) as any; @@ -25,7 +25,7 @@ const initOptions = { export type KeycloakAuthContext = | { initialized: false; - keycloak?: Keycloak; + keycloak?: undefined; } | { initialized: true; @@ -37,16 +37,21 @@ const [useKeycloakAuth, KeycloakAuthContextProvider] = const KeycloakAuth = ({ children }: GenericContextProviderProps) => { const { altAuth } = useConfig(); + + // Check if the realm is "placeholder" + const isRealmPlaceholder = keycloakParams.realm === 'placeholder'; + const proxyContextProvider = useCallback( (children: ReactNode) => ( {children} ), - [] + [isRealmPlaceholder] ); return altAuth ? ( From 4701cfbfb320a5e153f9e5b74f45e12987f37fe2 Mon Sep 17 00:00:00 2001 From: dudiiiiiiii Date: Tue, 29 Oct 2024 06:29:16 +0100 Subject: [PATCH 4/7] remove keycloak-web lib + fix KeycoakAuthservice --- package.json | 3 +-- src/services/KeycloakAuthService.tsx | 32 +++++++++++++++++----------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index d56a397b..c60a5681 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,7 @@ "date-fns": "^4.1.0", "glob": "^11.0.0", "jsroot": "^7.7.4", - "keycloak-js": "^26.0.0", - "keycloak-react-web": "^0.1.19", + "keycloak-js": "^26.0.1", "ky": "^1.7.2", "material-ui-popup-state": "^5.3.1", "notistack": "^3.0.1", diff --git a/src/services/KeycloakAuthService.tsx b/src/services/KeycloakAuthService.tsx index 5e0f90ce..2c0e84ba 100644 --- a/src/services/KeycloakAuthService.tsx +++ b/src/services/KeycloakAuthService.tsx @@ -1,57 +1,63 @@ import Keycloak, { KeycloakInitOptions } from 'keycloak-js'; -import { KeycloakProvider, useKeycloak } from 'keycloak-react-web'; import { ReactNode, useCallback } from 'react'; import { useConfig } from '../config/ConfigService'; import { createSubstituteContext, GenericContextProviderProps } from './GenericContext'; +interface KeycloakAuthProviderProps { + client: Keycloak; + initOptions?: KeycloakInitOptions; + children: any; +} + +declare const KeycloakProvider: React.FC; + const keycloakParams = { url: `${process.env.REACT_APP_KEYCLOAK_BASE_URL ?? 'https://localhost:8080'}/auth/`, - realm: `${process.env.REACT_APP_KEYCLOAK_REALM ?? 'placeholder'}`, - clientId: `${process.env.REACT_APP_KEYCLOAK_CLIENT_ID ?? 'placeholder'}` + realm: `${process.env.REACT_APP_KEYCLOAK_REALM ?? 'master'}`, + clientId: `${process.env.REACT_APP_KEYCLOAK_CLIENT_ID ?? 'my-client'}` }; const authInstance = new Keycloak(keycloakParams) as any; -const initOptions = { +const initOptions: KeycloakInitOptions = { pkceMethod: 'S256', onLoad: 'check-sso', checkLoginIframe: false, enableLogging: false, silentCheckSsoFallback: false, silentCheckSsoRedirectUri: `${window.location.origin}/silent-check-sso.html` -} as const satisfies KeycloakInitOptions; +}; export type KeycloakAuthContext = | { initialized: false; - keycloak?: undefined; + keycloak?: Keycloak; } | { initialized: true; keycloak: Keycloak; }; +function useKeycloak(): KeycloakAuthContext { + return { initialized: false, keycloak: undefined }; +} + const [useKeycloakAuth, KeycloakAuthContextProvider] = createSubstituteContext(useKeycloak); const KeycloakAuth = ({ children }: GenericContextProviderProps) => { const { altAuth } = useConfig(); - - // Check if the realm is "placeholder" - const isRealmPlaceholder = keycloakParams.realm === 'placeholder'; - const proxyContextProvider = useCallback( (children: ReactNode) => ( {children} ), - [isRealmPlaceholder] + [] ); return altAuth ? ( From c1acaa5180dcc927d42baf406be4aed8d09782f4 Mon Sep 17 00:00:00 2001 From: dudiiiiiiii Date: Tue, 29 Oct 2024 06:34:21 +0100 Subject: [PATCH 5/7] update lock.json --- package-lock.json | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b39e9bf..57bc09d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,8 +33,7 @@ "date-fns": "^4.1.0", "glob": "^11.0.0", "jsroot": "^7.7.4", - "keycloak-js": "^26.0.0", - "keycloak-react-web": "^0.1.19", + "keycloak-js": "^26.0.1", "ky": "^1.7.2", "material-ui-popup-state": "^5.3.1", "notistack": "^3.0.1", @@ -18835,34 +18834,9 @@ } }, "node_modules/keycloak-js": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-26.0.0.tgz", - "integrity": "sha512-uUvoc6luDuAOQ74i4/wKm1tGduYcJ/2jSh29Krekkt+ytn1mLL+mHug27FfpwgxcTb6yx+uL0OcehXwl3WIRMQ==" - }, - "node_modules/keycloak-react-web": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/keycloak-react-web/-/keycloak-react-web-0.1.19.tgz", - "integrity": "sha512-ECpJ75rajWPB77zjUcigzpCofi6ynqACKNDyhzx7fUI17JlsCsoRGGGDrDGPlVh+sMvurQNcmZHGhSNWnzCZAw==", - "license": "MIT", - "dependencies": { - "keycloak-js": "^19.0.2" - } - }, - "node_modules/keycloak-react-web/node_modules/js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==", - "license": "MIT" - }, - "node_modules/keycloak-react-web/node_modules/keycloak-js": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-19.0.3.tgz", - "integrity": "sha512-mzCBxrzfl+vB551Q7MB+T9+40IHU4i0a6g1eTatzeEGrQMis5m/BqvPC3kxTsI+/LxHbB9XYQE3u9SlWKDHQCw==", - "license": "Apache-2.0", - "dependencies": { - "base64-js": "^1.5.1", - "js-sha256": "^0.9.0" - } + "version": "26.0.2", + "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-26.0.2.tgz", + "integrity": "sha512-c77fNwTBDaNtlewrG/CREwZYGNe/QvL72o3/8/EIsvjphPVrXobvAcQG6DxBy82Ah9e3ASUPxAyyA+jPVEgOsg==" }, "node_modules/keyv": { "version": "4.5.4", From d9a363675ef40eee2014e54899a3a533889e3686 Mon Sep 17 00:00:00 2001 From: Leszek Grzanka Date: Mon, 4 Nov 2024 19:08:41 +0000 Subject: [PATCH 6/7] react-web copied and explained --- src/services/KeycloakAuthService.tsx | 22 ++++---------- src/util/keycloak/KeycloakProvider.tsx | 42 ++++++++++++++++++++++++++ src/util/keycloak/Readme.md | 4 +++ src/util/keycloak/interfaces.ts | 9 ++++++ src/util/keycloak/keycloakContext.ts | 22 ++++++++++++++ src/util/keycloak/useKeycloak.ts | 16 ++++++++++ 6 files changed, 99 insertions(+), 16 deletions(-) create mode 100644 src/util/keycloak/KeycloakProvider.tsx create mode 100644 src/util/keycloak/Readme.md create mode 100644 src/util/keycloak/interfaces.ts create mode 100644 src/util/keycloak/keycloakContext.ts create mode 100644 src/util/keycloak/useKeycloak.ts diff --git a/src/services/KeycloakAuthService.tsx b/src/services/KeycloakAuthService.tsx index 2c0e84ba..9fe182b1 100644 --- a/src/services/KeycloakAuthService.tsx +++ b/src/services/KeycloakAuthService.tsx @@ -1,17 +1,11 @@ import Keycloak, { KeycloakInitOptions } from 'keycloak-js'; -import { ReactNode, useCallback } from 'react'; +import React, { ReactNode, useCallback } from 'react'; +import KeycloakProvider from '../util/keycloak/KeycloakProvider'; +import { useKeycloak } from '../util/keycloak/useKeycloak'; import { useConfig } from '../config/ConfigService'; import { createSubstituteContext, GenericContextProviderProps } from './GenericContext'; -interface KeycloakAuthProviderProps { - client: Keycloak; - initOptions?: KeycloakInitOptions; - children: any; -} - -declare const KeycloakProvider: React.FC; - const keycloakParams = { url: `${process.env.REACT_APP_KEYCLOAK_BASE_URL ?? 'https://localhost:8080'}/auth/`, realm: `${process.env.REACT_APP_KEYCLOAK_REALM ?? 'master'}`, @@ -20,14 +14,14 @@ const keycloakParams = { const authInstance = new Keycloak(keycloakParams) as any; -const initOptions: KeycloakInitOptions = { +const initOptions = { pkceMethod: 'S256', onLoad: 'check-sso', checkLoginIframe: false, enableLogging: false, silentCheckSsoFallback: false, silentCheckSsoRedirectUri: `${window.location.origin}/silent-check-sso.html` -}; +} as const satisfies KeycloakInitOptions; export type KeycloakAuthContext = | { @@ -39,10 +33,6 @@ export type KeycloakAuthContext = keycloak: Keycloak; }; -function useKeycloak(): KeycloakAuthContext { - return { initialized: false, keycloak: undefined }; -} - const [useKeycloakAuth, KeycloakAuthContextProvider] = createSubstituteContext(useKeycloak); @@ -71,4 +61,4 @@ const KeycloakAuth = ({ children }: GenericContextProviderProps) => { ); }; -export { KeycloakAuth, useKeycloakAuth }; +export { KeycloakAuth, useKeycloakAuth }; \ No newline at end of file diff --git a/src/util/keycloak/KeycloakProvider.tsx b/src/util/keycloak/KeycloakProvider.tsx new file mode 100644 index 00000000..31c2d4bb --- /dev/null +++ b/src/util/keycloak/KeycloakProvider.tsx @@ -0,0 +1,42 @@ +import React from "react"; +import { KeycloakInitOptions } from "keycloak-js"; +import { IAuthContextProps, keycloakContext } from "./keycloakContext"; +import type { KeycloakAuthProviderProps } from "./interfaces"; + +const defaultOptions: KeycloakInitOptions = { + onLoad: "check-sso", +}; + +function createAuthProvider(AuthContext: React.Context) { + const KeycloakAuthProvider: React.FC = (props) => { + const { client, children } = props; + const [initialized, setInitialized] = React.useState(false); + + React.useEffect(() => { + const { client, initOptions } = props; + const initialize = () => { + client + .init({ ...defaultOptions, ...initOptions }) + .then(() => { + setInitialized(true); + }) + .catch((err: string) => { + throw new Error(err); + }); + }; + initialize(); + }, []); + + return ( + + {children} + + ); + }; + + return KeycloakAuthProvider; +} + +const KeycloakProvider = createAuthProvider(keycloakContext); +export const KeycloakConsumer = keycloakContext.Consumer; +export default KeycloakProvider; \ No newline at end of file diff --git a/src/util/keycloak/Readme.md b/src/util/keycloak/Readme.md new file mode 100644 index 00000000..43787ebb --- /dev/null +++ b/src/util/keycloak/Readme.md @@ -0,0 +1,4 @@ +Files in this directory were copied from keycloak-react-web library. +This library is not supported since 2023 and because of this it's not compatible with newest official keycloak-js library. +Compatibility issue: Keycloak object in newest keycloak-js library changed in version 26.0.0 +and is not assignable to object from older versions (keycloak-react-web uses version 19.0.2 of keycloak-js). \ No newline at end of file diff --git a/src/util/keycloak/interfaces.ts b/src/util/keycloak/interfaces.ts new file mode 100644 index 00000000..d392c9a5 --- /dev/null +++ b/src/util/keycloak/interfaces.ts @@ -0,0 +1,9 @@ +import Keycloak, { KeycloakInitOptions } from 'keycloak-js'; + +interface KeycloakAuthProviderProps { + client: Keycloak; + initOptions?: KeycloakInitOptions; + children: any +} + +export type { KeycloakAuthProviderProps } \ No newline at end of file diff --git a/src/util/keycloak/keycloakContext.ts b/src/util/keycloak/keycloakContext.ts new file mode 100644 index 00000000..71cad1b2 --- /dev/null +++ b/src/util/keycloak/keycloakContext.ts @@ -0,0 +1,22 @@ +import Keycloak from 'keycloak-js'; +import React, { createContext } from 'react'; + +export type IAuthContextProps = { + client?: Keycloak; + initialized: boolean; +}; + +export function createAuthContext( + initialContext?: Partial +): React.Context { + return createContext({ + initialized: false, + ...initialContext + }); +} + +export default createAuthContext; + +export const keycloakContext = createAuthContext(); + +export const KeycloakContextConsumer = keycloakContext.Consumer; \ No newline at end of file diff --git a/src/util/keycloak/useKeycloak.ts b/src/util/keycloak/useKeycloak.ts new file mode 100644 index 00000000..021ca762 --- /dev/null +++ b/src/util/keycloak/useKeycloak.ts @@ -0,0 +1,16 @@ +import { useContext } from 'react'; +import { keycloakContext } from './keycloakContext'; + +export function useKeycloak() { + const context = useContext(keycloakContext); + + if (!context.client) { + throw new Error('keycloak client has not been assigned to KeycloakProvider'); + } + + const { client, initialized } = context; + return { + initialized, + keycloak: client + }; +} \ No newline at end of file From a1967bbe82145449415d17c6d34567edcbfcf9e2 Mon Sep 17 00:00:00 2001 From: dudiiiiiiii Date: Tue, 5 Nov 2024 07:28:50 +0100 Subject: [PATCH 7/7] license fixes --- Credits.md | 15 +++++++++++++++ README.md | 13 ------------- src/util/keycloak/LICENSE | 21 +++++++++++++++++++++ src/util/keycloak/Readme.md | 10 +++++++--- 4 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 Credits.md create mode 100644 src/util/keycloak/LICENSE diff --git a/Credits.md b/Credits.md new file mode 100644 index 00000000..994ccc9b --- /dev/null +++ b/Credits.md @@ -0,0 +1,15 @@ +## Credits + +This project adapts source code from the following libraries: + +- CSG javascript library + - parts of its code copied into `src/ThreeEditor/js/libs/csg/` + - adapted by adding types in a separate file +- ThreeJS Editor + - most of its code is copied from [mrdoob's GitHub repo](https://github.com/mrdoob/three.js/tree/r132/editor) into `src/ThreeEditor`, starting from v.132 + - the copied code is heavily adapted to "yaptide needs" +- Keycloak-react-web + - most of its code was copied from into `src/util/keycloak` + - adapted to newer version of react and keycloak-js + +This work was partially funded by EuroHPC PL Project, Smart Growth Operational Programme 4.2 diff --git a/README.md b/README.md index fa341614..51c04d97 100644 --- a/README.md +++ b/README.md @@ -111,16 +111,3 @@ The command below will run the docker container named `ui` and serve the UI on p ```bash docker run --rm -d -p 80:80/tcp --name ui ghcr.io/yaptide/ui-web:master ``` - -## Credits - -This project adapts source code from the following libraries: - -- CSG javascript library - - parts of its code copied into `src/ThreeEditor/js/libs/csg/` - - adapted by adding types in a separate file -- ThreeJS Editor - - most of its code is copied from [mrdoob's GitHub repo](https://github.com/mrdoob/three.js/tree/r132/editor) into `src/ThreeEditor`, starting from v.132 - - the copied code is heavily adapted to "yaptide needs" - -This work was partially funded by EuroHPC PL Project, Smart Growth Operational Programme 4.2 diff --git a/src/util/keycloak/LICENSE b/src/util/keycloak/LICENSE new file mode 100644 index 00000000..219a445f --- /dev/null +++ b/src/util/keycloak/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 keycloak-react + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/util/keycloak/Readme.md b/src/util/keycloak/Readme.md index 43787ebb..e69a0519 100644 --- a/src/util/keycloak/Readme.md +++ b/src/util/keycloak/Readme.md @@ -1,4 +1,8 @@ -Files in this directory were copied from keycloak-react-web library. -This library is not supported since 2023 and because of this it's not compatible with newest official keycloak-js library. +Files in this directory were copied from keycloak-react-web library: +- npm - +- github - + +Why we copied it instead of using as dependency: +- This library is not supported since 2023 and because of this it's not compatible with newest official keycloak-js library. Compatibility issue: Keycloak object in newest keycloak-js library changed in version 26.0.0 -and is not assignable to object from older versions (keycloak-react-web uses version 19.0.2 of keycloak-js). \ No newline at end of file +and is not assignable to object from older versions (keycloak-react-web uses version 19.0.2 of keycloak-js).