public void validate(Digest digest, String systemRealm, String key) throws DigestValidationException { throw new DigestValidationException("Mandatory field 'realm' not specified"); if (digest.getNonce() == null) throw new DigestValidationException("Mandatory field 'nonce' not specified"); if (digest.getUri() == null) throw new DigestValidationException("Mandatory field 'uri' not specified"); if (digest.getClientNonce() == null) throw new DigestValidationException("Mandatory field 'response' not specified"); throw new DigestValidationException("Mandatory field 'nc' not specified"); throw new DigestValidationException("Mandatory field 'cnonce' not specified"); throw new DigestValidationException("Nonce should provide two tokens - nonce received: " + digest.getNonce()); throw new DigestValidationException("Realm name [" + digest.getRealm() + "] does not match system realm name [" + systemRealm + "]"); nonceExpiry = new Long(nonceTokens[0]).longValue(); } catch (NumberFormatException nfe) { throw new DigestValidationException("First nonce token should be numeric, but was: " + nonceTokens[0]); throw new DigestValidationException("Nonce has expired", true); throw new DigestValidationException("Nonce token invalid: " + nonceAsText);
public void validate(Digest digest, String systemRealm, String key) throws DigestValidationException { throw new DigestValidationException("Mandatory field 'realm' not specified"); if (digest.getNonce() == null) throw new DigestValidationException("Mandatory field 'nonce' not specified"); if (digest.getUri() == null) throw new DigestValidationException("Mandatory field 'uri' not specified"); if (digest.getClientNonce() == null) throw new DigestValidationException("Mandatory field 'response' not specified"); throw new DigestValidationException("Mandatory field 'nc' not specified"); throw new DigestValidationException("Mandatory field 'cnonce' not specified"); throw new DigestValidationException("Nonce should provide two tokens - nonce received: " + digest.getNonce()); throw new DigestValidationException("Realm name [" + digest.getRealm() + "] does not match system realm name [" + systemRealm + "]"); nonceExpiry = new Long(nonceTokens[0]).longValue(); } catch (NumberFormatException nfe) { throw new DigestValidationException("First nonce token should be numeric, but was: " + nonceTokens[0]); throw new DigestValidationException("Nonce has expired", true); throw new DigestValidationException("Nonce token invalid: " + nonceAsText);