| java.lang.Object sun.net.www.protocol.http.AuthenticationHeader
AuthenticationHeader | public class AuthenticationHeader (Code) | | This class is used to parse the information in WWW-Authenticate: and Proxy-Authenticate:
headers. It searches among multiple header lines and within each header line
for the best currently supported scheme. It can also return a HeaderParser
containing the challenge data for that particular scheme.
Some examples:
WWW-Authenticate: Basic realm="foo" Digest realm="bar" NTLM
Note the realm parameter must be associated with the particular scheme.
or
WWW-Authenticate: Basic realm="foo"
WWW-Authenticate: Digest realm="foo",qop="auth",nonce="thisisanunlikelynonce"
WWW-Authenticate: NTLM
or
WWW-Authenticate: Basic realm="foo"
WWW-Authenticate: NTLM ASKAJK9893289889QWQIOIONMNMN
The last example shows how NTLM breaks the rules of rfc2617 for the structure of
the authentication header. This is the reason why the raw header field is used for ntlm.
At present, the class chooses schemes in following order :
1. Digest 2. NTLM (if supported) 3. Basic
|
Inner Class :static class SchemeMapValue | |
AuthenticationHeader | public AuthenticationHeader(String hdrname, MessageHeader response)(Code) | | parse a set of authentication headers and choose the preferred scheme
that we support
|
headerParser | public HeaderParser headerParser()(Code) | | return a header parser containing the preferred authentication scheme (only).
The preferred scheme is the strongest of the schemes proposed by the server.
The returned HeaderParser will contain the relevant parameters for that scheme
|
isPresent | public boolean isPresent()(Code) | | returns true is the header exists and contains a recognised scheme
|
scheme | public String scheme()(Code) | | return the name of the preferred scheme
|
|
|