                                 json/decode
                                 (get "access_token"))]
        {"Authorization" (str "bearer " access-token)
-        "Conternt-Type" "application/json"}
-       (throw
-        (ex-info "Down stream auth server timed out (Keycloak)"
-                 {:response-code 503}))))))
-
+        "Conternt-Type" "application/json"}))))
 
 (defn group-by-path
   "Get the group id (uuid) by using group path.

   (let [bare-req-opts {:timeout timeout}]
     (if-some [headers (request-headers keycloak (assoc bare-req-opts :timeout timeout))]
       (let [req-opts (assoc bare-req-opts :headers headers)]
         (if-let [user-id (lookup-user-id cm req-opts api-root user-id-cache email)]
           (if-let [allowed-paths
                    (-> (client/get (format "%s/users/%s/groups" api-root user-id)
                                    (assoc req-opts :connection-manager cm)) :body json/decode)]
             (reduce (fn [paths {:strs [path]}]
                       (conj paths (subs path 12)))
                     #{}
                     allowed-paths)
             (throw (ex-info "Down stream auth server timed out"
                             {:response-code 503})))))
       (throw (ex-info "Down stream auth server timed out"
                       {:response-code 503}))))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

        (not (empty? (set/intersection possible-group-paths user-group-paths))))
      false)))

(defn add-user-to-group
  "Returns status code from Keycloak response."
  [request-headers api-root user-id group-id]
