|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsun.net.www.protocol.http.AuthenticationHeader
public class AuthenticationHeader
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
| Constructor Summary | |
|---|---|
AuthenticationHeader(String hdrname,
MessageHeader response)
parse a set of authentication headers and choose the preferred scheme that we support |
|
| Method Summary | |
|---|---|
HeaderParser |
headerParser()
return a header parser containing the preferred authentication scheme (only). |
boolean |
isPresent()
returns true is the header exists and contains a recognised scheme |
String |
raw()
|
String |
scheme()
return the name of the preferred scheme |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthenticationHeader(String hdrname,
MessageHeader response)
| Method Detail |
|---|
public HeaderParser headerParser()
public String scheme()
public String raw()
public boolean isPresent()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||