Adrian Sutton wrote:
> No authentication required (because a request hasn't yet been made or
> because there was no 401 response): return null.
>
> Basic or Digest: return UsernamePasswordCredentials.class
>
> NTLM authentication: return NTCredentials.class
>
> Unsupported authentication scheme
>Is there a case for returning a class object, as opposed to just returning
>"Basic", "Digest" or "NTLM" (or null).
Not a particularly good one. It would be useful to know the actual class
required for when pluggable authentication modules come in, but there isn't
much chance of being able to pr
>Would people agree to adding a method that returns the Class required for
>authentication? I'd suggest it should go into HttpState since that's where
>the credentials are set. It would have the following cases:
Just to clarify, it would obviously take the name of the realm as an
argument as p
HttpClient has the ability to use different Credential classes for different
authentication schemes (and is required for NTLM), however there is
currently no way to find out which class is required when authenticating
without pulling out the WWW-Authenticate header and parsing it.
Would people ag