-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement HTTP Basic Authentication #11
Conversation
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.
Looks good!
The last thing I'd like to do for the pull request before taking it out of draft mode is adding more test coverage to the I'm also going to double check to make sure that there isn't anything buried in the "conda" API that would allow me to update the |
|
||
|
||
@group.command("logout") | ||
@click.argument("channel", callback=validate_channel) | ||
def logout(channel): | ||
@click.argument("channel", callback=parse_channel) |
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.
Do channels ever have multiple/separate users? In that case, having a --username
option here would be good (but I'm not sure if this is something that is necessary)
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.
That's a fair question, and I thought about this too. We could support this, but I don't know how many people are actually doing this.
I would just leave it open as a possibility for something to implement in the future if requested.
Fixes: #5
Additional information
This pull request attempts to make the user experience around logging in and out better. Before these changes, users were expected to manually edit and configure their
.condarc
files before logging in and out. I felt this was a cumbersome step and wanted to see what I could do to fix it.The solution I came up with was giving the conda-auth plugin the ability to edit the
.condarc
file itself. The information that is written to the.condarc
is then later used by normal conda commands.For example, when a user logs in to a HTTP Basic Authentication channel with the following command:
The following information will be automatically saved to their
.condarc
file:The password is then saved using "keyring".
For future authentication types, we will then try our best to infer what type of authentication is being used so that we can avoid having to make users manually specify this.