Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthToken = ""
AuthToken is the token used for local auth
View Source
var SessionID = ""
SessionID is the session ID for local auth; generated after token is validated
Functions ¶
func Auth ¶ added in v0.8.0
func Auth(w http.ResponseWriter, r *http.Request) bool
Auth validates tokens and session cookies for local authentication
func GenerateSessionID ¶ added in v0.8.0
func GenerateSessionID(w http.ResponseWriter) string
GenerateSessionID is a util function to generate a random session ID
func ValidateSessionCookie ¶
func ValidateSessionCookie(w http.ResponseWriter, r *http.Request) bool
ValidateSessionCookie validates the session cookie in the request
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.