Permalink
Browse files

eliminate some silly reflection

  • Loading branch information...
1 parent 9d2158d commit 45f04408641564ea708b40ad9c115bdda04f76b2 @cemerick committed Jan 13, 2013
Showing with 5 additions and 4 deletions.
  1. +2 −1 project.clj
  2. +1 −1 src/cemerick/friend/util.clj
  3. +2 −2 src/cemerick/friend/workflows.clj
View
@@ -34,12 +34,13 @@
[ring "1.1.0"]
[clj-http "0.3.6"]]}
:sanity-check {:aot :all
+ :warn-on-reflection true
:compile-path "target/sanity-check-aot"}
:1.2 {:dependencies [[org.clojure/clojure "1.2.0"]]}
:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.0-RC2"]]}}
:aliases {"all" ["with-profile" "dev,1.2:dev,1.3:dev:dev,1.5"]
- "sanity-check" ["with-profile" "sanity-check" "compile"]})
+ "sanity-check" ["do" "clean," "with-profile" "sanity-check" "compile"]})
;; see:
;; http://static.springsource.org/spring-security/site/docs/3.1.x/reference/springsecurity-single.html#overall-architecture
@@ -21,7 +21,7 @@
(str \? query-string))))
(defn resolve-absolute-uri
- [uri request]
+ [^String uri request]
(-> (original-url request)
java.net.URI.
(.resolve uri)
@@ -36,7 +36,7 @@
(fn [{{:strs [authorization]} :headers :as request}]
(when authorization
(if-let [[[_ username password]] (try (-> (re-matches #"\s*Basic\s+(.+)" authorization)
- second
+ ^String second
(.getBytes "UTF-8")
Base64/decodeBase64
(String. "UTF-8")
@@ -61,7 +61,7 @@
(ring.util.response/redirect
(let [param (str "&login_failed=Y&username="
(java.net.URLEncoder/encode (:username params "")))
- login-uri (-> request ::friend/auth-config :login-uri)]
+ ^String login-uri (-> request ::friend/auth-config :login-uri)]
(util/resolve-absolute-uri
(str (if (.contains login-uri "?") login-uri (str login-uri "?"))
param)

0 comments on commit 45f0440

Please sign in to comment.