Skip to content
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

Adding feature to verify the URL and credential correctness before storing them in paket.config #2781

Merged
merged 2 commits into from
Sep 21, 2017

Conversation

ruhullahshah
Copy link
Contributor

While adding a source and its credentials to paket.config, it often happens that there are typos or the credentials do not authenticate, in that case adding these credentials and sources to paket.config becomes pointless. So we propose to have --verify option to augment the config command. It verifies the URL for the source and the credentials are correct.

@@ -165,10 165,10 @@ type Dependencies(dependenciesFileName: string) =
projectName, installAfter, runResolver))

/// Adds credentials for a Nuget feed
member this.AddCredentials(source: string, username: string, password : string, authType : string) : unit =
member this.AddCredentials(source: string, username: string, password : string, authType : string, verify : bool) : unit =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is in the PublicAPI and would be breaking.
We need a second function and keep the old one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


let authResult =
if verify then
Console.WriteLine "Verifying the source URL and credentials..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use tracef

Copy link
Member

@forki forki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool stuff. only minor comments

@ruhullahshah
Copy link
Contributor Author

Thanks. I will update the code with the requested changes.

@forki
Copy link
Member

forki commented Sep 21, 2017

thx!

@forki forki merged commit dddf2b2 into fsprojects:master Sep 21, 2017
@ruhullahshah
Copy link
Contributor Author

You are welcome and thanks for the quick review, subsequent merge

@ruhullahshah ruhullahshah deleted the credential_url_verify_feature branch September 21, 2017 08:23
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.

None yet

2 participants