406437 Digest Auth supports out of order nc

This commit is contained in:
Greg Wilkins 2013-04-25 10:44:33 +10:00
parent 9f0fabe951
commit dbedbfa67e
1 changed files with 7 additions and 2 deletions

View File

@ -26,7 +26,6 @@ import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
@ -54,7 +53,8 @@ import org.eclipse.jetty.util.security.Credential;
* @version $Rev: 4793 $ $Date: 2009-03-19 00:00:01 +0100 (Thu, 19 Mar 2009) $
*
* The nonce max age in ms can be set with the {@link SecurityHandler#setInitParameter(String, String)}
* using the name "maxNonceAge"
* using the name "maxNonceAge". The nonce max count can be set with {@link SecurityHandler#setInitParameter(String, String)}
* using the name "maxNonceCount". When the age or count is exceeded, the nonce is considered stale.
*/
public class DigestAuthenticator extends LoginAuthenticator
{
@ -110,6 +110,11 @@ public class DigestAuthenticator extends LoginAuthenticator
{
_maxNonceAgeMs=Long.valueOf(mna);
}
String mnc=configuration.getInitParameter("maxNonceCount");
if (mnc!=null)
{
_maxNC=Integer.valueOf(mnc);
}
}
/* ------------------------------------------------------------ */