-
Notifications
You must be signed in to change notification settings - Fork 67
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
fix user access token deletion (fix #186) #205
Conversation
Signed-off-by: João Vanzuita <joaovanzuita@me.com>
internal/commands/token/rm.go
Outdated
fmt.Fprintf(streams.Out(), ansi.Warn("WARNING: This action is irreversible.")+` | ||
By confirming, you will permanently delete the access token. | ||
Deleting a token will invalidate your credentials on all Docker clients currently authenticated with this token. | ||
By confirming, you will permanently revoke and delete the access token. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic looks good to me, just a small change needed in the warning message 👍
Thanks for your PR @converge 🙏
Signed-off-by: João Vanzuita <joaovanzuita@me.com>
Tks again for the review, these little details make a good difference in the overall user experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
- What I did
As reported on #186, user token deletion is failing to delete user access tokens. The issue is caused by the missing username at the
hubClient.AuthConfig.Username
struct field, the confirmation step looks for the username to confirm, but the username information is empty/not set.- How I did it
At initialization, the
auth, err := store.GetAuth()
is called, I got it in advance, and provided the authorization data to the struct.- How to verify it
hub-tool token create
hub-tool token rm uuid-token
- Description for the changelog
Fix user token deletion by adding missing authorization data to the hubClient.
- A picture of a cute animal (not mandatory)