Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-04-25 00:44:33 +0000
committerGreg Wilkins2013-04-25 00:44:33 +0000
commitdbedbfa67e2ccfb41cb41de6f6bb65961a5ea315 (patch)
tree6a0fde05ddecc678136d6d36d9d45afa453fff15
parent9f0fabe951dc0d81602a48d82b8dc959bd70d6ff (diff)
downloadorg.eclipse.jetty.project-dbedbfa67e2ccfb41cb41de6f6bb65961a5ea315.tar.gz
org.eclipse.jetty.project-dbedbfa67e2ccfb41cb41de6f6bb65961a5ea315.tar.xz
org.eclipse.jetty.project-dbedbfa67e2ccfb41cb41de6f6bb65961a5ea315.zip
406437 Digest Auth supports out of order nc
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java
index 5abd9113b5..0fe374774b 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java
@@ -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);
+ }
}
/* ------------------------------------------------------------ */

Back to the top