selector: use custom domain (#1760)
* util/wrapper: improve auth errors * client: add network call option * client/selector: add domain select option * client/grpc: pass network option to selector
This commit is contained in:
@@ -222,10 +222,10 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
|
||||
ctx = metadata.Set(ctx, "Micro-Namespace", ns)
|
||||
}
|
||||
|
||||
// Check the issuer matches the services namespace. TODO: Stop allowing go.micro to access
|
||||
// Check the issuer matches the services namespace. TODO: Stop allowing micro to access
|
||||
// any namespace and instead check for the server issuer.
|
||||
if account != nil && account.Issuer != ns && account.Issuer != "micro" {
|
||||
return errors.Forbidden(req.Service(), "Account was not issued by %v", ns)
|
||||
return errors.Forbidden(req.Service(), "Account was issued by %v, not %v", account.Issuer, ns)
|
||||
}
|
||||
|
||||
// construct the resource
|
||||
|
Reference in New Issue
Block a user