add user identification

This commit is contained in:
2025-04-07 22:08:46 -04:00
parent a578beea0d
commit 32bfd109b9
2 changed files with 38 additions and 0 deletions

View File

@@ -36,6 +36,12 @@ func Start() {
panic("oh no")
})
r.Route("/whoami", func(r chi.Router) {
r.Use(SessionAuthMiddleware)
r.Use(LoginCtx)
r.Get("/", Whoami)
})
r.Route("/messages", func(r chi.Router) {
r.Use(SessionAuthMiddleware) // Protect with authentication