From 05feb38e9b9adffe7c0ce2b4a2caa346961f11e8 Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Thu, 5 Oct 2023 10:45:49 +1100 Subject: [PATCH] feat(keycloak): work with passed in token --- drivers/keycloak/rest_api.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/keycloak/rest_api.cr b/drivers/keycloak/rest_api.cr index 18aa7e565f..8d07927048 100644 --- a/drivers/keycloak/rest_api.cr +++ b/drivers/keycloak/rest_api.cr @@ -68,9 +68,10 @@ class Keycloak::RestAPI < PlaceOS::Driver search : String? = nil, email : String? = nil, enabled_users_only : Bool = true, - all_pages : Bool = false + all_pages : Bool = false, + auth_token : String? = nil ) - user_token = "Bearer #{get_token}" + user_token = "Bearer #{auth_token.presence || get_token}" params = URI::Params.build do |form| form.add "search", search.to_s if search.presence