@open-pioneer/authentication-keycloak 4.8.0 → 4.9.0-dev.20260930055642

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +84 -82
  2. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @open-pioneer/authentication-keycloak
2
2
 
3
+ ## 4.9.0-dev.20260930055642
4
+
3
5
  ## 4.8.0
4
6
 
5
7
  ### Minor Changes
@@ -62,53 +64,53 @@
62
64
 
63
65
  - f67fd7e: Support configuration of keycloak's login options and logout options.
64
66
 
65
- For example, to redirect to a different site after logout:
66
-
67
- ```ts
68
- // app.ts
69
- const element = createCustomElement({
70
- component: AppUI,
71
- appMetadata,
72
- config: {
73
- properties: {
74
- "@open-pioneer/authentication-keycloak": {
75
- keycloakOptions: {
76
- // ...
77
- keycloakLogoutOptions: {
78
- redirectUri: "https://example.com"
79
- }
80
- }
81
- } satisfies KeycloakProperties
82
- }
83
- }
84
- });
85
- ```
86
-
87
- The plugin also supports options for the `logout` method to supply dynamic logout options:
88
-
89
- ```ts
90
- // via auth service
91
- const authService = ...;
92
- authService.logout({
93
- // These are passed directly the keycloak plugin (if it is being used).
94
- pluginOptions: {
95
- redirectUri: "https://example.com",
96
- }
97
- })
98
-
99
- // via direct reference to the plugin ("authentication-keycloak.KeycloakAuthPlugin")
100
- const keycloakAuthPlugin = ...;
101
- keycloakAuthPlugin.logout({
102
- redirectUri: "https://example.com",
103
- });
104
- ```
67
+ For example, to redirect to a different site after logout:
68
+
69
+ ```ts
70
+ // app.ts
71
+ const element = createCustomElement({
72
+ component: AppUI,
73
+ appMetadata,
74
+ config: {
75
+ properties: {
76
+ "@open-pioneer/authentication-keycloak": {
77
+ keycloakOptions: {
78
+ // ...
79
+ keycloakLogoutOptions: {
80
+ redirectUri: "https://example.com",
81
+ },
82
+ },
83
+ } satisfies KeycloakProperties,
84
+ },
85
+ },
86
+ });
87
+ ```
88
+
89
+ The plugin also supports options for the `logout` method to supply dynamic logout options:
90
+
91
+ ```ts
92
+ // via auth service
93
+ const authService = ...;
94
+ authService.logout({
95
+ // These are passed directly the keycloak plugin (if it is being used).
96
+ pluginOptions: {
97
+ redirectUri: "https://example.com",
98
+ }
99
+ })
100
+
101
+ // via direct reference to the plugin ("authentication-keycloak.KeycloakAuthPlugin")
102
+ const keycloakAuthPlugin = ...;
103
+ keycloakAuthPlugin.logout({
104
+ redirectUri: "https://example.com",
105
+ });
106
+ ```
105
107
 
106
108
  - f67fd7e: Make `RefreshOptions` optional with sensible default values. The default values have been changed to:
107
- - `autoRefresh`: true
108
- - `interval` (for token lifetime checks): 10 seconds
109
- - `timeLeft`: 60 seconds (minimum required lifetime during token validity checks)
109
+ - `autoRefresh`: true
110
+ - `interval` (for token lifetime checks): 10 seconds
111
+ - `timeLeft`: 60 seconds (minimum required lifetime during token validity checks)
110
112
 
111
- These values are used when they are not explicitly configured using package properties.
113
+ These values are used when they are not explicitly configured using package properties.
112
114
 
113
115
  ### Patch Changes
114
116
 
@@ -132,13 +134,13 @@
132
134
  ### Major Changes
133
135
 
134
136
  - 9477e54: Update dependencies
135
- - React 19
136
- - Vite 6
137
- - FormatJS 3
138
- - Open Pioneer Build Tools
139
- - ...
137
+ - React 19
138
+ - Vite 6
139
+ - FormatJS 3
140
+ - Open Pioneer Build Tools
141
+ - ...
140
142
 
141
- For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
143
+ For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
142
144
 
143
145
  ## 2.4.0
144
146
 
@@ -146,39 +148,39 @@
146
148
 
147
149
  - 1ce5f11: Replace change events for auth state with signals from Reactivity API
148
150
 
149
- Example: watch for updates of the auth state
150
-
151
- ```typescript
152
- const myAuthService = ...
153
- watch(
154
- () => [myAuthService.getAuthState()],
155
- ([state]) => {
156
- console.log(state);
157
- },
158
- {
159
- immediate: true
160
- }
161
- );
162
- ```
163
-
164
- The Auth Service forwards the auth state from the underlying AuthPlugin.
165
- Therefore, the plugin implementation must use reactive signals when its auth state changes in order to signal changes to the service.
166
-
167
- ```typescript
168
- class DummyPlugin implements AuthPlugin {
169
- #state = reactive<AuthState>({
170
- kind: "not-authenticated"
171
- });
172
-
173
- getAuthState(): AuthState {
174
- return this.#state.value;
175
- }
176
-
177
- $setAuthState(newState: AuthState) {
178
- this.#state.value = newState;
179
- }
151
+ Example: watch for updates of the auth state
152
+
153
+ ```typescript
154
+ const myAuthService = ...
155
+ watch(
156
+ () => [myAuthService.getAuthState()],
157
+ ([state]) => {
158
+ console.log(state);
159
+ },
160
+ {
161
+ immediate: true
162
+ }
163
+ );
164
+ ```
165
+
166
+ The Auth Service forwards the auth state from the underlying AuthPlugin.
167
+ Therefore, the plugin implementation must use reactive signals when its auth state changes in order to signal changes to the service.
168
+
169
+ ```typescript
170
+ class DummyPlugin implements AuthPlugin {
171
+ #state = reactive<AuthState>({
172
+ kind: "not-authenticated",
173
+ });
174
+
175
+ getAuthState(): AuthState {
176
+ return this.#state.value;
177
+ }
178
+
179
+ $setAuthState(newState: AuthState) {
180
+ this.#state.value = newState;
180
181
  }
181
- ```
182
+ }
183
+ ```
182
184
 
183
185
  ### Patch Changes
184
186
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/authentication-keycloak",
4
- "version": "4.8.0",
4
+ "version": "4.9.0-dev.20260930055642",
5
5
  "description": "Implements authentication against Keycloak servers.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@conterra/reactivity-core": "^0.8.8",
18
- "@open-pioneer/authentication": "4.8.0",
19
- "@open-pioneer/core": "4.8.0",
20
- "@open-pioneer/notifier": "4.8.0",
21
- "@open-pioneer/runtime": "4.8.0",
18
+ "@open-pioneer/authentication": "4.9.0-dev.20260930055642",
19
+ "@open-pioneer/core": "4.9.0-dev.20260930055642",
20
+ "@open-pioneer/notifier": "4.9.0-dev.20260930055642",
21
+ "@open-pioneer/runtime": "4.9.0-dev.20260930055642",
22
22
  "keycloak-js": "^26.2.4"
23
23
  },
24
24
  "publishConfig": {