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