|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.impl.auth.AuthSchemeBase org.apache.http.impl.auth.RFC2617Scheme org.apache.http.impl.auth.DigestScheme
public class DigestScheme
Digest authentication scheme as defined in RFC 2617. Both MD5 (default) and MD5-sess are supported. Currently only qop=auth or no qop is supported. qop=auth-int is unsupported. If auth and auth-int are provided, auth is used.
Since the digest username is included as clear text in the generated Authentication header, the charset of the username must be compatible with the HTTP element charset used by the connection.
Field Summary |
---|
Fields inherited from class org.apache.http.impl.auth.AuthSchemeBase |
---|
challengeState |
Constructor Summary | |
---|---|
DigestScheme()
|
|
DigestScheme(ChallengeState challengeState)
Deprecated. (4.3) do not use. |
|
DigestScheme(Charset credentialsCharset)
|
Method Summary | |
---|---|
org.apache.http.Header |
authenticate(Credentials credentials,
org.apache.http.HttpRequest request)
Deprecated. (4.2) Use ContextAwareAuthScheme.authenticate(
Credentials, HttpRequest, org.apache.http.protocol.HttpContext) |
org.apache.http.Header |
authenticate(Credentials credentials,
org.apache.http.HttpRequest request,
org.apache.http.protocol.HttpContext context)
Produces a digest authorization string for the given set of Credentials , method name and URI. |
static String |
createCnonce()
Creates a random cnonce value based on the current time. |
String |
getSchemeName()
Returns textual designation of the digest authentication scheme. |
boolean |
isComplete()
Tests if the Digest authentication process has been completed. |
boolean |
isConnectionBased()
Returns false . |
void |
overrideParamter(String name,
String value)
|
void |
processChallenge(org.apache.http.Header header)
Processes the Digest challenge. |
String |
toString()
|
Methods inherited from class org.apache.http.impl.auth.RFC2617Scheme |
---|
getCredentialsCharset, getParameter, getParameters, getRealm, parseChallenge |
Methods inherited from class org.apache.http.impl.auth.AuthSchemeBase |
---|
getChallengeState, isProxy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DigestScheme(Charset credentialsCharset)
@Deprecated public DigestScheme(ChallengeState challengeState)
DigestScheme
with the given challenge
state.
public DigestScheme()
Method Detail |
---|
public void processChallenge(org.apache.http.Header header) throws MalformedChallengeException
processChallenge
in interface AuthScheme
processChallenge
in class AuthSchemeBase
header
- the challenge header
MalformedChallengeException
- is thrown if the authentication challenge
is malformedpublic boolean isComplete()
true
if Digest authorization has been processed,
false
otherwise.public String getSchemeName()
digest
public boolean isConnectionBased()
false
. Digest authentication scheme is request based.
false
.public void overrideParamter(String name, String value)
@Deprecated public org.apache.http.Header authenticate(Credentials credentials, org.apache.http.HttpRequest request) throws AuthenticationException
ContextAwareAuthScheme.authenticate(
Credentials, HttpRequest, org.apache.http.protocol.HttpContext)
AuthScheme
Credentials
.
credentials
- The set of credentials to be used for athenticationrequest
- The request being authenticated
AuthenticationException
- if authorization string cannot
be generated due to an authentication failurepublic org.apache.http.Header authenticate(Credentials credentials, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws AuthenticationException
Credentials
, method name and URI.
authenticate
in interface ContextAwareAuthScheme
authenticate
in class AuthSchemeBase
credentials
- A set of credentials to be used for athenticationrequest
- The request being authenticatedcontext
- HTTP context
InvalidCredentialsException
- if authentication credentials
are not valid or not applicable for this authentication scheme
AuthenticationException
- if authorization string cannot
be generated due to an authentication failurepublic static String createCnonce()
public String toString()
toString
in class AuthSchemeBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |