Skip to content

Commit 44b6365

Browse files
author
awb99
committed
config tuning
1 parent d8cc97d commit 44b6365

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

deps.edn

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
clj-oauth/clj-oauth {:mvn/version "1.5.2"}; copied over from REST
3131

3232
; pink-gorilla dependencies
33-
org.pinkgorilla/modular {:mvn/version "0.0.39"}
33+
org.pinkgorilla/modular {:mvn/version "0.0.40"}
3434
org.pinkgorilla/permission {:mvn/version "0.0.15"}
3535
; TODO: move frontend->somewhere else.
3636
;modular/frontend {:local/root "../frontend" :deps/manifest :deps}
37-
org.pinkgorilla/websocket {:mvn/version "0.0.8"}}
37+
org.pinkgorilla/websocket {:mvn/version "0.0.9"}}
3838

3939

4040
:aliases

resources/ext/oauth2.edn

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
modular.oauth2.local.handler
1616
modular.oauth2 ; side-effects
1717
]
18+
1819
:api-routes {"oauth2/" {["start/" :provider] {:get modular.oauth2.handler/handler-oauth2-start-wrapped}
1920
"token" {:get modular.oauth2.handler/token-handler-wrapped}
2021
; ["redirect/" :provider] {:get :oauth2/redirect}

src/modular/oauth2.cljc

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#?(:clj [taoensso.timbre :refer [debug info warn error]])
44
#?(:cljs [taoensso.timbre :refer-macros [debug info warn error]])
55
#?(:clj [nano-id.core :refer [nano-id]])
6-
#?(:clj [modular.config :as config])
76
#?(:clj [modular.persist.protocol :refer [save loadr]])
7+
#?(:clj [modular.oauth2.config :as config])
88
#?(:clj [modular.oauth2.local.handler])
99
#?(:cljs [modular.oauth2.request])
1010
#?(:cljs [modular.oauth2.user.subscriptions])
@@ -16,14 +16,14 @@
1616

1717
#?(:clj
1818
(defn get-config-server [server-profile-kw]
19-
(config/get-in-config [:oauth2 :server server-profile-kw])))
19+
(config/get-config-server server-profile-kw)))
2020

2121
#?(:clj
2222
(defn get-config-user
2323
([]
2424
(get-config-user :default))
2525
([user-id-kw]
26-
(config/get-in-config [:oauth2 :user user-id-kw])))
26+
(config/get-config-user user-id-kw)))
2727

2828
;
2929
)

src/modular/oauth2/config.clj

+11
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
;; modular.oauth2.authorize.start-handler
3636
;; modular.oauth2.middleware
3737

38+
(defn get-config-server [server-profile-kw]
39+
(get-in-config [:oauth2 :server server-profile-kw]))
40+
41+
42+
(defn get-config-user
43+
([]
44+
(get-config-user :default))
45+
([user-id-kw]
46+
(get-in-config [:oauth2 :user user-id-kw])))
47+
48+
3849
(defn entire-config []
3950
@config-atom)
4051

0 commit comments

Comments
 (0)