feat: added logout handler

This commit is contained in:
2026-08-21 13:49:47 +02:00
parent a5860c5079
commit 5e23d9cc9f
5 changed files with 102 additions and 2 deletions
+4 -1
View File
@@ -33,8 +33,11 @@ func NewMux(cfg Config) http.Handler {
apiMux := http.NewServeMux()
apiMux.HandleFunc("/", handler.DefaultHandler)
apiMux.HandleFunc("GET /health", handler.HealthHandler)
apiMux.HandleFunc("POST /login", authHandler.Login)
apiMux.HandleFunc("POST /auth/refresh", authHandler.Refresh)
apiMux.HandleFunc("POST /login/refresh", authHandler.Refresh)
apiMux.HandleFunc("POST /logout", authHandler.Logout)
apiMux.HandleFunc("POST /logout/all", authHandler.LogoutAllDevices)
apiMux.Handle("POST /users", protected(userHandler.CreateUser))