Should force the user to select a client

This commit is contained in:
2023-09-27 15:58:50 -07:00
parent be13bbbb4d
commit 673dbd0807
4 changed files with 160 additions and 25 deletions

View File

@@ -14,7 +14,8 @@
[datomic.api :as dc]
[auto-ap.datomic :refer [conn]]
[auto-ap.datomic.clients :as d-clients]
[clojure.string :as str]))
[clojure.string :as str]
[auto-ap.logging :as alog]))
;; switch all of this to use tokens instead of passing around client codes, particularly because the codes
;; need to be tweaked for repeats
(defn client-code->login [client-code]
@@ -216,10 +217,12 @@
(defn get-access-token [client-code]
(try
(alog/info ::getting-access-token :client client-code)
(let [cob-session (login-user (client-code->login client-code))]
(alog/info ::got-cob-session :cob-ession cob-session)
cob-session)
(catch Exception e
(log/error e)
(alog/error ::cant-get-access-token :exception e)
(throw e))))
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}