diff --git a/internal/auth/middleware.go b/internal/auth/middleware.go index 13e5b60..debbeb6 100644 --- a/internal/auth/middleware.go +++ b/internal/auth/middleware.go @@ -29,10 +29,7 @@ func CtxUser(ctx context.Context) (*User, error) { return user, nil } -var ( - ErrUnauthenticated = errors.New("unauthenticated") - ErrForbidden = errors.New("forbidden") -) +var ErrUnauthenticated = errors.New("unauthenticated") type User interface { Subject() string @@ -55,7 +52,7 @@ func Middleware(authenticators ...Authenticator) func(http.Handler) http.Handler for _, auth := range authenticators { user, err = auth.Authenticate(ctx, r) if err != nil { - logger.Warn(ctx, "could not authenticate request", logger.E(errors.WithStack(err))) + logger.Debug(ctx, "could not authenticate request", logger.E(errors.WithStack(err))) continue }