@open-pioneer/authentication-keycloak 4.9.0 → 4.10.0-dev.20261119090001
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 +91 -84
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
# @open-pioneer/authentication-keycloak
|
|
2
2
|
|
|
3
|
+
## 4.10.0-dev.20261119090001
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 57b5b4f: Enable trusted publishing for this package.
|
|
8
|
+
- 93d2a9f: Update dependencies
|
|
9
|
+
|
|
3
10
|
## 4.9.0
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
6
13
|
|
|
7
14
|
- 6b160f3: A few minor fixes while cleaning up the code:
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
- The plugin reads the notification texts from `currentIntl`, so it no longer triggers the `ServiceOptions.intl` deprecation warning.
|
|
16
|
+
- The plugin no longer starts the token refresh timer or shows a notification when the service was destroyed while `keycloak.init()` was still pending.
|
|
10
17
|
|
|
11
18
|
- 42ca366: Update dependencies
|
|
12
19
|
|
|
@@ -72,53 +79,53 @@
|
|
|
72
79
|
|
|
73
80
|
- f67fd7e: Support configuration of keycloak's login options and logout options.
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
82
|
+
For example, to redirect to a different site after logout:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
// app.ts
|
|
86
|
+
const element = createCustomElement({
|
|
87
|
+
component: AppUI,
|
|
88
|
+
appMetadata,
|
|
89
|
+
config: {
|
|
90
|
+
properties: {
|
|
91
|
+
"@open-pioneer/authentication-keycloak": {
|
|
92
|
+
keycloakOptions: {
|
|
93
|
+
// ...
|
|
94
|
+
keycloakLogoutOptions: {
|
|
95
|
+
redirectUri: "https://example.com",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
} satisfies KeycloakProperties,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The plugin also supports options for the `logout` method to supply dynamic logout options:
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
// via auth service
|
|
108
|
+
const authService = ...;
|
|
109
|
+
authService.logout({
|
|
110
|
+
// These are passed directly the keycloak plugin (if it is being used).
|
|
111
|
+
pluginOptions: {
|
|
112
|
+
redirectUri: "https://example.com",
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
// via direct reference to the plugin ("authentication-keycloak.KeycloakAuthPlugin")
|
|
117
|
+
const keycloakAuthPlugin = ...;
|
|
118
|
+
keycloakAuthPlugin.logout({
|
|
119
|
+
redirectUri: "https://example.com",
|
|
120
|
+
});
|
|
121
|
+
```
|
|
115
122
|
|
|
116
123
|
- f67fd7e: Make `RefreshOptions` optional with sensible default values. The default values have been changed to:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
- `autoRefresh`: true
|
|
125
|
+
- `interval` (for token lifetime checks): 10 seconds
|
|
126
|
+
- `timeLeft`: 60 seconds (minimum required lifetime during token validity checks)
|
|
120
127
|
|
|
121
|
-
|
|
128
|
+
These values are used when they are not explicitly configured using package properties.
|
|
122
129
|
|
|
123
130
|
### Patch Changes
|
|
124
131
|
|
|
@@ -142,13 +149,13 @@
|
|
|
142
149
|
### Major Changes
|
|
143
150
|
|
|
144
151
|
- 9477e54: Update dependencies
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
- React 19
|
|
153
|
+
- Vite 6
|
|
154
|
+
- FormatJS 3
|
|
155
|
+
- Open Pioneer Build Tools
|
|
156
|
+
- ...
|
|
150
157
|
|
|
151
|
-
|
|
158
|
+
For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
|
|
152
159
|
|
|
153
160
|
## 2.4.0
|
|
154
161
|
|
|
@@ -156,39 +163,39 @@
|
|
|
156
163
|
|
|
157
164
|
- 1ce5f11: Replace change events for auth state with signals from Reactivity API
|
|
158
165
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
166
|
+
Example: watch for updates of the auth state
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
const myAuthService = ...
|
|
170
|
+
watch(
|
|
171
|
+
() => [myAuthService.getAuthState()],
|
|
172
|
+
([state]) => {
|
|
173
|
+
console.log(state);
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
immediate: true
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
The Auth Service forwards the auth state from the underlying AuthPlugin.
|
|
182
|
+
Therefore, the plugin implementation must use reactive signals when its auth state changes in order to signal changes to the service.
|
|
183
|
+
|
|
184
|
+
```typescript
|
|
185
|
+
class DummyPlugin implements AuthPlugin {
|
|
186
|
+
#state = reactive<AuthState>({
|
|
187
|
+
kind: "not-authenticated",
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
getAuthState(): AuthState {
|
|
191
|
+
return this.#state.value;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
$setAuthState(newState: AuthState) {
|
|
195
|
+
this.#state.value = newState;
|
|
190
196
|
}
|
|
191
|
-
|
|
197
|
+
}
|
|
198
|
+
```
|
|
192
199
|
|
|
193
200
|
### Patch Changes
|
|
194
201
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/authentication-keycloak",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.10.0-dev.20261119090001",
|
|
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.8.9",
|
|
18
|
-
"@open-pioneer/authentication": "4.
|
|
19
|
-
"@open-pioneer/core": "4.
|
|
20
|
-
"@open-pioneer/notifier": "4.
|
|
21
|
-
"@open-pioneer/runtime": "4.
|
|
22
|
-
"keycloak-js": "^26.2.
|
|
18
|
+
"@open-pioneer/authentication": "4.10.0-dev.20261119090001",
|
|
19
|
+
"@open-pioneer/core": "4.10.0-dev.20261119090001",
|
|
20
|
+
"@open-pioneer/notifier": "4.10.0-dev.20261119090001",
|
|
21
|
+
"@open-pioneer/runtime": "4.10.0-dev.20261119090001",
|
|
22
|
+
"keycloak-js": "^26.2.5"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"directory": "dist",
|