-
Notifications
You must be signed in to change notification settings - Fork 395
Return password of user logged in as well #535
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
Conversation
pkg/docker/config/config.go
Outdated
| return "", "", nil | ||
| } | ||
|
|
||
| // GetUserLoggedIn returns the username logged in to registry from either |
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.
The comment mentions returning the username, but doesn't mention returning the password too and probably should.
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.
Fixed. Thanks for pointing it out :)
This will be used to authenticate any existing credentials in podman login. Signed-off-by: Urvashi Mohnani <[email protected]>
|
LGTM |
|
LGTM too |
|
The implementation is straightforward enough, but the function starts looking rather similar to While the reason for returning the credential is containers/podman#1905 , I don’t understand how that works / what it does: containers/podman#1905 (comment) — and that might influence what the API of this module should be. |
| return "", "", err | ||
| } | ||
| username, _, _ := findAuthentication(registry, path, false) | ||
| username, password, _ := findAuthentication(registry, path, false) |
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.
I think we should not ignore the error from findAuthentication(...).
|
@mtrmac thanks for pointing that out. This PR is no longer needed. |
This will be used to authenticate any existing credentials
in podman login.
Signed-off-by: Urvashi Mohnani [email protected]