Return a 401 error on invalid auth tokens (#1184)
This commit is contained in:
parent
8ea84ac3eb
commit
4a03183481
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user