Documentation ¶
Index ¶
- type GetUserFunc
- type MakeUserFunc
- type PasswordMiddleware
- func (pm *PasswordMiddleware) Auth(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
- func (pm *PasswordMiddleware) ChangePassword(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
- func (pm *PasswordMiddleware) Init()
- func (pm *PasswordMiddleware) Login(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
- func (pm *PasswordMiddleware) Logout(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
- func (pm *PasswordMiddleware) NewUser(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
- type ValidPasswordFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetUserFunc ¶
string ->:stored bcrypt hash, bool -> user exists
type MakeUserFunc ¶
generate a user, return error if username/password are bad.
type PasswordMiddleware ¶
type PasswordMiddleware struct { GetUser GetUserFunc MakeUser MakeUserFunc ValidPassword ValidPasswordFunc Servicename string Keypairs [][]byte Cost int // If not set, must call Init method Cookies *sessions.CookieStore }
func (*PasswordMiddleware) Auth ¶
func (pm *PasswordMiddleware) Auth(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
func (*PasswordMiddleware) ChangePassword ¶
func (pm *PasswordMiddleware) ChangePassword(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
TODO: fuckit, I'll do it later
func (*PasswordMiddleware) Init ¶
func (pm *PasswordMiddleware) Init()
func (*PasswordMiddleware) Login ¶
func (pm *PasswordMiddleware) Login(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
func (*PasswordMiddleware) Logout ¶
func (pm *PasswordMiddleware) Logout(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
func (*PasswordMiddleware) NewUser ¶
func (pm *PasswordMiddleware) NewUser(accept http.HandlerFunc, reject http.HandlerFunc) http.HandlerFunc
type ValidPasswordFunc ¶
Don't store password, but validate it meets security requirements
Click to show internal directories.
Click to hide internal directories.