diff --git a/src/smeagol/authenticate.clj b/src/smeagol/authenticate.clj index f6dd300..cfc3045 100644 --- a/src/smeagol/authenticate.clj +++ b/src/smeagol/authenticate.clj @@ -1,9 +1,10 @@ (ns ^{:doc "Authentication functions." :author "Simon Brooke"} smeagol.authenticate - (:require [taoensso.timbre :as timbre] + (:require [crypto.password.scrypt :as password] + [environ.core :refer [env]] [noir.io :as io] - [crypto.password.scrypt :as password])) + [taoensso.timbre :as timbre])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; @@ -34,8 +35,11 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; the relative path to the password file. -;; (def password-file-path (str (io/resource-path) "../passwd")) -(def password-file-path (str (clojure.java.io/resource "passwd"))) +(def password-file-path + (or + (env :smeagol-passwd) + (str (clojure.java.io/resource "passwd")))) + (defn- get-users "Get the whole content of the password file as a clojure map"