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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user