public class DigestAuthenticator extends java.lang.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 |
---|---|
java.security.Principal |
authenticate(UserRealm realm,
java.lang.String pathInContext,
HttpRequest request,
HttpResponse response)
Authenticate.
|
int |
checkNonce(java.lang.String nonce,
HttpRequest request) |
java.lang.String |
getAuthMethod() |
long |
getMaxNonceAge() |
long |
getNonceSecret() |
boolean |
getUseStale() |
java.lang.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 java.security.Principal authenticate(UserRealm realm, java.lang.String pathInContext, HttpRequest request, HttpResponse response) throws java.io.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.java.io.IOException
public java.lang.String getAuthMethod()
getAuthMethod
in interface Authenticator
public void sendChallenge(UserRealm realm, HttpRequest request, HttpResponse response, boolean stale) throws java.io.IOException
java.io.IOException
public java.lang.String newNonce(HttpRequest request)
public int checkNonce(java.lang.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 © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.