1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-09-16 08:36:30 +02:00

Return a 401 error on invalid auth tokens (#1184)

This commit is contained in:
ben-toogood
2020-02-11 11:22:22 +00:00
committed by GitHub
parent 8ea84ac3eb
commit 4a03183481

View File

@@ -172,7 +172,7 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
// Validate the token
if _, err := a.Validate(token); err != nil {
return err
return errors.Unauthorized("go.micro.auth", err.Error())
}
return h(ctx, req, rsp)