org.openqa.jetty.http
Class DigestAuthenticator
java.lang.Object
org.openqa.jetty.http.DigestAuthenticator
- All Implemented Interfaces:
- java.io.Serializable, Authenticator
- Direct Known Subclasses:
- DigestAuthenticator
public class DigestAuthenticator
- extends java.lang.Object
- implements Authenticator
DIGEST authentication.
- Version:
- $Id: DigestAuthenticator.java,v 1.16 2005/08/13 00:01:24 gregwilkins Exp $
- Author:
- Greg Wilkins (gregw)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxNonceAge
protected long maxNonceAge
nonceSecret
protected long nonceSecret
useStale
protected boolean useStale
DigestAuthenticator
public DigestAuthenticator()
authenticate
public java.security.Principal authenticate(UserRealm realm,
java.lang.String pathInContext,
HttpRequest request,
HttpResponse response)
throws java.io.IOException
- Description copied from interface:
Authenticator
- Authenticate.
- Specified by:
authenticate
in interface Authenticator
- Parameters:
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.
- Returns:
- UserPrinciple if authenticated or null if not. If
Authentication fails, then the authenticator may have committed
the response as an auth challenge or redirect.
- Throws:
java.io.IOException
getAuthMethod
public java.lang.String getAuthMethod()
- Specified by:
getAuthMethod
in interface Authenticator
sendChallenge
public void sendChallenge(UserRealm realm,
HttpRequest request,
HttpResponse response,
boolean stale)
throws java.io.IOException
- Throws:
java.io.IOException
newNonce
public java.lang.String newNonce(HttpRequest request)
checkNonce
public int checkNonce(java.lang.String nonce,
HttpRequest request)
- Parameters:
nonce
- request
-
- Returns:
- -1 for a bad nonce, 0 for a stale none, 1 for a good nonce
getMaxNonceAge
public long getMaxNonceAge()
- Returns:
- Returns the maxNonceAge.
setMaxNonceAge
public void setMaxNonceAge(long maxNonceAge)
- Parameters:
maxNonceAge
- The maxNonceAge to set.
getNonceSecret
public long getNonceSecret()
- Returns:
- Returns the nonceSecret.
setNonceSecret
public void setNonceSecret(long nonceSecret)
- Parameters:
nonceSecret
- The nonceSecret to set.
setUseStale
public void setUseStale(boolean us)
getUseStale
public boolean getUseStale()
Copyright © 2012. All Rights Reserved.