Documentation ¶
Index ¶
- func Auth(next http.HandlerFunc, conf *Conf) http.HandlerFunc
- func HashPassword(pw string) string
- func IsLoggedIn(w http.ResponseWriter, r *http.Request) bool
- func LogOut(w http.ResponseWriter, r *http.Request)
- func MatchPasswords(hash, pw string) bool
- func StartSession(w http.ResponseWriter, r *http.Request)
- func ToTime(s string) time.Duration
- type Conf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLoggedIn ¶
func IsLoggedIn(w http.ResponseWriter, r *http.Request) bool
IsLoggedIn - check if user logged in
func MatchPasswords ¶
MatchPasswords - check if password and hash matches
func StartSession ¶
func StartSession(w http.ResponseWriter, r *http.Request)
StartSession for new login
Types ¶
Click to show internal directories.
Click to hide internal directories.