Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticatePassword ¶
func HashPassword ¶
func WithLoginPath ¶
func WithLoginPath(path string) option
WithLoginPath sets the path to listen for login requests. Optional.
func WithRedirectPath ¶
func WithRedirectPath(path string) option
WithRedirectPath sets the path to redirect to after login. If set to blank, successful logins will not result in a redirect.
func WithUserStore ¶
func WithUserStore(u UserStore) option
WithUserStore sets the backing user store. Required.
Types ¶
type Module ¶
type Module struct { Router *router.Module Sessions *session.Module Logger *logger.Module // contains filtered or unexported fields }
Module databaseauth provides login via a database or database-like backend. It uses the session module. user authenticates via this module, then is a given a cookie which authenticates future requests. It registers m.loginPath for handling the login POST request.
Click to show internal directories.
Click to hide internal directories.