Open stehessel opened 2 years ago
I think we can output the current context here using obsctl context current
which would show the name of the API and currently logged-in tenant. Is that what you are looking for here? 🙂
Ah precisely, missed that option. Just tested it and the behavior is a bit weird
obsctl login ... --tenant=rhacs
obsctl logout --tenant=rhacs # would be nice if it works without specifying tenant if there is only one
obsctl context current
Error: tenant with name rhacs doesn't exist in api staging
...
I think it should just state Anonymous
or No context
or something like that.
CLI tools with
login / logout
commands often include commands to show the currently logged in user (see e.g. the Azure CLI tool https://docs.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest).So something like
obsctl whoami
orobsctl account show
should return either the logged in user orAnonymous
.