Documentation ¶
Index ¶
- func AddSessionCookie(w http.ResponseWriter, r *http.Request, db *sql.DB) (err error)
- func CreateCookie(r *http.Request, salt []byte) (cookie string, err error)
- func GenerateRandomSalt(saltSize int) (salt []byte, err error)
- func HashPassword(password string, salt []byte) string
- func PasswordMatchHash(password string, hash string, salt []byte) bool
- func PopString(s []string) (ss []string, err error)
- func ReturnError(w http.ResponseWriter, errorCode int, msg string) (err error)
- func VerifyLogin(r *http.Request, db *sql.DB) (authorized bool, err error)
- func VerifyPOSTLogin(r *http.Request, db *sql.DB) (authorized bool, err error)
- func VerifySessionCookie(r *http.Request, db *sql.DB) (authorized bool, err error)
- type ErrorFields
- type ErrorStatus
- type Session
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSessionCookie ¶
func GenerateRandomSalt ¶
func HashPassword ¶
func ReturnError ¶
func ReturnError(w http.ResponseWriter, errorCode int, msg string) (err error)
func VerifyPOSTLogin ¶
Types ¶
type ErrorFields ¶
type ErrorStatus ¶
type ErrorStatus struct {
Error []ErrorFields `json:"errors"`
}
Click to show internal directories.
Click to hide internal directories.