Versions in this module Expand all Collapse all v0 v0.1.0 Oct 23, 2019 Changes in this version + const CookieName + const SessionContextKey + type Server struct + func NewServer(accounts *dontusepasswords.Accounts, sessions *Sessions) *Server + func (s *Server) AddUser(w http.ResponseWriter, r *http.Request) + func (s *Server) AddUserAttempt(w http.ResponseWriter, r *http.Request) + func (s *Server) AddUserPage(w http.ResponseWriter, r *http.Request) + func (s *Server) ChangePassword(w http.ResponseWriter, r *http.Request) + func (s *Server) ChangePasswordAttempt(w http.ResponseWriter, r *http.Request) + func (s *Server) ChangePasswordPage(w http.ResponseWriter, r *http.Request) + func (s *Server) ListenAndServerHTTPS() error + func (s *Server) Login(w http.ResponseWriter, r *http.Request) + func (s *Server) LoginAttempt(w http.ResponseWriter, r *http.Request) + func (s *Server) LoginPage(w http.ResponseWriter, r *http.Request) + func (s *Server) Logout(w http.ResponseWriter, r *http.Request) + func (s *Server) RootPage(w http.ResponseWriter, r *http.Request) + type Session struct + Expires time.Time + Id string + Username string + type Sessions struct + func NewSessions(d time.Duration) *Sessions + func (s *Sessions) Cleanup() + func (s *Sessions) Delete(id string) + func (s *Sessions) Get(id string) *Session