Error when proxy server offers multiple authentication methods
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am behind a corporate proxy server with password authentication. Our proxy server offers multiple authentication methods. It's message is:
Proxy-Authenticate: NEGOTIATE,NTLM,BASIC realm="abcde"
In this case websocket-sharp fails to connect because the method Parse expects exactly one authentication method offered by the proxy server.
I made a workaround by using a string search. Can you include it in the master version?
internal static AuthenticationChallenge Parse (string value)
{
var chal = value.Split (new[] { ' ' }, 2);
if (chal.Length != 2)
return null;
var schm = chal[0].ToLower();
return schm.Contains("basic")
? new AuthenticationChallenge(
AuthenticationSchemes.Basic, ParseParameters(chal[1]))
: schm.Contains("digest")
? new AuthenticationChallenge(
AuthenticationSchemes.Digest, ParseParameters(chal[1]))
: null;
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the repository for AuthenticationChallenge.Parse and inspect how proxy authentication headers are processed. Verify the behavior with a Proxy-Authenticate header containing multiple methods, including the reported NEGOTIATE,NTLM,BASIC value; done means a supported Basic or Digest method can still be selected instead of returning no challenge.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100