mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
💄 Add minor naming change on calling logging on oidc ns
This commit is contained in:
parent
a54160965d
commit
3b48be808c
1 changed files with 39 additions and 39 deletions
|
@ -147,7 +147,7 @@
|
||||||
(when (contains? cf/flags :login-with-oidc)
|
(when (contains? cf/flags :login-with-oidc)
|
||||||
(if-let [opts (prepare-oidc-opts cfg)]
|
(if-let [opts (prepare-oidc-opts cfg)]
|
||||||
(let [jwks (fetch-oidc-jwks cfg opts)]
|
(let [jwks (fetch-oidc-jwks cfg opts)]
|
||||||
(l/info :hint "provider initialized"
|
(l/inf :hint "provider initialized"
|
||||||
:provider "oidc"
|
:provider "oidc"
|
||||||
:method (if (:discover? opts) "discover" "manual")
|
:method (if (:discover? opts) "discover" "manual")
|
||||||
:client-id (:client-id opts)
|
:client-id (:client-id opts)
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
(if (and (string? (:client-id opts))
|
(if (and (string? (:client-id opts))
|
||||||
(string? (:client-secret opts)))
|
(string? (:client-secret opts)))
|
||||||
(do
|
(do
|
||||||
(l/info :hint "provider initialized"
|
(l/inf :hint "provider initialized"
|
||||||
:provider "google"
|
:provider "google"
|
||||||
:client-id (:client-id opts)
|
:client-id (:client-id opts)
|
||||||
:client-secret (obfuscate-string (:client-secret opts)))
|
:client-secret (obfuscate-string (:client-secret opts)))
|
||||||
|
@ -237,7 +237,7 @@
|
||||||
(if (and (string? (:client-id opts))
|
(if (and (string? (:client-id opts))
|
||||||
(string? (:client-secret opts)))
|
(string? (:client-secret opts)))
|
||||||
(do
|
(do
|
||||||
(l/info :hint "provider initialized"
|
(l/inf :hint "provider initialized"
|
||||||
:provider "github"
|
:provider "github"
|
||||||
:client-id (:client-id opts)
|
:client-id (:client-id opts)
|
||||||
:client-secret (obfuscate-string (:client-secret opts)))
|
:client-secret (obfuscate-string (:client-secret opts)))
|
||||||
|
@ -266,7 +266,7 @@
|
||||||
(if (and (string? (:client-id opts))
|
(if (and (string? (:client-id opts))
|
||||||
(string? (:client-secret opts)))
|
(string? (:client-secret opts)))
|
||||||
(do
|
(do
|
||||||
(l/info :hint "provider initialized"
|
(l/inf :hint "provider initialized"
|
||||||
:provider "gitlab"
|
:provider "gitlab"
|
||||||
:base-uri base
|
:base-uri base
|
||||||
:client-id (:client-id opts)
|
:client-id (:client-id opts)
|
||||||
|
@ -327,7 +327,7 @@
|
||||||
:uri (:token-uri provider)
|
:uri (:token-uri provider)
|
||||||
:body (u/map->query-string params)}]
|
:body (u/map->query-string params)}]
|
||||||
|
|
||||||
(l/trace :hint "fetch access token"
|
(l/trc :hint "fetch access token"
|
||||||
:provider (:name provider)
|
:provider (:name provider)
|
||||||
:client-id (:client-id provider)
|
:client-id (:client-id provider)
|
||||||
:client-secret (obfuscate-string (:client-secret provider))
|
:client-secret (obfuscate-string (:client-secret provider))
|
||||||
|
@ -335,7 +335,7 @@
|
||||||
:redirect-uri (:redirect_uri params))
|
:redirect-uri (:redirect_uri params))
|
||||||
|
|
||||||
(let [{:keys [status body]} (http/req! cfg req {:sync? true})]
|
(let [{:keys [status body]} (http/req! cfg req {:sync? true})]
|
||||||
(l/trace :hint "access token fetched" :status status :body body)
|
(l/trc :hint "access token fetched" :status status :body body)
|
||||||
(if (= status 200)
|
(if (= status 200)
|
||||||
(let [data (json/decode body)]
|
(let [data (json/decode body)]
|
||||||
{:token/access (get data :access_token)
|
{:token/access (get data :access_token)
|
||||||
|
@ -374,7 +374,7 @@
|
||||||
|
|
||||||
(defn- fetch-user-info
|
(defn- fetch-user-info
|
||||||
[{:keys [::provider] :as cfg} tdata]
|
[{:keys [::provider] :as cfg} tdata]
|
||||||
(l/trace :hint "fetch user info"
|
(l/trc :hint "fetch user info"
|
||||||
:uri (:user-uri provider)
|
:uri (:user-uri provider)
|
||||||
:token (obfuscate-string (:token/access tdata)))
|
:token (obfuscate-string (:token/access tdata)))
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@
|
||||||
:method :get}
|
:method :get}
|
||||||
response (http/req! cfg params {:sync? true})]
|
response (http/req! cfg params {:sync? true})]
|
||||||
|
|
||||||
(l/trace :hint "user info response"
|
(l/trc :hint "user info response"
|
||||||
:status (:status response)
|
:status (:status response)
|
||||||
:body (:body response))
|
:body (:body response))
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@
|
||||||
|
|
||||||
info (process-user-info provider tdata info)]
|
info (process-user-info provider tdata info)]
|
||||||
|
|
||||||
(l/trace :hint "user info" :info info)
|
(l/trc :hint "user info" :info info)
|
||||||
|
|
||||||
(when-not (s/valid? ::info info)
|
(when-not (s/valid? ::info info)
|
||||||
(l/warn :hint "received incomplete profile info object (please set correct scopes)" :info info)
|
(l/warn :hint "received incomplete profile info object (please set correct scopes)" :info info)
|
||||||
|
|
Loading…
Add table
Reference in a new issue