Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tschaefer/ruby-keycloak-admin
Ruby Keycloak API wrapper
https://github.com/tschaefer/ruby-keycloak-admin
Last synced: about 5 hours ago
JSON representation
Ruby Keycloak API wrapper
- Host: GitHub
- URL: https://github.com/tschaefer/ruby-keycloak-admin
- Owner: tschaefer
- License: mit
- Created: 2022-12-14T13:34:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T10:00:54.000Z (about 1 month ago)
- Last Synced: 2024-10-19T13:15:36.586Z (28 days ago)
- Language: Ruby
- Homepage:
- Size: 169 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this 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
* UsersIn 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
```sh
$ gem install --file --without development,test
$ gem build
$ VERSION=$(ruby -Ilib -e 'require "keycloak/admin/version"; puts Keycloak::Admin::VERSION')
$ gem install --local keycloak-admin-${VERSION}.gem
```## Usage
The required step is to set up a connection to a Keycloak service.
```ruby
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.```ruby
Keycloak::Admin.users.find_by(lastName: 'Doe')
```For further usage use `ri` or `rake doc` to create HTML documentation files.
## License
[MIT License](https://spdx.org/licenses/MIT.html)
## Is it any good?
[Yes.](https://news.ycombinator.com/item?id=3067434)