cmd/route-cli: implement 'route token inspect'
This commit is contained in:
parent
7927c4d4f3
commit
026f061b0a
|
@ -320,6 +320,16 @@ retry_netrc:
|
|||
fmt.Printf("Your token is: %s\n", ftkn.Body)
|
||||
fmt.Printf("It has permission for the following scopes: %v\n", ftkn.Scopes)
|
||||
|
||||
return
|
||||
|
||||
case "token inspect":
|
||||
tkn, err := tc.Get(ctx, &proto.GetTokenRequest{Id: *tokenInspectID})
|
||||
if err != nil {
|
||||
ln.FatalErr(ctx, err, ln.Action("fetch token from server"), ln.F{"token_id": *tokenInspectID})
|
||||
}
|
||||
|
||||
json.NewEncoder(os.Stdout).Encode(tkn)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue