From 857fc8bd77e36a45b249b83419c7ba3dde2b792a Mon Sep 17 00:00:00 2001 From: wikiapiserver Date: Thu, 25 Jun 2026 14:59:59 +0200 Subject: feat: GET /token?username=... returns access_token and valid_until Returns the stored access_token and the timestamp when it was created (access_token_created). Returns 401 for unknown users. --- main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'main.go') diff --git a/main.go b/main.go index 6662d90..f2cf44d 100644 --- a/main.go +++ b/main.go @@ -86,6 +86,7 @@ func main() { mux.HandleFunc("POST /login", handler.Login) mux.HandleFunc("POST /refresh", handler.Refresh) mux.HandleFunc("GET /health", handler.Health) + mux.HandleFunc("GET /token", handler.GetToken) addr := fmt.Sprintf(":%d", cfg.Server.Port) srv := &http.Server{ -- cgit v1.2.3