/** * Wrapper for {@link #challengeReceived(String, boolean)}, with <code>finalChallenge</code> set * to <code>false</code>. * * @param challenge a base64 encoded string representing the challenge. * @throws SmackException * @throws InterruptedException */ public void challengeReceived(String challenge) throws SmackException, InterruptedException { challengeReceived(challenge, false); }
/** * Notification message saying that SASL authentication was successful. The next step * would be to bind the resource. * @param success result of the authentication. * @throws SmackException * @throws InterruptedException */ public void authenticated(Success success) throws SmackException, InterruptedException { // RFC6120 6.3.10 "At the end of the authentication exchange, the SASL server (the XMPP // "receiving entity") can include "additional data with success" if appropriate for the // SASL mechanism in use. In XMPP, this is done by including the additional data as the XML // character data of the <success/> element." The used SASL mechanism should be able to // verify the data send by the server in the success stanza, if any. if (success.getData() != null) { challengeReceived(success.getData(), true); } currentMechanism.checkIfSuccessfulOrThrow(); authenticationSuccessful = true; // Wake up the thread that is waiting in the #authenticate method synchronized (this) { notify(); } }
getSASLAuthentication().challengeReceived(challengeData); break; case "success":
getSASLAuthentication().challengeReceived(challengeData); break; case Success.ELEMENT:
/** * Wrapper for {@link #challengeReceived(String, boolean)}, with <code>finalChallenge</code> set * to <code>false</code>. * * @param challenge a base64 encoded string representing the challenge. * @throws SmackException * @throws InterruptedException */ public void challengeReceived(String challenge) throws SmackException, InterruptedException { challengeReceived(challenge, false); }
/** * Notification message saying that SASL authentication was successful. The next step * would be to bind the resource. * @param success result of the authentication. * @throws SmackException * @throws InterruptedException */ public void authenticated(Success success) throws SmackException, InterruptedException { // RFC6120 6.3.10 "At the end of the authentication exchange, the SASL server (the XMPP // "receiving entity") can include "additional data with success" if appropriate for the // SASL mechanism in use. In XMPP, this is done by including the additional data as the XML // character data of the <success/> element." The used SASL mechanism should be able to // verify the data send by the server in the success stanza, if any. if (success.getData() != null) { challengeReceived(success.getData(), true); } currentMechanism.checkIfSuccessfulOrThrow(); authenticationSuccessful = true; // Wake up the thread that is waiting in the #authenticate method synchronized (this) { notify(); } }
connection.getSASLAuthentication().challengeReceived(parser.nextText());
connection.getSASLAuthentication().challengeReceived(challengeData); } else if (parser.getName().equals("success")) { processPacket(new Success(parser.nextText()));
connection.getSASLAuthentication().challengeReceived(challengeData);
connection.getSASLAuthentication().challengeReceived(challengeData);
.challengeReceived(challengeData); connection.processPacket(new Challenge( challengeData));