Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to show logged in user #13

Open
stehessel opened this issue Apr 5, 2022 · 2 comments
Open

Command to show logged in user #13

stehessel opened this issue Apr 5, 2022 · 2 comments

Comments

@stehessel
Copy link

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 or obsctl account show should return either the logged in user or Anonymous.

@saswatamcode
Copy link
Member

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? 🙂

@stehessel
Copy link
Author

stehessel commented Apr 8, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants