@open-pioneer/authentication-keycloak 2.4.0 → 3.0.0-dev.20250221111321

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/CHANGELOG.md CHANGED
@@ -1,10 +1,32 @@
1
1
  # @open-pioneer/authentication-keycloak
2
2
 
3
+ ## 3.0.0-dev.20250221111321
4
+
5
+ ### Major Changes
6
+
7
+ - 9477e54: Update dependencies
8
+
9
+ - React 19
10
+ - Vite 6
11
+ - FormatJS 3
12
+ - Open Pioneer Build Tools
13
+ - ...
14
+
15
+ For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [9477e54]
20
+ - @open-pioneer/authentication@3.0.0-dev.20250221111321
21
+ - @open-pioneer/core@3.0.0-dev.20250221111321
22
+ - @open-pioneer/notifier@3.0.0-dev.20250221111321
23
+ - @open-pioneer/runtime@3.0.0-dev.20250221111321
24
+
3
25
  ## 2.4.0
4
26
 
5
27
  ### Minor Changes
6
28
 
7
- - 1ce5f11: Replace change events for auth state with signals from Reactivity API
29
+ - 1ce5f11: Replace change events for auth state with signals from Reactivity API
8
30
 
9
31
  Example: watch for updates of the auth state
10
32
 
@@ -42,98 +64,98 @@
42
64
 
43
65
  ### Patch Changes
44
66
 
45
- - 1b63ebe: Update dependencies
46
- - Updated dependencies [1ce5f11]
47
- - Updated dependencies [1b63ebe]
48
- - Updated dependencies [e3802fb]
49
- - Updated dependencies [e4ba048]
50
- - Updated dependencies [ac39468]
51
- - Updated dependencies [e3802fb]
52
- - @open-pioneer/authentication@2.4.0
53
- - @open-pioneer/core@2.4.0
54
- - @open-pioneer/notifier@2.4.0
55
- - @open-pioneer/runtime@2.4.0
67
+ - 1b63ebe: Update dependencies
68
+ - Updated dependencies [1ce5f11]
69
+ - Updated dependencies [1b63ebe]
70
+ - Updated dependencies [e3802fb]
71
+ - Updated dependencies [e4ba048]
72
+ - Updated dependencies [ac39468]
73
+ - Updated dependencies [e3802fb]
74
+ - @open-pioneer/authentication@2.4.0
75
+ - @open-pioneer/core@2.4.0
76
+ - @open-pioneer/notifier@2.4.0
77
+ - @open-pioneer/runtime@2.4.0
56
78
 
57
79
  ## 2.3.0
58
80
 
59
81
  ### Minor Changes
60
82
 
61
- - 2fbaaa0: Use normal `dependencies` instead of `peerDependencies`. Peer dependencies have some usability issues (and bugs) when used at scale.
83
+ - 2fbaaa0: Use normal `dependencies` instead of `peerDependencies`. Peer dependencies have some usability issues (and bugs) when used at scale.
62
84
 
63
85
  ### Patch Changes
64
86
 
65
- - Updated dependencies [2fbaaa0]
66
- - @open-pioneer/authentication@2.3.0
67
- - @open-pioneer/notifier@2.3.0
68
- - @open-pioneer/runtime@2.3.0
69
- - @open-pioneer/core@2.3.0
87
+ - Updated dependencies [2fbaaa0]
88
+ - @open-pioneer/authentication@2.3.0
89
+ - @open-pioneer/notifier@2.3.0
90
+ - @open-pioneer/runtime@2.3.0
91
+ - @open-pioneer/core@2.3.0
70
92
 
71
93
  ## 2.2.0
72
94
 
73
95
  ### Patch Changes
74
96
 
