Keycloak.Admin (keycloak v1.1.0) View Source

This module is responsible for making calls to the Keycloak admin api.

Example

client = Keycloak.Client.new(token: "supersecret")

case Keycloak.Admin.get(client, "/") do
  {:ok, %O{body: body}} ->
    body
  {:error, %{body: body}} ->
    "#{inspect body}"
end

response = OAuth2.Client.get!(client, "/some/resource")

Link to this section Summary

Link to this section Types

Link to this section Functions

Link to this function

delete(client, url, body \\ "", params \\ [], headers \\ [{"content-type", "application/json"}], opts \\ [])

View Source

Specs

delete(
  OAuth2.Client.t(),
  String.t(),
  body(),
  Keyword.t(),
  headers(),
  Keyword.t()
) :: result()

Makes an authorized DELETE request to url

Link to this function

get(client, url, params \\ [], headers \\ [], opts \\ [])

View Source

Specs

Makes an authorized GET request to url

A simple wrapper around the current admin_client functionality.

NOTE: This is a temporary fix for some missing functionality.

Link to this function

post(client, url, body \\ "", params \\ [], headers \\ [{"content-type", "application/json"}], opts \\ [])

View Source

Specs

Makes an authorized POST request to url

Link to this function

put(client, url, body \\ "", params \\ [], headers \\ [{"content-type", "application/json"}], opts \\ [])

View Source

Specs

Makes an authorized PUT request to url