Documentation ¶
Index ¶
- type Authenticator
- func (auth *Authenticator) AuthMiddleware(h http.Handler) http.Handler
- func (a *Authenticator) Authorize(rw http.ResponseWriter, req *http.Request) (*models.User, error)
- func (auth *Authenticator) ConfirmUser(email string, confirmationToken string) error
- func (auth *Authenticator) CreatePasswordRecovery(email string) (string, error)
- func (a *Authenticator) Login(rw http.ResponseWriter, req *http.Request, email string, password string) error
- func (a *Authenticator) Logout(rw http.ResponseWriter, req *http.Request) error
- func (a *Authenticator) Register(email string, password string, firstName string, lastName string) (string, error)
- func (auth *Authenticator) UpdateUserPasswordFromRecovery(email string, token string, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator(dal *db.DAL, cookieKey string) *Authenticator
func (*Authenticator) AuthMiddleware ¶
func (auth *Authenticator) AuthMiddleware(h http.Handler) http.Handler
func (*Authenticator) Authorize ¶
func (a *Authenticator) Authorize(rw http.ResponseWriter, req *http.Request) (*models.User, error)
func (*Authenticator) ConfirmUser ¶
func (auth *Authenticator) ConfirmUser(email string, confirmationToken string) error
func (*Authenticator) CreatePasswordRecovery ¶
func (auth *Authenticator) CreatePasswordRecovery(email string) (string, error)
func (*Authenticator) Login ¶
func (a *Authenticator) Login(rw http.ResponseWriter, req *http.Request, email string, password string) error
func (*Authenticator) Logout ¶
func (a *Authenticator) Logout(rw http.ResponseWriter, req *http.Request) error
func (*Authenticator) UpdateUserPasswordFromRecovery ¶
func (auth *Authenticator) UpdateUserPasswordFromRecovery(email string, token string, password string) error
Click to show internal directories.
Click to hide internal directories.