Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAuthorized ¶
Generate a new session id after login
Types ¶
type ChangePasswordResult ¶
func ChangePassword ¶
func ChangePassword(userInfo UserInfo, oldPassword, password string) ChangePasswordResult
Log a user in when they already have an unauthenticated session
func OldPasswordDoesNotMatch ¶
func OldPasswordDoesNotMatch() ChangePasswordResult
Old password does not match
type RequestResetResult ¶
type RequestResetResult struct { EmailValid bool RequestResetSuccess bool ShowNewForm bool User UserInfo Token string }
func RequestPasswordReset ¶
func RequestPasswordReset(email string) RequestResetResult
Request a password reset, to be sent by email
type SessionInfo ¶
func CheckSession ¶
func CheckSession(sessionid string) SessionInfo
Check session when the user requests a page
func InvalidSession ¶
func InvalidSession() SessionInfo
Empty session struct for an unauthenticated session
func SaveSession ¶
func SaveSession(sessionid string, userInfo UserInfo, authenticated int) SessionInfo
Save an authenticated session to the database
func UpdateSession ¶
func UpdateSession(sessionid string, userInfo UserInfo, authenticated int) SessionInfo
Log a user in when they already have an unauthenticated session
type UserInfo ¶
func CheckLogin ¶
Check password when the user logs in
Click to show internal directories.
Click to hide internal directories.