Skip to content

Use of keycloak REST APIs to automate creation of clients, users, and so on, created initially to figure out how to automate test creation for express.js/keycloak-connect based services

Notifications You must be signed in to change notification settings

stephanosbacon/keycloak-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keycloak-sample

Use of keycloak REST APIs to automate creation of clients, users, and so on, created initially to figure out how to automate test creation for express.js/keycloak-connect based services.

First off: use keycloak-connect, NOT connect-keycloak

This repo came about as a result of trying to figure out how to use keycloak for my little chatbak project. What I wanted to do was to be able to automate the creation of users, clients, and so on, and I found that there weren't really any good examples of doing so.

As a result I wrote a little utility module called jsUtils.js and used it to create a test setup.

In order to run this sample, after cloning the repo, say

docker run -e KEYCLOAK_USER=foo -e KEYCLOAK_PASSWORD=bar -p 8080:8080 jboss/keycloak
npm install
npm test

You can require this as a module as well (not published to npm, just put the git repo as a dependency in package.json):

cons kc = require('kc-utils')('http://localhost:8080/auth');

About

Use of keycloak REST APIs to automate creation of clients, users, and so on, created initially to figure out how to automate test creation for express.js/keycloak-connect based services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published