Fork me on GitHub
#funcool
<
2016-05-05
>
ericfode17:05:21

@niwiz (while i realize you may be the wrong person to ask it looks like you are pretty active with funcool. I am working with httpurr and i am not sure how to do basic auth in the most recent version… it looks like the auth namespace is gone

niwinz19:05:11

@ericfode: basic auth just consists in an Authorization header with base64 encoded password and username

niwinz19:05:25

so you just need is do that

niwinz19:05:20

(defn auth-header
  [user password]
  (str "Basic " (base64/encodeString (str user ":" password))))

niwinz19:05:52

(:require [goog.crypt.base64 :as base64])

ericfode19:05:19

nods Thank you. I found it in a older version in the repo. There is still a sections in the docs referring to http.auth here is a pr to remove it https://github.com/funcool/httpurr/pull/7

niwinz19:05:02

oh nice! thanks