public class DigestAuthenticator extends Object implements Authenticator
| Modifier and Type | Field and Description |
|---|---|
protected long |
maxNonceAge |
protected long |
nonceSecret |
protected boolean |
useStale |
| Constructor and Description |
|---|
DigestAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
Principal |
authenticate(UserRealm realm,
String pathInContext,
HttpRequest request,
HttpResponse response)
Authenticate.
|
int |
checkNonce(String nonce,
HttpRequest request) |
String |
getAuthMethod() |
long |
getMaxNonceAge() |
long |
getNonceSecret() |
boolean |
getUseStale() |
String |
newNonce(HttpRequest request) |
void |
sendChallenge(UserRealm realm,
HttpRequest request,
HttpResponse response,
boolean stale) |
void |
setMaxNonceAge(long maxNonceAge) |
void |
setNonceSecret(long nonceSecret) |
void |
setUseStale(boolean us) |
protected long maxNonceAge
protected long nonceSecret
protected boolean useStale
public Principal authenticate(UserRealm realm, String pathInContext, HttpRequest request, HttpResponse response) throws IOException
Authenticatorauthenticate in interface Authenticatorrealm - an UserRealm valuepathInContext - a String valuerequest - a HttpRequest valueresponse - a HttpResponse value. If non-null response is passed,
then a failed authentication will result in a challenge response being
set in the response.IOExceptionpublic String getAuthMethod()
getAuthMethod in interface Authenticatorpublic void sendChallenge(UserRealm realm, HttpRequest request, HttpResponse response, boolean stale) throws IOException
IOExceptionpublic String newNonce(HttpRequest request)
public int checkNonce(String nonce, HttpRequest request)
nonce - request - public long getMaxNonceAge()
public void setMaxNonceAge(long maxNonceAge)
maxNonceAge - The maxNonceAge to set.public long getNonceSecret()
public void setNonceSecret(long nonceSecret)
nonceSecret - The nonceSecret to set.public void setUseStale(boolean us)
public boolean getUseStale()
Copyright © 2013. All rights reserved.