failAuthCleanup(); if (ex instanceof Win32Exception) { throw new AuthenticationException("Authentication Failed", ex); throw new AuthenticationException("Authentication Failed"); } else { try { failAuthCleanup(); if (ex instanceof Win32Exception) { throw new AuthenticationException("Authentication Failed", ex);
@Override public String generateAuthResponse( final HttpHost host, final HttpRequest request, final HttpContext context) throws AuthenticationException { Args.notNull(request, "HTTP request"); if (this.paramMap.get("realm") == null) { throw new AuthenticationException("missing realm"); } if (this.paramMap.get("nonce") == null) { throw new AuthenticationException("missing nonce"); } return createDigestResponse(request); }
@Override public String generateAuthResponse( final HttpHost host, final HttpRequest request, final HttpContext context) throws AuthenticationException { if (this.credentials == null) { throw new AuthenticationException("NT credentials not available"); } final String response; if (this.state == State.FAILED) { throw new AuthenticationException("NTLM authentication failed"); } else if (this.state == State.CHALLENGE_RECEIVED) { response = this.engine.generateType1Msg( this.credentials.getNetbiosDomain(), this.credentials.getWorkstation()); this.state = State.MSG_TYPE1_GENERATED; } else if (this.state == State.MSG_TYPE2_RECEVIED) { response = this.engine.generateType3Msg( this.credentials.getUserName(), this.credentials.getPassword(), this.credentials.getNetbiosDomain(), this.credentials.getWorkstation(), this.challenge); this.state = State.MSG_TYPE3_GENERATED; } else { throw new AuthenticationException("Unexpected state: " + this.state); } return "NTLM " + response; }
failAuthCleanup(); if (ex instanceof Win32Exception) { throw new AuthenticationException("Authentication Failed", ex); throw new AuthenticationException("Authentication Failed"); } else { try { failAuthCleanup(); if (ex instanceof Win32Exception) { throw new AuthenticationException("Authentication Failed", ex);
switch (state) { case UNINITIATED: throw new AuthenticationException(getName() + " authentication has not been initiated"); case FAILED: throw new AuthenticationException(getName() + " authentication has failed"); case CHALLENGE_RECEIVED: try { || gsse.getMajor() == GSSException.DUPLICATE_TOKEN || gsse.getMajor() == GSSException.OLD_TOKEN) { throw new AuthenticationException(gsse.getMessage(), gsse); throw new AuthenticationException(gsse.getMessage());
throw new AuthenticationException("None of the qop methods is supported: " + qoplist); digester = createMessageDigest(digAlg); } catch (final UnsupportedDigestAlgorithmException ex) { throw new AuthenticationException("Unsuppported digest algorithm: " + digAlg); a2 = buffer.append(method).append(":").append(uri).toByteArray(); } else { throw new AuthenticationException("Qop auth-int cannot be used with " + "a non-repeatable entity"); throw new AuthenticationException("I/O error reading entity content", ex);