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
Authenticator
authenticate
in interface Authenticator
realm
- 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.IOException
public String getAuthMethod()
getAuthMethod
in interface Authenticator
public void sendChallenge(UserRealm realm, HttpRequest request, HttpResponse response, boolean stale) throws IOException
IOException
public 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.