Oauth2 support

This commit is contained in:
Jamie Curnow
2024-11-06 20:33:51 +10:00
parent f23299f793
commit 208037946f
25 changed files with 529 additions and 30 deletions

View File

@ -0,0 +1,16 @@
package middleware
import (
"net/http"
"npm/internal/logger"
)
// Log will print out route information to the logger
// only when debug is enabled
func Log(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
logger.Debug("Request: %s %s", r.Method, r.URL.Path)
next.ServeHTTP(w, r)
})
}