Fixes for CLI login
This commit is contained in:
parent
84a7cab60b
commit
c5e30c0e6e
2
grpc.go
2
grpc.go
@ -141,7 +141,7 @@ func (g *grpcClient) call(ctx context.Context, node *registry.Node, req client.R
|
||||
// fall back to using the authorization token set in config,
|
||||
// this enables the CLI to provide a token
|
||||
if len(header["authorization"]) == 0 {
|
||||
if token, err := config.Get("token"); err == nil && len(token) > 0 {
|
||||
if token, err := config.Get("micro", "auth", "token"); err == nil && len(token) > 0 {
|
||||
header["authorization"] = auth.BearerScheme + token
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user