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

Enhance the login task. #6586

Merged
merged 2 commits into from Oct 3, 2018

Conversation

Projects
None yet
3 participants
@benjyw
Copy link
Contributor

benjyw commented Oct 3, 2018

  • If the attempt to auth with .netrc creds fails with
    a basic auth challenge, respond to that challenge by
    prompting the user for creds.

  • Check that basic auth is only attempted over secure urls (addresses #6496)

  • Make the login task a ConsoleTask.

  • Remove the underscore in the scope name (safe to do as no one is using login yet). Dashes, or nothing, are a better style for scopes, otherwise they look weird in cmd-line flags.

  • Some documentation and message fixes.

Enhance the login task.
- If the attempt to auth with .netrc creds fails with
  a basic auth challenge, respond to that challenge by
  prompting the user for creds.

- Check that basic auth is only attempted over secure urls.

- Some documentation and message fixes.
@jsirois

jsirois approved these changes Oct 3, 2018

Copy link
Member

jsirois left a comment

It's getting to the point where a test for the task would be good, but this looks great to me.

@benjyw

This comment has been minimized.

Copy link
Contributor

benjyw commented Oct 3, 2018

Well, BasicAuth.authenticate() is tested, both with and without creds, so the only thing not tested is the top-level control flow. But that did remind me to add a test proving that authing with the wrong creds does actually fail on the client...

@jsirois

jsirois approved these changes Oct 3, 2018

@benjyw benjyw merged commit b2fbf43 into pantsbuild:master Oct 3, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@benjyw benjyw deleted the benjyw:login_tweaks branch Oct 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment