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,
Request request,
Response response)
Authenticate.
|
int |
checkNonce(String nonce,
Request request) |
String |
getAuthMethod() |
long |
getMaxNonceAge() |
long |
getNonceSecret() |
boolean |
getUseStale() |
String |
newNonce(Request request) |
void |
sendChallenge(UserRealm realm,
Request request,
Response 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, Request request, Response response) throws IOException
Authenticator
authenticate
in interface Authenticator
realm
- an UserRealm
valuepathInContext
- a String
valuerequest
- a Request
valueresponse
- a Response
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, Request request, Response response, boolean stale) throws IOException
IOException
public int checkNonce(String nonce, Request 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 © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.