AnsweredAssumed Answered

SASL authentication

Question asked by Andrew on May 22, 2015

I can't authentication!

private AbstractXMPPConnection conn;

XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()

  .setUsernameAndPassword(mSettings.getXmppUserName(), mSettings.getXmppPassword())

  .setServiceName(mSettings.getXmmpDomain())

  .setHost("host")

  .setResource(null)

  .setSecurityMode(XMPPTCPConnectionConfiguration.SecurityMode.disabled)

  .setSendPresence(false)

  .setDebuggerEnabled(true)

  .setCompressionEnabled(true)

  .allowEmptyOrNullUsernames()

  .build();
//JID = mSettings.getXmppUserName() + "@" + mSettings.getXmmpDomain();
try {

   conn = new XMPPTCPConnection(config);
   //conn.setUseStreamManagement(true);
   conn.connect();
   logger.error("Connect.......+++++++++++++");
   conn.login();

Error:

05-22 11:21:28.224  19065-19065/com.star2star.starphone W/System.err﹕ org.jivesoftware.smack.sasl.SASLErrorException: SASLError using SCRAM-SHA-1: not-authorized

05-22 11:21:28.224  19065-19065/com.star2star.starphone W/System.err﹕ at org.jivesoftware.smack.SASLAuthentication.authenticationFailed(SASLAuthenticati on.java:365)

05-22 11:21:28.224  19065-19065/com.star2star.starphone W/System.err﹕ at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPC onnection.java:1033)

05-22 11:21:28.224  19065-19065/com.star2star.starphone W/System.err﹕ at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPCon nection.java:937)

05-22 11:21:28.224  19065-19065/com.star2star.starphone W/System.err﹕ at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnecti on.java:952)

I use :

 

 

  repositories {

  jcenter()

  maven {

  url 'https://oss.sonatype.org/content/repositories/snapshots'
   }

  mavenCentral()

  }

  dependencies {

  classpath 'com.android.tools.build:gradle:1.2.3'

compile 'org.igniterealtime.smack:smack-tcp:4.1.0'
compile 'org.igniterealtime.smack:smack-android-extensions:4.1.0'
compile 'org.igniterealtime.smack:smack-experimental:4.1.0'

Please HELP!!!!!

Outcomes