keycloak-angular
Advanced tools
Comparing version 8.3.0 to 8.4.0
{ | ||
"name": "keycloak-angular", | ||
"version": "8.3.0", | ||
"version": "8.4.0", | ||
"description": "Easy Keycloak setup for Angular applications", | ||
@@ -32,3 +32,3 @@ "repository": { | ||
"@angular/router": "^10 || ^11 || ^12", | ||
"keycloak-js": "^10 || ^11 || ^12 || ^13 || ^14" | ||
"keycloak-js": "^10 || ^11 || ^12 || ^13 || ^14 || ^15" | ||
}, | ||
@@ -35,0 +35,0 @@ "dependencies": { |
@@ -23,2 +23,3 @@ # Keycloak Angular | ||
- [HttpClient Interceptor](#httpclient-interceptor) | ||
- [Keycloak-js Events](#keycloak-js-events) | ||
- [Contributors](#contributors) | ||
@@ -56,3 +57,3 @@ - [License](#license) | ||
| :---------: | :--------------: | :-----------------------: | :-----------------: | | ||
| 11.x - 12.x | 8.3.x | 10 - 14 | Bugs / New Features | | ||
| 11.x - 12.x | 8.4.x | 10 - 15 | Bugs / New Features | | ||
| 10.x | 8.x.x | 10 - 11 | Bugs | | ||
@@ -204,2 +205,18 @@ | 9.x | 7.3.x | 3.4.3 - 10 (excluding v7) | Bugs | | ||
## Keycloak-js Events | ||
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$`. | ||
For example you make keycloak-angular auto refreshing your access token when expired: | ||
```ts | ||
keycloakService.keycloakEvents$.subscribe({ | ||
next: e => { | ||
if (e.type == KeycloakEventType.OnTokenExpired) { | ||
keycloakService.updateToken(20); | ||
} | ||
} | ||
}); | ||
``` | ||
## Contributors | ||
@@ -206,0 +223,0 @@ |
230338
250