diff options
author | Matt Ward <matt.ward@microsoft.com> | 2018-10-26 12:47:47 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@microsoft.com> | 2018-11-20 15:55:23 +0300 |
commit | 17066567ddd8ab3736cb18e164a9fdf1d359ae7c (patch) | |
tree | 34ecede522393139c17a1b46f4beaa2da999f48a /main/src/addins/MacPlatform/MacPlatform.csproj | |
parent | e5e948c8b11b91ded625f0c79a1e0451e6ab8389 (diff) |
[Mac] Handle basic auth protected VSTS NuGet package sources
Attempting to use a VSTS NuGet package source would prompt for
credentials but never be able to connect since the credentials were
not used in the request.
The NSUrlSessionHandler currently only supports NTLM responses.
However some WWW-Authenticate basic auth responses are not passed
to the NSUrlSessionHandlerDelegate's DidReceiveChallenge. Whilst
those that start with 'Basic' in the WWW-Authenticate header value are
passed to DidReceiveChallenge, those that start with something else,
such as Bearer, which VSTS NuGet package sources return, do not get
passed to DidReceiveChallenge. To handle this the response is checked
in the IDE and the Authorization http header is added if a credential
can be found and the request is retried again a single time. This
allows VSTS NuGet package sources
Diffstat (limited to 'main/src/addins/MacPlatform/MacPlatform.csproj')
-rw-r--r-- | main/src/addins/MacPlatform/MacPlatform.csproj | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main/src/addins/MacPlatform/MacPlatform.csproj b/main/src/addins/MacPlatform/MacPlatform.csproj index f13a15e3e8..90c11be2d6 100644 --- a/main/src/addins/MacPlatform/MacPlatform.csproj +++ b/main/src/addins/MacPlatform/MacPlatform.csproj @@ -120,6 +120,7 @@ <Compile Include="MacPlatformSettings.cs" /> <Compile Include="MacHttpMessageHandlerProvider.cs" /> <Compile Include="NSUrlSessionCredentialsHandler.cs" /> + <Compile Include="BasicAuthenticationHandler.cs" /> </ItemGroup> <ItemGroup> <None Include="packages.config" /> |