Skip to content

Conversation

@umohnani8
Copy link
Member

This will be used to authenticate any existing credentials
in podman login.

Signed-off-by: Urvashi Mohnani [email protected]

@umohnani8
Copy link
Member Author

@mtrmac @runcom PTAL

return "", "", nil
}

// GetUserLoggedIn returns the username logged in to registry from either
Copy link
Member

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.

Copy link
Member Author

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]>
@rhatdan
Copy link
Member

rhatdan commented Nov 30, 2018

LGTM
@mtrmac @runcom @vrothberg PTAL

@TomSweeneyRedHat
Copy link
Member

LGTM too

@mtrmac
Copy link
Collaborator

mtrmac commented Dec 1, 2018

The implementation is straightforward enough, but the function starts looking rather similar to GetAuthentication. Sure, there is a difference in the set of files used for search, still…

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)
Copy link
Member

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(...).

@umohnani8
Copy link
Member Author

@mtrmac thanks for pointing that out. This PR is no longer needed.

@umohnani8 umohnani8 closed this Dec 4, 2018
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

Successfully merging this pull request may close these issues.

5 participants