-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from yubinTW/feature/callback-option
feat(plugin-option): add custom callback option (#18)
- Loading branch information
Showing
3 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ yarn add fastify-keycloak-adapter | |
## Fastify Version | ||
|
||
- Fastify 4 -> `npm i fastify-keycloak-adapter` | ||
- Fastify 3 -> `npm i [email protected]` | ||
- Fastify 3 -> `npm i [email protected]` (deprecated) | ||
|
||
## Usage | ||
|
||
|
@@ -54,6 +54,8 @@ server.register(keycloak, opts) | |
|
||
- `scope` client scope of keycloak (optional, string[], defaults to `['openid']`) | ||
|
||
- `callback` Relative or absolute URL to receive the response data (optional, defaults to `/`) | ||
|
||
- `retries` The number of times to retry before failing. (optional, number, defaults to 3) | ||
|
||
- `logoutEndpoint` route path of doing logout (optional, defaults to `/logout`) | ||
|
@@ -85,7 +87,8 @@ const opts: KeycloakOptions = { | |
clientId: 'myclient01', | ||
clientSecret: 'myClientSecret', | ||
logoutEndpoint: '/logout', | ||
excludedPatterns: ['/metrics', '/api/todos/**'] | ||
excludedPatterns: ['/metrics', '/manifest.json', '/api/todos/**'], | ||
callback: '/hello' | ||
} | ||
|
||
server.register(keycloak, opts) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters