Documentation ¶
Index ¶
- Constants
- func AuthenicationHandler(inner http.Handler) http.Handler
- func ClearSession(w http.ResponseWriter)
- func GetSession(r *http.Request) (models.Session, error)
- func HashedPassword(password string) ([]byte, error)
- func IsAuthenticated(r *http.Request) bool
- func IsValidUsernamePassword(username string, password string) bool
- func Login(username string, password string, w http.ResponseWriter) bool
- func Logout(w http.ResponseWriter)
- func SetSession(username string, w http.ResponseWriter)
Constants ¶
View Source
const COOKIE_SESSION = "session"
View Source
const REDIRECT_URL = "/login"
Variables ¶
This section is empty.
Functions ¶
func ClearSession ¶
func ClearSession(w http.ResponseWriter)
func HashedPassword ¶
func IsAuthenticated ¶
func IsValidUsernamePassword ¶
func Logout ¶
func Logout(w http.ResponseWriter)
func SetSession ¶
func SetSession(username string, w http.ResponseWriter)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.