Sitelet https://github.com/fsprojects/Paket/pull/2781
Skip to content

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

Merged
forki merged 2 commits into
fsprojects:masterfrom
ruhullahshah:credential_url_verify_feature
Sep 21, 2017
Merged

forki merged 2 commits into
fsprojects:masterfrom
ruhullahshah:credential_url_verify_feature

Conversation

@ruhullahshah

Copy link
Copy Markdown
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.


/// 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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment thread src/Paket.Core/Versioning/ConfigFile.fs Outdated

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should use tracef

@forki forki left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

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

@forki

forki commented Sep 21, 2017

Copy link
Copy Markdown
Member

thx!

@forki
forki merged commit dddf2b2 into fsprojects:master Sep 21, 2017
@ruhullahshah

Copy link
Copy Markdown
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.

2 participants