Client setup with an adapter
--- Learn how to set up your OpenID connection if you are using an adapter/library.
Using a client with an adapter
After having your Installation JSON
, you can setup your application quickly using the Keycloak adapters/libaries. Keycloak has adapters for a number of languages, including java, javascript and C#. For a list of adapters and instructions on how to connect see here.
There are example applications available to demonstrate integrating with Keycloak here
In most cases, it does not require any additional information than the Installation JSON
you can download.
More on understanding the json file
Our guidance on libraries/adapters
Evaluation of existing OIDC client libraries to select which example apps we should create for our client teams.
We are evaluating on the following criteria:
- Being maintained? - Is the library being currently maintained? Recent commits/publish?
- Meets feature set - Does the library allow teams to perform auth flows? Will it allow for custom KC params? (kc_idp_hint)
- Popularity - How popular is it?
- Open source - Is it Open Source?
- Support for PKCE - Does it support PKCE?
- Works for SPAs - Does the library work for single page applications?
- Comments - Relevant comments
JavaScript
Library | Being Maintained? | Meets feature set | Popularity | Open source | Support for PKCE | Works for SPAs | Comments |
---|---|---|---|---|---|---|---|
passport-keycloak-bearer | ✔ | ✔ | 1889 DL/Week | ✔ | ✔ | ✔ | |
oidc-client-ts | ✔ | ✔ | 38550 DL/Week | ✔ | ✔ | ✔ | |
sso-express | ✔ | ✔ | 127 DL/Week | ✔ | ✔ | ✔ | Being used by some community teams. |
openid-client | ✔ | ✔ | 940475 DL/Week | ✔ | ✔ | For Node.js only. | |
keycloak-js | ✔ | ✔ | 222218 DL/Week | ✔ | ✔ | ✔ | Keycloak supported in their documentation. |
TypeScript
Library | Being Maintained? | Meets feature set | Popularity | Open source | Support for PKCE | Works for SPAs | Comments |
---|---|---|---|---|---|---|---|
oidc-client-ts | ✔ | ✔ | 38550 DL/Week | ✔ | ✔ | ✔ | |
sso-express | ✔ | ✔ | 127 DL/Week | ✔ | ✔ | ✔ | Being used by some community teams. Works for TypeScript. |
keycloak-js | ✔ | ✔ | 222218 DL/Week | ✔ | ✔ | ✔ | Keycloak supported in their documentation. Works for TypeScript. |
C#/.Net
Library | Being Maintained? | Meets feature set | Popularity | Open source | Support for PKCE | Works for SPAs | Comments |
---|---|---|---|---|---|---|---|
IdentityModel.OidcClient | ✔ | ✔ | N/A | ✔ |
Python
Library | Being Maintained? | Meets feature set | Popularity | Open source | Support for PKCE | Works for SPAs | Comments |
---|---|---|---|---|---|---|---|
JWTConnect-Python-OidcRP | ✔ | ✔ | 400 DL/Week | ✔ | ✔ | ✔ | |
pyoidc | ✔ | ✔ | N/A | ✔ | ✔ | ✔ |
Java
Library | Being Maintained? | Meets feature set | Popularity | Open source | Support for PKCE | Works for SPAs | Comments |
---|---|---|---|---|---|---|---|
Spring Security | ✔ | ✔ | N/A (Very popular) | ✔ | N/A | ||
SpringBoot | ✔ | ✔ | N/A (Very popular) | ✔ | N/A |
AngularJS
Library | Being Maintained? | Meets feature set | Popularity | Open source | Support for PKCE | Works for SPAs | Comments |
---|---|---|---|---|---|---|---|
angular-auth-oidc-client | ✔ | ✔ | 28000 DL/week | ✔ | ✔ | ✔ |
Additional Notes
- Libraries being considered which were not maintained are not included in this list.