No release in over a year
Ruby Keycloack admin API wrapper. This gem provides a simple wrapper for the Keycloak admin API. * https://www.keycloak.org * https://www.keycloak.org/documentation * https://www.keycloak.org/docs-api/26.5.2/rest-api/index.html
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 5.0.0
>= 0.21, < 0.25
 Project Readme

keycloak-admin

Ruby Keycloak admin API wrapper.

Introduction

Keycloak::Admin is a Ruby client for the Keycloak administration API.

It provides functionality to manage Keycloak resources and objects. Currently following resources are supported.

  • Clients
  • Groups
  • Realms
  • Users

In common creating, deleting and updating of resource objects as well as fetching (by identifier) and searching by attributes is possible.

The Users interface additionally provides the functionality to list and terminate all current sessions of a named users object. Further the Users and Groups interface provide the methods to add, remove a users object to a groups object and list memberships.

Version

The current gem version equates the latest tested Keycloak version.

Installation

gem install ruby-keycloak-admin

Usage

The required step is to set up a connection to a Keycloak service.

require 'keycloak/admin'

Keycloak::Admin.configure do |config|
  config.username = 'admin'
  config.password = 'admin'
  config.realm    = 'zone'                          # default: master
  config.base_url = 'https://keycloak.example.com'  # default: http://localhost:8080
end

Following example lists all users in the configured realm filtered by the matching last name.

Keycloak::Admin.users.find_by(lastName: 'Doe')

For further usage use ri or rake doc to create HTML documentation files.

License

MIT License

Is it any good?

Yes.