Skip to content

Commit 3dabd56

Browse files
author
Chetan Padia
committed
allow for string paramters from ring wrap-params
1 parent ae0f1d5 commit 3dabd56

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/clj_oauth2/ring.clj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ create a vector of values."
118118
oauth2-url-params (or (get oauth2-url-vector 1) "")
119119
encoding (or (:character-encoding request) "UTF-8")]
120120
(and (= oauth2-uri (request-uri request oauth2-params))
121-
(submap? (keyify-params (parse-params oauth2-url-params encoding)) (:params request)))))
121+
(submap? (keyify-params (parse-params oauth2-url-params encoding))
122+
(keyify-params (:params request))))))
122123

123124
;; This Ring wrapper acts as a filter, ensuring that the user has an OAuth
124125
;; token for all but a set of explicitly excluded URLs. The response from
@@ -136,11 +137,11 @@ create a vector of values."
136137
;; it in the response and redirect to the originally requested URL
137138
(let [response {:status 302
138139
:headers {"Location" ((:get-target oauth2-params) request)}}
139-
oauth2-data (oauth2/get-access-token
140-
oauth2-params
141-
(:params request)
142-
(oauth2/make-auth-request
143-
oauth2-params
140+
oauth2-data (oauth2/get-access-token
141+
oauth2-params
142+
(keyify-params (:params request))
143+
(oauth2/make-auth-request
144+
oauth2-params
144145
((:get-state oauth2-params) request)))]
145146
((:put-oauth2-data oauth2-params) request response oauth2-data))
146147
;; We're not handling the callback

0 commit comments

Comments
 (0)