keycloak-angular 8.3.0 → 8.4.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/README.md +18 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
- [Example project](#example-project)
|
|
21
21
|
- [AuthGuard](#authguard)
|
|
22
22
|
- [HttpClient Interceptor](#httpclient-interceptor)
|
|
23
|
+
- [Keycloak-js Events](#keycloak-js-events)
|
|
23
24
|
- [Contributors](#contributors)
|
|
24
25
|
- [License](#license)
|
|
25
26
|
|
|
@@ -52,7 +53,7 @@ Note that `keycloak-js` is a peer dependency of Keycloak Angular. This change al
|
|
|
52
53
|
|
|
53
54
|
| Angular | keycloak-angular | keycloak-js | Support |
|
|
54
55
|
| :---------: | :--------------: | :-----------------------: | :-----------------: |
|
|
55
|
-
| 11.x - 12.x | 8.
|
|
56
|
+
| 11.x - 12.x | 8.4.x | 10 - 15 | Bugs / New Features |
|
|
56
57
|
| 10.x | 8.x.x | 10 - 11 | Bugs |
|
|
57
58
|
| 9.x | 7.3.x | 3.4.3 - 10 (excluding v7) | Bugs |
|
|
58
59
|
|
|
@@ -199,6 +200,22 @@ await keycloak.init({
|
|
|
199
200
|
});
|
|
200
201
|
```
|
|
201
202
|
|
|
203
|
+
## Keycloak-js Events
|
|
204
|
+
|
|
205
|
+
The callback events from [keycloak-js](https://www.keycloak.org/docs/latest/securing_apps/index.html#javascript-adapter-reference) are available through a RxJS subject which is defined by `keycloakEvents$`.
|
|
206
|
+
|
|
207
|
+
For example you make keycloak-angular auto refreshing your access token when expired:
|
|
208
|
+
|
|
209
|
+
```ts
|
|
210
|
+
keycloakService.keycloakEvents$.subscribe({
|
|
211
|
+
next: e => {
|
|
212
|
+
if (e.type == KeycloakEventType.OnTokenExpired) {
|
|
213
|
+
keycloakService.updateToken(20);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
202
219
|
## Contributors
|
|
203
220
|
|
|
204
221
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keycloak-angular",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.0",
|
|
4
4
|
"description": "Easy Keycloak setup for Angular applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@angular/common": "^10 || ^11 || ^12",
|
|
30
30
|
"@angular/core": "^10 || ^11 || ^12",
|
|
31
31
|
"@angular/router": "^10 || ^11 || ^12",
|
|
32
|
-
"keycloak-js": "^10 || ^11 || ^12 || ^13 || ^14"
|
|
32
|
+
"keycloak-js": "^10 || ^11 || ^12 || ^13 || ^14 || ^15"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"tslib": "^2.0.0"
|