mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Optional environment variable for passwd file.
This commit is contained in:
parent
3ed44ec3fc
commit
44703d5889
1 changed files with 8 additions and 4 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
(ns ^{:doc "Authentication functions."
|
(ns ^{:doc "Authentication functions."
|
||||||
:author "Simon Brooke"}
|
:author "Simon Brooke"}
|
||||||
smeagol.authenticate
|
smeagol.authenticate
|
||||||
(:require [taoensso.timbre :as timbre]
|
(:require [crypto.password.scrypt :as password]
|
||||||
|
[environ.core :refer [env]]
|
||||||
[noir.io :as io]
|
[noir.io :as io]
|
||||||
[crypto.password.scrypt :as password]))
|
[taoensso.timbre :as timbre]))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;;;
|
;;;;
|
||||||
|
|
@ -34,8 +35,11 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
;; the relative path to the password file.
|
;; the relative path to the password file.
|
||||||
;; (def password-file-path (str (io/resource-path) "../passwd"))
|
(def password-file-path
|
||||||
(def password-file-path (str (clojure.java.io/resource "passwd")))
|
(or
|
||||||
|
(env :smeagol-passwd)
|
||||||
|
(str (clojure.java.io/resource "passwd"))))
|
||||||
|
|
||||||
|
|
||||||
(defn- get-users
|
(defn- get-users
|
||||||
"Get the whole content of the password file as a clojure map"
|
"Get the whole content of the password file as a clojure map"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue