protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) _log.debug("Nonce verified: " + nonce); return OK; }
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) { _log.debug("Nonce verified: " + nonce); } return OK; }
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) _log.debug("Nonce verified: " + nonce); return OK; }
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) _log.debug("Nonce verified: " + nonce); return OK; }
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) _log.debug("Nonce verified: " + nonce); return OK; }