Documentation ¶
Index ¶
- Variables
- type Auth
- func (a *Auth) AuthCookie(u string) (*http.Cookie, error)
- func (a *Auth) AuthoriseUser(username string, password string) (*model.User, error)
- func (a *Auth) EncryptPassword(password string) ([]byte, error)
- func (a *Auth) LoginHandler(w http.ResponseWriter, r *http.Request)
- func (a *Auth) LogoutHandler(w http.ResponseWriter, r *http.Request)
- func (a *Auth) RequireUser(h http.Handler) http.Handler
- func (a *Auth) VerifyCookie(c *http.Cookie) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InvalidPasswordError = errors.New("Invalid password")
)
Functions ¶
This section is empty.
Types ¶
type Auth ¶
func (*Auth) AuthoriseUser ¶
func (*Auth) LoginHandler ¶
func (a *Auth) LoginHandler(w http.ResponseWriter, r *http.Request)
func (*Auth) LogoutHandler ¶
func (a *Auth) LogoutHandler(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.