75
- - 41f0c6f: Use error state to communicate keycloak exceptions
76
- - 39dad46: Switch to a new versioning strategy.
77
- From now on, packages released by this repository share a common version number.
78
- - Updated dependencies [41f0c6f]
79
- - Updated dependencies [39dad46]
80
- - @open-pioneer/authentication@2.2.0
81
- - @open-pioneer/core@2.2.0
82
- - @open-pioneer/notifier@2.2.0
83
- - @open-pioneer/runtime@2.2.0
97
+ - 41f0c6f: Use error state to communicate keycloak exceptions
98
+ - 39dad46: Switch to a new versioning strategy.
99
+ From now on, packages released by this repository share a common version number.
100
+ - Updated dependencies [41f0c6f]
101
+ - Updated dependencies [39dad46]
102
+ - @open-pioneer/authentication@2.2.0
103
+ - @open-pioneer/core@2.2.0
104
+ - @open-pioneer/notifier@2.2.0
105
+ - @open-pioneer/runtime@2.2.0
84
106
 
85
107
  ## 0.2.0
86
108
 
87
109
  ### Minor Changes
88
110
 
89
- - f48bb02: Update Keycloak JavaScript adapter to v25.
111
+ - f48bb02: Update Keycloak JavaScript adapter to v25.
90
112
 
91
113
  ### Patch Changes
92
114
 
93
- - 5c62522: Update wording and harmonize structure
94
- - e0b2fae: Update dependencies
95
- - f48bb02: Refactor: use reactivity API internally to maintain the current state.
96
- - Updated dependencies [5c62522]
97
- - Updated dependencies [58ce24f]
98
- - Updated dependencies [50550d3]
99
- - Updated dependencies [e0b2fae]
100
- - Updated dependencies [6cc7fcd]
101
- - @open-pioneer/authentication@0.3.6
102
- - @open-pioneer/notifier@0.3.6
103
- - @open-pioneer/core@1.3.0
104
- - @open-pioneer/runtime@2.1.7
115
+ - 5c62522: Update wording and harmonize structure
116
+ - e0b2fae: Update dependencies
117
+ - f48bb02: Refactor: use reactivity API internally to maintain the current state.
118
+ - Updated dependencies [5c62522]
119
+ - Updated dependencies [58ce24f]
120
+ - Updated dependencies [50550d3]
121
+ - Updated dependencies [e0b2fae]
122
+ - Updated dependencies [6cc7fcd]
123
+ - @open-pioneer/authentication@0.3.6
124
+ - @open-pioneer/notifier@0.3.6
125
+ - @open-pioneer/core@1.3.0
126
+ - @open-pioneer/runtime@2.1.7
105
127
 
106
128
  ## 0.1.2
107
129
 
108
130
  ### Patch Changes
109
131
 
110
- - Updated dependencies [e945264]
111
- - @open-pioneer/runtime@2.1.6
112
- - @open-pioneer/notifier@0.3.5
113
- - @open-pioneer/authentication@0.3.5
132
+ - Updated dependencies [e945264]
133
+ - @open-pioneer/runtime@2.1.6
134
+ - @open-pioneer/notifier@0.3.5
135
+ - @open-pioneer/authentication@0.3.5
114
136
 
115
137
  ## 0.1.1
116
138
 
117
139
  ### Patch Changes
118
140
 
119
- - Updated dependencies [90d0cce]
120
- - Updated dependencies [90d0cce]
121
- - @open-pioneer/runtime@2.1.5
122
- - @open-pioneer/authentication@0.3.4
123
- - @open-pioneer/notifier@0.3.4
141
+ - Updated dependencies [90d0cce]
142
+ - Updated dependencies [90d0cce]
143
+ - @open-pioneer/runtime@2.1.5
144
+ - @open-pioneer/authentication@0.3.4
145
+ - @open-pioneer/notifier@0.3.4
124
146
 
125
147
  ## 0.1.0
126
148
 
127
149
  ### Minor Changes
128
150
 
129
- - 1b69137: Initial release
151
+ - 1b69137: Initial release
130
152
 
131
153
  ### Patch Changes
132
154
 
