/** * Checks if nonce date is valid and if it is in the max age boundary. Other checks are delegated to {@link #seen(java.util.Date, String, String)} */ public synchronized int seen(String opUrl, String nonce) { if (DEBUG) { _log.debug("Verifying nonce: " + nonce); } Date now = new Date(); try { Date nonceDate = _dateFormat.parse(nonce); if (isTooOld(now, nonceDate)) { _log.warn("Nonce is too old: " + nonce); return TOO_OLD; } return seen(now, opUrl, nonce); } catch (ParseException e) { _log.error("Error verifying the nonce: " + nonce, e); return INVALID_TIMESTAMP; } }
/** * Checks if nonce date is valid and if it is in the max age boundary. Other checks are delegated to {@link #seen(java.util.Date, String, String)} */ public synchronized int seen(String opUrl, String nonce) { if (DEBUG) _log.debug("Verifying nonce: " + nonce); Date now = new Date(); try { Date nonceDate = _dateFormat.parse(nonce); if (isTooOld(now, nonceDate)) { _log.warn("Nonce is too old: " + nonce); return TOO_OLD; } return seen(now, opUrl, nonce); } catch (ParseException e) { _log.error("Error verifying the nonce: " + nonce, e); return INVALID_TIMESTAMP; } }
/** * Checks if nonce date is valid and if it is in the max age boundary. Other checks are delegated to {@link #seen(java.util.Date, String, String)} */ public synchronized int seen(String opUrl, String nonce) { if (DEBUG) _log.debug("Verifying nonce: " + nonce); Date now = new Date(); try { Date nonceDate = _dateFormat.parse(nonce); if (isTooOld(now, nonceDate)) { _log.warn("Nonce is too old: " + nonce); return TOO_OLD; } return seen(now, opUrl, nonce); } catch (ParseException e) { _log.error("Error verifying the nonce: " + nonce, e); return INVALID_TIMESTAMP; } }
/** * Checks if nonce date is valid and if it is in the max age boundary. Other checks are delegated to {@link #seen(java.util.Date, String, String)} */ public synchronized int seen(String opUrl, String nonce) { if (DEBUG) _log.debug("Verifying nonce: " + nonce); Date now = new Date(); try { Date nonceDate = _dateFormat.parse(nonce); if (isTooOld(now, nonceDate)) { _log.warn("Nonce is too old: " + nonce); return TOO_OLD; } return seen(now, opUrl, nonce); } catch (ParseException e) { _log.error("Error verifying the nonce: " + nonce, e); return INVALID_TIMESTAMP; } }
/** * Checks if nonce date is valid and if it is in the max age boundary. Other checks are delegated to {@link #seen(java.util.Date, String, String)} */ public synchronized int seen(String opUrl, String nonce) { if (DEBUG) _log.debug("Verifying nonce: " + nonce); Date now = new Date(); try { Date nonceDate = _dateFormat.parse(nonce); if (isTooOld(now, nonceDate)) { _log.warn("Nonce is too old: " + nonce); return TOO_OLD; } return seen(now, opUrl, nonce); } catch (ParseException e) { _log.error("Error verifying the nonce: " + nonce, e); return INVALID_TIMESTAMP; } }