Hi, I recently update smack from aplha5 to alpha6 and unfortunatelly I cannot login to our server anymore with exception SASLError using DIGEST-MD5: not-authorized.
Client using smack is Android phone. User name and password are 100% correct.
Due to API changes in alpha 6 I modify my code for conf & login:
XMPPTCPConnectionConfiguration.XMPPTCPConnectionConfigurationBuilder conf = XMPPTCPConnectionConfiguration.builder(); conf.setHost("my.server.com"); conf.setPort(12345); conf.setServiceName("myservice"); conf.setDebuggerEnabled(false); // with true is crashing conf.setUsernameAndPassword("username", "password"); conf.setResource("phone"); conf.setRosterLoadedAtLogin(true); conf.setSendPresence(false); conf.setSecurityMode(ConnectionConfiguration.SecurityMode.enabled); // accept all certificate - just for testing try { TLSUtils.acceptAllCertificates(conf); } catch (NoSuchAlgorithmException e) { } catch (KeyManagementException e) { } // verify all hostname - just for testing conf.setHostnameVerifier(new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { return true; } }); XMPPTCPConnection connection = new XMPPTCPConnection(conf.build()); ... connection.connect(); ... connection.login(); // throw exception SASLError using DIGEST-MD5: not-authorized ...
Gradle configuration:
dependencies {
...
compile "org.igniterealtime.smack:smack-android:4.1.0-alpha6"
compile "org.igniterealtime.smack:smack-tcp:4.1.0-alpha6"
compile "org.igniterealtime.smack:smack-extensions:4.1.0-alpha6"
compile "org.igniterealtime.smack:smack-debug:4.1.0-alpha6"
compile "org.igniterealtime.smack:smack-sasl-provided:4.1.0-alpha6"
}
Is it everything setup correctly?
Thank you for any help!