Split apart comms logic into platform-lever funcs

This commit is contained in:
Eli Ribble 2026-03-09 15:03:01 +00:00
parent 2f7ecdfae8
commit 884634a2d7
No known key found for this signature in database
9 changed files with 232 additions and 204 deletions

View file

@ -89,7 +89,7 @@ func (ea *EnsureAuth) ServeHTTP(w http.ResponseWriter, r *http.Request) {
var msg []byte
// Separate return codes for different authentication failures
if _, ok := err.(*NoCredentialsError); ok {
fmt.Println("No credentials present and no session")
log.Info().Msg("No credentials present and no session")
w.Header().Set("WWW-Authenticate-Error", "no-credentials")
msg = []byte("Please provide credentials.\n")
} else if _, ok := err.(*NoUserError); ok {