if (!connection().isSecureConnection() && !allowSensitiveOperationOverInsecureConnection) { throw new IllegalStateException("Creating account over insecure connection");
/** * Changes the password of the currently logged-in account. This operation can only * be performed after a successful login operation has been completed. Not all servers * support changing passwords; an XMPPException will be thrown when that is the case. * * @param newPassword new password. * * @throws IllegalStateException if not currently logged-in to the server. * @throws XMPPErrorException if an error occurs when changing the password. * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public void changePassword(String newPassword) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (!connection().isSecureConnection() && !allowSensitiveOperationOverInsecureConnection) { throw new IllegalStateException("Changing password over insecure connection."); } Map<String, String> map = new HashMap<>(); map.put("username", connection().getUser().getLocalpart().toString()); map.put("password",newPassword); Registration reg = new Registration(map); reg.setType(IQ.Type.set); reg.setTo(connection().getXMPPServiceDomain()); createStanzaCollectorAndSend(reg).nextResultOrThrow(); }
if (!connection.isSecureConnection()) { if (!startTLSReceived && connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.required) {
LOG.debug("Connection is Secure: {}", conn.isSecureConnection()); LOG.debug("Connection is TLS: {}", conn.isUsingTLS());
if (!connection.isSecureConnection()) { if (!startTLSReceived && connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.required)
if (!connection.isSecureConnection()) { if (!startTLSReceived && connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.required)
if (SparkManager.getConnection().isSecureConnection())
xmppCon.connect(); String usingTLS = (xmppCon.isUsingTLS() == true) ? "" : " *NOT* "; String secure = (xmppCon.isSecureConnection() == true) ? "" : " *NOT* "; logger.info("Connection is " + usingTLS