/** * @return true if the SASL exchange has completed, regardless of success. */ public boolean isDone() { return sasl.getOutcome() != Sasl.SaslOutcome.PN_SASL_NONE; }
/** * @return true if the SASL exchange has completed, regardless of success. */ public boolean isDone() { return sasl.getOutcome() != Sasl.SaslOutcome.PN_SASL_NONE; }
private void handleSaslFail(Sasl sasl) { StringBuilder message = new StringBuilder("Client failed to authenticate"); if (mechanism != null) { message.append(" using SASL: ").append(mechanism.getName()); if (mechanism.getAdditionalFailureInformation() != null) { message.append(" (").append(mechanism.getAdditionalFailureInformation()).append(")"); } } SaslOutcome outcome = sasl.getOutcome(); if(outcome.equals(SaslOutcome.PN_SASL_TEMP)) { message.append(", due to temporary system error."); } recordFailure(message.toString(), null, outcome.getCode()); }
private void handleSaslFail(Sasl sasl) { StringBuilder message = new StringBuilder("Client failed to authenticate"); if (mechanism != null) { message.append(" using SASL: ").append(mechanism.getName()); if (mechanism.getAdditionalFailureInformation() != null) { message.append(" (").append(mechanism.getAdditionalFailureInformation()).append(")"); } } SaslOutcome outcome = sasl.getOutcome(); if(outcome.equals(SaslOutcome.PN_SASL_TEMP)) { message.append(", due to temporary system error."); } recordFailure(message.toString(), null, outcome.getCode()); }
private void handleSaslFail() throws SaslException { switch(sasl.getOutcome()) { case PN_SASL_AUTH: throw new AuthenticationException("Failed to authenticate"); case PN_SASL_SYS: case PN_SASL_TEMP: throw new SaslSystemException(false, "SASL handshake failed due to a transient error"); case PN_SASL_PERM: throw new SaslSystemException(true, "SASL handshake failed due to an unrecoverable error"); default: throw new SaslException("SASL handshake failed"); } } }
switch (sasl.getOutcome())
private Sasl processSaslEvent(Sasl sasl) { if (sasl.getOutcome() == Sasl.SaslOutcome.PN_SASL_OK) { next.onSuccess(null); return null;
if (sasl.getOutcome() == Sasl.SaslOutcome.PN_SASL_AUTH) { clientException = new com.ibm.mqlight.api.SecurityException( "Failed to authenticate with server - invalid username or password",