Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UsernameFormKey = "username" PasswordFormKey = "password" )
Functions ¶
func HashPassword ¶
HashPassword generates a hashed password using Argon2
Types ¶
type Handler ¶
func NewHandler ¶
func (*Handler) GetOrCreateSession ¶
func (h *Handler) GetOrCreateSession(r *foundation.Request) (*foundation.Session, error)
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶
func NewRateLimiter() *RateLimiter
func (*RateLimiter) IsBlocked ¶
func (rl *RateLimiter) IsBlocked(r *foundation.Request, username string) bool
func (*RateLimiter) RecordAttempt ¶
func (rl *RateLimiter) RecordAttempt(r *foundation.Request, username string, success bool)
Click to show internal directories.
Click to hide internal directories.