funcool

A channel for discussing and asking questions about Funcool libraries https://github.com/funcool/
2016-05-05T17:49:21.000026Z

@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

niwinz 2016-05-05T19:49:11.000027Z

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

niwinz 2016-05-05T19:49:25.000028Z

so you just need is do that

niwinz 2016-05-05T19:50:20.000029Z

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

niwinz 2016-05-05T19:50:52.000030Z

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

2016-05-05T19:53:19.000031Z

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

niwinz 2016-05-05T19:54:02.000033Z

oh nice! thanks

niwinz 2016-05-05T19:54:04.000034Z

merged!