Add credential-free sample mode with sample data, README, and doc reconciliation

This commit is contained in:
Ian Gulliver
2026-08-16 13:14:30 -07:00
parent 2b6e77c766
commit 8c9c1a6cd6
12 changed files with 166 additions and 75 deletions
+6
View File
@@ -39,6 +39,12 @@ func Email(r *http.Request) string {
return email
}
func Fixed(email string, next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
next.ServeHTTP(w, r.WithContext(context.WithValue(r.Context(), contextKey{}, email)))
})
}
func (a *Auth) Register(mux *http.ServeMux) {
mux.HandleFunc("POST /auth/login", a.login)
mux.HandleFunc("POST /auth/logout", a.logout)