Skip to content

Fix credentials (Windows authentication) + fallback for legacy API - #49

Merged
304NotModified merged 4 commits into
NuGetPackageExplorer:masterfrom
rikoe:fix-credentials
Feb 23, 2016
Merged

304NotModified merged 4 commits into
NuGetPackageExplorer:masterfrom
rikoe:fix-credentials

Conversation

@rikoe

@rikoe rikoe commented Feb 22, 2016

Copy link
Copy Markdown
Contributor

I created these changes in 2014 when I was trying to fix NuGetPackageExplorer to work with a local Active Directory install of ProGet.

The changes were both to be able to download packages from and push packages to the server using Windows Integrated Authentication, as supported by ProGet.

Please review and approve/discard as you see fit - hopefully we can address #16 and #4 with this.

Support loading of NuGet feeds and packages that require credentials,
e.g. a ProGet feed with Windows Authentication.
If the FindPackagesById() service is not found, fall back to the
Packages() services when loading all versions of a particular package.
This is similar to what Visual Studio does when showing packages.
@304NotModified

Copy link
Copy Markdown
Collaborator

:) thanks!

Will try to release this week a new version.

@sbochoa

sbochoa commented Feb 22, 2016

Copy link
Copy Markdown

@rikoe Hello thanks for this change but what about if im not in the domain is there a chance to popup a login dialog to enter the credentials just like visual studio does?

@rikoe

rikoe commented Feb 23, 2016

Copy link
Copy Markdown
Contributor Author

Well, you'd need to be clear about your use case. When would you use
NugetPackageExplorer and not be in the domain already?

My fix was simply for authenticating against the NuGet server with the same
credentials you are already logged in with. It's just a few lines of code
to enable capturing the user's current credentials.

What you're asking for sounds a lot more complex, effectively supporting
multiple modes of authentication. Also keep in mind that the Visual Studio
dialog you are referring to is actually quite a lot more complex than it
first appears. It is hosting a browser control that authenticates against a
hosted OAuth security provider as far as I know (if we are referring to the
same one).

If you really need what you are asking for I would suggest opening a
separate issue for it describing exactly what you are authenticating
against and how (maybe with screenshots).

We can then try and prioritise it, but if it's not a common use case you
may need to fork it and try yourself! :-)
On 22 Feb 2016 23:08, "Scharly Ochoa" [email protected] wrote:

@rikoe https://github.com/rikoe Hello thanks for this change but what
about if im not in the domain is there a chance to popup a login dialog to
enter the credentials just like visual studio does?

—
Reply to this email directly or view it on GitHub
#49 (comment)
.

@304NotModified

Copy link
Copy Markdown
Collaborator

@rikoe is this PR better than #48?

@rikoe

rikoe commented Feb 23, 2016

Copy link
Copy Markdown
Contributor Author

It is a superset of #48 - it includes the same change to PackageDownloader.cs, but adds default credentials in a bunch of other places.

The one additional thing it does, is that (at the time) ProGet used a legacy NuGet API for searching packages by id, which didn't work with NuGetPackageExplorer, so I added some code to fall back to the legacy API

@304NotModified 304NotModified changed the title Fix credentials Fix credentials + fallback for legacy API Feb 23, 2016
@304NotModified

Copy link
Copy Markdown
Collaborator

Fixes #4

304NotModified added a commit that referenced this pull request Feb 23, 2016
Fix credentials + fallback for legacy API
@304NotModified
304NotModified merged commit 457e77d into NuGetPackageExplorer:master Feb 23, 2016
@304NotModified 304NotModified added this to the 3.11 milestone Feb 23, 2016
This was referenced Feb 23, 2016
@Ebsan

Ebsan commented Apr 23, 2016

Copy link
Copy Markdown

@304NotModified 304NotModified changed the title Fix credentials + fallback for legacy API Fix credentials (Windows authentication) + fallback for legacy API Apr 24, 2016
@304NotModified

Copy link
Copy Markdown
Collaborator

Hi @WiteCastle , only Windows authentication (without login form) is currently supported.

#92

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants