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