Documentation
¶
Overview ¶
Package passreset provies a handler for password reset token generation, validation, and deletion. Tokens are one-time use and can be expired without use.
Index ¶
Constants ¶
View Source
const (
// CookieName is the header name for post requests
CookieName = "X-Post-PassReset"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler handles the creation and validation of password reset tokens
func NewHandler ¶
NewHandler creates a new handler using the database pointer.
func (*Handler) GenerateNewToken ¶
GenerateNewToken generates a new token for protecting against CSRF
func (*Handler) ValidHeaderToken ¶
ValidHeaderToken verifies that a password reset token is valid and then destroys it. This method is used in post requests.
Click to show internal directories.
Click to hide internal directories.