Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/austincunningham/keycloak-express
:unlock: Express App that uses Keycloak to secure API endpoints
https://github.com/austincunningham/keycloak-express
expressjs keycloak nodejs
Last synced: about 17 hours ago
JSON representation
:unlock: Express App that uses Keycloak to secure API endpoints
- Host: GitHub
- URL: https://github.com/austincunningham/keycloak-express
- Owner: austincunningham
- Created: 2017-04-10T14:27:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-14T01:14:00.000Z (about 2 years ago)
- Last Synced: 2024-04-13T16:18:16.627Z (9 months ago)
- Topics: expressjs, keycloak, nodejs
- Language: Handlebars
- Homepage: https://austincunningham.ddns.net/2017/keycloakexpress
- Size: 181 KB
- Stars: 23
- Watchers: 3
- Forks: 12
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Keycloak-Express
## About
This is a Node js Express app that uses Keycloak to protect the /test route,
Login and user setup are controlled by keycloak. The default route / is unprotected.
The /logout route kills the keycloak session. See the following [blog](https://codeburst.io/keycloak-and-express-7c71693d507a)
for steps to setup the Keycloak server## Demo Video
[![ScreenShot](./keycloak-setup.jpg)](https://youtu.be/VAzI7f3pxec)
### Installation
clone the repo and run **npm install**
### Dependancies
- Keycloak
- Node
- express
- npm### Requirements
Need to have a Keycloak server up and runningDownload Keycloak at
http://www.keycloak.org/downloads.html
Setup Keycloak as outline at
www.keycloak.org/docs/latest/getting_started/index.html
Setup a Realm
http://www.keycloak.org/docs/latest/getting_started/index.html#creating-a-realm-and-userSetup a Open ID Connect Client
http://www.keycloak.org/docs/latest/server_admin/index.html#_clientsTo use the Node.js adapter, first you must create a client for your application in the Keycloak Administration Console. The adapter supports public, confidential, and bearer-only access type. Which one to choose depends on the use-case scenario.
Once the client is created click the Installation tab, select Keycloak OIDC JSON for Format Option, and then click Download. The downloaded keycloak.json file should be at the root folder of your project.
See
http://www.keycloak.org/docs/latest/securing_apps/index.html#_nodejs_adapter