@NotThreadSafe public class DigestScheme extends RFC2617Scheme
Constructor and Description |
---|
DigestScheme() |
DigestScheme(ChallengeState challengeState)
Deprecated.
(4.3) do not use.
|
DigestScheme(Charset credentialsCharset) |
Modifier and Type | Method and Description |
---|---|
Header |
authenticate(Credentials credentials,
HttpRequest request)
|
Header |
authenticate(Credentials credentials,
HttpRequest request,
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(Header header)
Processes the Digest challenge.
|
String |
toString() |
getCredentialsCharset, getParameter, getParameters, getRealm, parseChallenge
getChallengeState, isProxy
public DigestScheme(Charset credentialsCharset)
@Deprecated public DigestScheme(ChallengeState challengeState)
public DigestScheme()
public void processChallenge(Header header) throws MalformedChallengeException
processChallenge
in interface AuthScheme
processChallenge
in class AuthSchemeBase
header
- the challenge headerMalformedChallengeException
- is thrown if the authentication challenge
is malformedpublic boolean isComplete()
public String getSchemeName()
digest
public boolean isConnectionBased()
@Deprecated public Header authenticate(Credentials credentials, 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 authenticatedAuthenticationException
- if authorization string cannot
be generated due to an authentication failurepublic Header authenticate(Credentials credentials, HttpRequest request, 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 contextInvalidCredentialsException
- if authentication credentials
are not valid or not applicable for this authentication schemeAuthenticationException
- if authorization string cannot
be generated due to an authentication failurepublic static String createCnonce()
public String toString()
toString
in class AuthSchemeBase
Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.