Should fix most of the authentication issues

This commit is contained in:
2023-09-05 23:08:22 -07:00
parent a6e4080746
commit a56d3b0b84
22 changed files with 506 additions and 179 deletions

View File

@@ -36,7 +36,8 @@
[com.walmartlabs.lacinia.schema :as schema]
[datomic.api :as dc]
[unilog.context :as lc]
[yang.time :refer [time-it]])
[yang.time :refer [time-it]]
[auto-ap.routes.auth :as auth])
(:import
(clojure.lang IPersistentMap)))
@@ -243,7 +244,8 @@
:profile_image_url {:type 'String}
:email {:type 'String}
:role {:type :role}
:clients {:type '(list :client)}}}
:clients {:type '(list :client)}
:impersonate_jwt {:type 'String}}}
:csv
{:fields {:csv_content_b64 {:type 'String}}}
@@ -622,7 +624,10 @@
(defn get-user [context args _]
(assert-admin (:id context))
(let [users (d-users/get-graphql args)]
(let [users (->> (d-users/get-graphql args)
(map (fn [u]
(assoc u :impersonate_jwt
(auth/user->jwt u "FAKE_TOKEN")))))]
(->graphql users)))