133
- - Updated dependencies [5d3aafd]
134
- - Updated dependencies [64645aa]
135
- - Updated dependencies [b3c60f2]
136
- - @open-pioneer/core@1.2.3
137
- - @open-pioneer/authentication@0.3.3
138
- - @open-pioneer/notifier@0.3.3
139
- - @open-pioneer/runtime@2.1.4
155
+ - Updated dependencies [5d3aafd]
156
+ - Updated dependencies [64645aa]
157
+ - Updated dependencies [b3c60f2]
158
+ - @open-pioneer/core@1.2.3
159
+ - @open-pioneer/authentication@0.3.3
160
+ - @open-pioneer/notifier@0.3.3
161
+ - @open-pioneer/runtime@2.1.4
@@ -1 +1 @@
1
- {"version":3,"file":"KeycloakAuthPlugin.js","sources":["KeycloakAuthPlugin.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { reactive } from \"@conterra/reactivity-core\";\nimport { AuthPlugin, AuthState, LoginBehavior } from \"@open-pioneer/authentication\";\nimport { Resource, createLogger, destroyResource } from \"@open-pioneer/core\";\nimport { NotificationService } from \"@open-pioneer/notifier\";\nimport {\n PackageIntl,\n Service,\n ServiceOptions,\n type DECLARE_SERVICE_INTERFACE\n} from \"@open-pioneer/runtime\";\nimport Keycloak, {\n type KeycloakConfig,\n type KeycloakInitOptions,\n type KeycloakLoginOptions,\n type KeycloakLogoutOptions\n} from \"keycloak-js\";\nimport { KeycloakOptions, KeycloakProperties, RefreshOptions } from \"./api\";\n\nconst LOG = createLogger(\"authentication-keycloak:KeycloakAuthPlugin\");\n\ninterface References {\n notifier: NotificationService;\n}\n\nexport class KeycloakAuthPlugin implements Service, AuthPlugin {\n declare [DECLARE_SERVICE_INTERFACE]: \"authentication-keycloak.KeycloakAuthPlugin\";\n\n #notifier: NotificationService;\n #intl: PackageIntl;\n #keycloakOptions: KeycloakOptions;\n #keycloak: Keycloak;\n #logoutOptions: KeycloakLogoutOptions;\n #loginOptions: KeycloakLoginOptions;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n #timerId: any;\n #watcher: Resource | undefined;\n\n #state = reactive<AuthState>({\n kind: \"pending\"\n });\n\n constructor(options: ServiceOptions<References>) {\n this.#notifier = options.references.notifier;\n this.#intl = options.intl;\n this.#logoutOptions = { redirectUri: undefined };\n this.#loginOptions = { redirectUri: undefined };\n\n try {\n this.#keycloakOptions = getKeycloakConfig(options.properties);\n } catch (e) {\n throw new Error(\"Invalid keycloak configuration\", { cause: e });\n }\n\n try {\n this.#keycloak = new Keycloak(this.#keycloakOptions.keycloakConfig);\n } catch (e) {\n throw new Error(\"Failed to construct keycloak instance\", { cause: e });\n }\n this.#init().catch((e) => {\n this.#updateState({\n kind: \"error\",\n error: e\n });\n this.#notifier.notify({\n level: \"error\",\n title: this.#intl.formatMessage({\n id: \"loginFailed.title\"\n }),\n message: this.#intl.formatMessage({\n id: \"loginFailed.message\"\n })\n });\n\n LOG.error(\"Failed to check if user is authenticated\", e);\n });\n }\n\n destroy() {\n clearInterval(this.#timerId);\n this.#watcher = destroyResource(this.#watcher);\n this.#timerId = undefined;\n }\n\n getAuthState(): AuthState {\n return this.#state.value;\n }\n\n getLoginBehavior(): LoginBehavior {\n const doLogin = () => {\n LOG.debug(\"Login with options\", this.#loginOptions);\n this.#keycloak.login(this.#loginOptions);\n };\n return {\n kind: \"effect\",\n login: doLogin\n };\n }\n\n logout() {\n LOG.debug(\"Logout with options\", this.#logoutOptions);\n this.#keycloak.logout(this.#logoutOptions);\n }\n\n async #init() {\n const keycloakOptions = this.#keycloakOptions;\n const initOptions = this.#keycloakOptions.keycloakInitOptions;\n const refreshOptions = keycloakOptions.refreshOptions;\n\n let isAuthenticated: boolean;\n try {\n isAuthenticated = await this.#keycloak.init(initOptions);\n } catch (e) {\n // Note: keycloak.init() can also throw an exception, in addition to a rejected promise.\n // It may also just throw a string..\n const error = typeof e === \"string\" ? new Error(e) : e;\n throw new Error(\"Failed to initialize keycloak session\", { cause: error });\n }\n\n if (isAuthenticated) {\n this.#updateState({\n kind: \"authenticated\",\n sessionInfo: {\n userId: this.#keycloak.subject ? this.#keycloak.subject : \"undefined\",\n userName: this.#keycloak.idTokenParsed?.preferred_username,\n attributes: {\n keycloak: this.#keycloak,\n familyName: this.#keycloak.idTokenParsed?.family_name,\n givenName: this.#keycloak.idTokenParsed?.given_name,\n userName: this.#keycloak.idTokenParsed?.preferred_username\n }\n }\n });\n\n LOG.debug(`User ${this.#keycloak.subject} is authenticated`);\n\n if (refreshOptions.autoRefresh) {\n LOG.debug(\"Starting auto-refresh\", refreshOptions);\n this.__refresh(refreshOptions.interval, refreshOptions.timeLeft);\n }\n } else {\n this.#updateState({\n kind: \"not-authenticated\"\n });\n LOG.debug(\"User is not authenticated\");\n }\n }\n\n // Mocked in test\n private __refresh(interval: number, timeLeft: number) {\n clearInterval(this.#timerId);\n this.#timerId = setInterval(() => {\n this.#keycloak.updateToken(timeLeft).catch((e) => {\n LOG.error(\"Failed to refresh token\", e);\n this.#updateState({\n kind: \"not-authenticated\"\n });\n this.destroy();\n });\n }, interval);\n }\n\n #updateState(newState: AuthState) {\n this.#state.value = newState;\n }\n}\n\nconst DEFAULT_AUTO_REFRESH_OPT = {\n autoRefresh: true,\n interval: 6000,\n timeLeft: 70\n};\n\nconst DEFAULT_INIT_OPT = {\n onLoad: \"check-sso\",\n pkceMethod: \"S256\"\n};\n\nexport function getKeycloakConfig(properties: Partial<KeycloakProperties>): KeycloakOptions {\n const { keycloakOptions } = properties;\n\n const { refreshOptions, keycloakInitOptions, keycloakConfig } = keycloakOptions!;\n\n return {\n refreshOptions: { ...getRefreshOpt(refreshOptions) },\n keycloakInitOptions: { ...getInitOpt(keycloakInitOptions) },\n keycloakConfig: { ...getConfigOpt(keycloakConfig) }\n };\n}\n\nfunction getRefreshOpt(autoRefreshOptions: RefreshOptions | undefined): RefreshOptions {\n if (!autoRefreshOptions || isObjectEmpty(autoRefreshOptions)) {\n LOG.warn(\n `The autorefresh options of the Keycloak configuration should be set to ensure automatic refreshes at specified intervals.` +\n ` Defaulting to '${DEFAULT_AUTO_REFRESH_OPT}'.`\n );\n return Object.assign({}, { ...DEFAULT_AUTO_REFRESH_OPT });\n }\n return autoRefreshOptions;\n}\n\nfunction getInitOpt(keycloakInitOptions: KeycloakInitOptions | undefined): KeycloakInitOptions {\n if (!keycloakInitOptions || isObjectEmpty(keycloakInitOptions)) {\n LOG.warn(\n `The Keycloak init options of the keycloak configuration should be set.` +\n ` Defaulting to '${DEFAULT_INIT_OPT}'.`\n );\n return Object.assign({}, { ...DEFAULT_INIT_OPT }) as KeycloakInitOptions;\n }\n return keycloakInitOptions;\n}\n\nfunction getConfigOpt(keycloakConfig: KeycloakConfig | undefined): KeycloakConfig {\n if (!keycloakConfig || isObjectEmpty(keycloakConfig)) {\n throw new Error(\n `KeycloakConfig not found: The Keycloak configuration options are required by the plugin to perform login and logout operations`\n );\n }\n return keycloakConfig;\n}\n\nconst isObjectEmpty = (objectName: unknown) => {\n return objectName && Object.keys(objectName).length === 0 && objectName.constructor === Object;\n};\n"],"names":[],"mappings":";;;;AAoBA,MAAM,GAAA,GAAM,aAAa,4CAA4C,CAAA,CAAA;AAM9D,MAAM,kBAAkD,CAAA;AAAA,EAG3D,SAAA,CAAA;AAAA,EACA,KAAA,CAAA;AAAA,EACA,gBAAA,CAAA;AAAA,EACA,SAAA,CAAA;AAAA,EACA,cAAA,CAAA;AAAA,EACA,aAAA,CAAA;AAAA;AAAA,EAEA,QAAA,CAAA;AAAA,EACA,QAAA,CAAA;AAAA,EAEA,SAAS,QAAoB,CAAA;AAAA,IACzB,IAAM,EAAA,SAAA;AAAA,GACT,CAAA,CAAA;AAAA,EAED,YAAY,OAAqC,EAAA;AAC7C,IAAK,IAAA,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uthPlugin.js","sources":["KeycloakAuthPlugin.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { reactive } from \"@conterra/reactivity-core\";\nimport { AuthPlugin, AuthState, LoginBehavior } from \"@open-pioneer/authentication\";\nimport { Resource, createLogger, destroyResource } from \"@open-pioneer/core\";\nimport { NotificationService } from \"@open-pioneer/notifier\";\nimport {\n PackageIntl,\n Service,\n ServiceOptions,\n type DECLARE_SERVICE_INTERFACE\n} from \"@open-pioneer/runtime\";\nimport Keycloak, {\n type KeycloakConfig,\n type KeycloakInitOptions,\n type KeycloakLoginOptions,\n type KeycloakLogoutOptions\n} from \"keycloak-js\";\nimport { KeycloakOptions, KeycloakProperties, RefreshOptions } from \"./api\";\n\nconst LOG = createLogger(\"authentication-keycloak:KeycloakAuthPlugin\");\n\ninterface References {\n notifier: NotificationService;\n}\n\nexport class KeycloakAuthPlugin implements Service, AuthPlugin {\n declare [DECLARE_SERVICE_INTERFACE]: \"authentication-keycloak.KeycloakAuthPlugin\";\n\n #notifier: NotificationService;\n #intl: PackageIntl;\n #keycloakOptions: KeycloakOptions;\n #keycloak: Keycloak;\n #logoutOptions: KeycloakLogoutOptions;\n #loginOptions: KeycloakLoginOptions;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n #timerId: any;\n #watcher: Resource | undefined;\n\n #state = reactive<AuthState>({\n kind: \"pending\"\n });\n\n constructor(options: ServiceOptions<References>) {\n this.#notifier = options.references.notifier;\n this.#intl = options.intl;\n this.#logoutOptions = { redirectUri: undefined };\n this.#loginOptions = { redirectUri: undefined };\n\n try {\n this.#keycloakOptions = getKeycloakConfig(options.properties);\n } catch (e) {\n throw new Error(\"Invalid keycloak configuration\", { cause: e });\n }\n\n try {\n this.#keycloak = new Keycloak(this.#keycloakOptions.keycloakConfig);\n } catch (e) {\n throw new Error(\"Failed to construct keycloak instance\", { cause: e });\n }\n this.#init().catch((e) => {\n this.#updateState({\n kind: \"error\",\n error: e\n });\n this.#notifier.notify({\n level: \"error\",\n title: this.#intl.formatMessage({\n id: \"loginFailed.title\"\n }),\n message: this.#intl.formatMessage({\n id: \"loginFailed.message\"\n })\n });\n\n LOG.error(\"Failed to check if user is authenticated\", e);\n });\n }\n\n destroy() {\n clearInterval(this.#timerId);\n this.#watcher = destroyResource(this.#watcher);\n this.#timerId = undefined;\n }\n\n getAuthState(): AuthState {\n return this.#state.value;\n }\n\n getLoginBehavior(): LoginBehavior {\n const doLogin = () => {\n LOG.debug(\"Login with options\", this.#loginOptions);\n this.#keycloak.login(this.#loginOptions);\n };\n return {\n kind: \"effect\",\n login: doLogin\n };\n }\n\n logout() {\n LOG.debug(\"Logout with options\", this.#logoutOptions);\n this.#keycloak.logout(this.#logoutOptions);\n }\n\n async #init() {\n const keycloakOptions = this.#keycloakOptions;\n const initOptions = this.#keycloakOptions.keycloakInitOptions;\n const refreshOptions = keycloakOptions.refreshOptions;\n\n let isAuthenticated: boolean;\n try {\n isAuthenticated = await this.#keycloak.init(initOptions);\n } catch (e) {\n // Note: keycloak.init() can also throw an exception, in addition to a rejected promise.\n // It may also just throw a string..\n const error = typeof e === \"string\" ? new Error(e) : e;\n throw new Error(\"Failed to initialize keycloak session\", { cause: error });\n }\n\n if (isAuthenticated) {\n this.#updateState({\n kind: \"authenticated\",\n sessionInfo: {\n userId: this.#keycloak.subject ? this.#keycloak.subject : \"undefined\",\n userName: this.#keycloak.idTokenParsed?.preferred_username,\n attributes: {\n keycloak: this.#keycloak,\n familyName: this.#keycloak.idTokenParsed?.family_name,\n givenName: this.#keycloak.idTokenParsed?.given_name,\n userName: this.#keycloak.idTokenParsed?.preferred_username\n }\n }\n });\n\n LOG.debug(`User ${this.#keycloak.subject} is authenticated`);\n\n if (refreshOptions.autoRefresh) {\n LOG.debug(\"Starting auto-refresh\", refreshOptions);\n this.__refresh(refreshOptions.interval, refreshOptions.timeLeft);\n }\n } else {\n this.#updateState({\n kind: \"not-authenticated\"\n });\n LOG.debug(\"User is not authenticated\");\n }\n }\n\n // Mocked in test\n private __refresh(interval: number, timeLeft: number) {\n clearInterval(this.#timerId);\n this.#timerId = setInterval(() => {\n this.#keycloak.updateToken(timeLeft).catch((e) => {\n LOG.error(\"Failed to refresh token\", e);\n this.#updateState({\n kind: \"not-authenticated\"\n });\n this.destroy();\n });\n }, interval);\n }\n\n #updateState(newState: AuthState) {\n this.#state.value = newState;\n }\n}\n\nconst DEFAULT_AUTO_REFRESH_OPT = {\n autoRefresh: true,\n interval: 6000,\n timeLeft: 70\n};\n\nconst DEFAULT_INIT_OPT = {\n onLoad: \"check-sso\",\n pkceMethod: \"S256\"\n};\n\nexport function getKeycloakConfig(properties: Partial<KeycloakProperties>): KeycloakOptions {\n const { keycloakOptions } = properties;\n\n const { refreshOptions, keycloakInitOptions, keycloakConfig } = keycloakOptions!;\n\n return {\n refreshOptions: { ...getRefreshOpt(refreshOptions) },\n keycloakInitOptions: { ...getInitOpt(keycloakInitOptions) },\n keycloakConfig: { ...getConfigOpt(keycloakConfig) }\n };\n}\n\nfunction getRefreshOpt(autoRefreshOptions: RefreshOptions | undefined): RefreshOptions {\n if (!autoRefreshOptions || isObjectEmpty(autoRefreshOptions)) {\n LOG.warn(\n `The autorefresh options of the Keycloak configuration should be set to ensure automatic refreshes at specified intervals.` +\n ` Defaulting to '${DEFAULT_AUTO_REFRESH_OPT}'.`\n );\n return Object.assign({}, { ...DEFAULT_AUTO_REFRESH_OPT });\n }\n return autoRefreshOptions;\n}\n\nfunction getInitOpt(keycloakInitOptions: KeycloakInitOptions | undefined): KeycloakInitOptions {\n if (!keycloakInitOptions || isObjectEmpty(keycloakInitOptions)) {\n LOG.warn(\n `The Keycloak init options of the keycloak configuration should be set.` +\n ` Defaulting to '${DEFAULT_INIT_OPT}'.`\n );\n return Object.assign({}, { ...DEFAULT_INIT_OPT }) as KeycloakInitOptions;\n }\n return keycloakInitOptions;\n}\n\nfunction getConfigOpt(keycloakConfig: KeycloakConfig | undefined): KeycloakConfig {\n if (!keycloakConfig || isObjectEmpty(keycloakConfig)) {\n throw new Error(\n `KeycloakConfig not found: The Keycloak configuration options are required by the plugin to perform login and logout operations`\n );\n }\n return keycloakConfig;\n}\n\nconst isObjectEmpty = (objectName: unknown) => {\n return objectName && Object.keys(objectName).length === 0 && objectName.constructor === Object;\n};\n"],"names":[],"mappings":";;;;AAoBA,MAAM,GAAA,GAAM,aAAa,4CAA4C,CAAA;AAM9D,MAAM,kBAAkD,CAAA;AAAA,EAG3D,SAAA;AAAA,EACA,KAAA;AAAA,EACA,gBAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA;AAAA,EAEA,QAAA;AAAA,EACA,QAAA;AAAA,EAEA,SAAS,QAAoB,CAAA;AAAA,IACzB,IAAM,EAAA;AAAA,GACT,CAAA;AAAA,EAED,YAAY,OAAqC,EAAA;AAC7C,IAAK,IAAA,CAAA,SAAA,GAAY,QAAQ,UAAW,CAAA,QAAA;AACpC,IAAA,IAAA,CAAK,QAAQ,OAAQ,CAAA,IAAA;AACrB,IAAK,IAAA,CAAA,cAAA,GAAiB,EAAE,WAAA,EAAa,MAAU,EAAA;AAC/C,IAAK,IAAA,CAAA,aAAA,GAAgB,EAAE,WAAA,EAAa,MAAU,EAAA;AAE9C,IAAI,IAAA;AACA,MAAK,IAAA,CAAA,gBAAA,GAAmB,iBAAkB,CAAA,OAAA,CAAQ,UAAU,CAAA;AAAA,aACvD,CAAG,EAAA;AACR,MAAA,MAAM,IAAI,KAAM,CAAA,gCAAA,EAAkC,EAAE,KAAA,EAAO,GAAG,CAAA;AAAA;AAGlE,IAAI,IAAA;AACA,MAAA,IAAA,CAAK,SAAY,GAAA,IAAI,QAAS,CAAA,IAAA,CAAK,iBAAiB,cAAc,CAAA;AAAA,aAC7D,CAAG,EAAA;AACR,MAAA,MAAM,IAAI,KAAM,CAAA,uCAAA,EAAyC,EAAE,KAAA,EAAO,GAAG,CAA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HANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/authentication-keycloak",
4
- "version": "2.4.0",
4
+ "version": "3.0.0-dev.20250221111321",
5
5
  "description": "Implements authentication against Keycloak servers.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -15,11 +15,11 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@conterra/reactivity-core": "^0.4.3",
18
- "keycloak-js": "^25.0.2",
19
- "@open-pioneer/authentication": "^2.4.0",
20
- "@open-pioneer/runtime": "^2.4.0",
21
- "@open-pioneer/core": "^2.4.0",
22
- "@open-pioneer/notifier": "^2.4.0"
18
+ "keycloak-js": "^26.0.2",
19
+ "@open-pioneer/authentication": "^3.0.0-dev.20250221111321",
20
+ "@open-pioneer/runtime": "^3.0.0-dev.20250221111321",
21
+ "@open-pioneer/core": "^3.0.0-dev.20250221111321",
22
+ "@open-pioneer/notifier": "^3.0.0-dev.20250221111321"
23
23
  },
24
24
  "exports": {
25
25
  "./package.json": "./package.json",