#keycloak #access #api #admin #rust

rust-keycloak

rust-keycloak is a Rust crate providing access to the Keycloak API

5 releases

0.0.7 Aug 16, 2021
0.0.6 Apr 24, 2020
0.0.3 May 3, 2019
0.0.2 Mar 20, 2019
0.0.1 Jan 8, 2019

#6 in #keycloak

Download history 1/week @ 2024-02-19 9/week @ 2024-02-26 3/week @ 2024-03-04 1/week @ 2024-03-11 13/week @ 2024-03-18 10/week @ 2024-03-25 39/week @ 2024-04-01

64 downloads per month

GPL-2.0-or-later

29KB
623 lines

Rust Keycloak

rust-keycloak is a Rust crate providing access to the Keycloak API.

Rust Keycloak

0.0.6

rust-keycloak is a Rust crate providing access to the Keycloak API.

Features

OpenId

  • well_known
  • token
  • refresh_token
  • jwt_decode
  • service_account

Admin

  • Create user
  • Delete user
  • Update user
  • Count users
  • user_info
  • introspect
  • Add user to grup
  • Remove user from group
  • Add realm and client roles to users

Example usage

    let token_request = rust_keycloak::serde_json::json!({
        "grant_type":"password".to_string(),
        "username":"admin".to_string(),
        "password":"password".to_string(),
        "realm":"realm_name".to_string(), 
        "client_id":"client_id".to_string(), 
        "redirect_uri":"".to_string(), 
        "code":"".to_string()});

    let tok = rust_keycloak::keycloak::OpenId::token("http://localhost/auth/",token_request,"realm_name");

Dependencies

~14–29MB
~543K SLoC