Examples of SaslClient


Examples of nu.fw.jeti.plugins.xmpp.sasl.SaslClient

    else if(Utils.isAtleastJava(5))
    {
      String[] m = mechanisms.getMechanisms().toArray(
          new String[mechanisms.getMechanisms().size()]);
      try {
         SaslClient sc = new SaslClient(javax.security.sasl.Sasl.createSaslClient(m
              , null, "xmpp", loginInfo.getServer(), null,this));
         byte[] response = (sc.hasInitialResponse()
             ? sc.evaluateChallenge(new byte[0]) : null);
         String res = null;
         System.out.println("res made");
         if(response!=null)res =Base64.encodeBytes(response);
         saslClient = sc;
         System.out.println("ready to send");
         connect.sendWhileConnecting(new SaslPacket(sc.getMechanismName(),res));
         System.out.println("auth packet send");
      }catch(Exception e)
      {
        e.printStackTrace();
        connect.sendLoginError(e.getMessage());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.