public void authenticate(String username, String host, CallbackHandler cbh)
     throws IOException, XMPPException {
   String[] mechanisms = {getName()};
   Map<String, String> props = new HashMap<String, String>();
   sc = Sasl.createSaslClient(mechanisms, null, "xmpp", host, props, cbh);
   super.authenticate();
 }
  protected void authenticate() throws IOException, XMPPException {
    String[] mechanisms = {getName()};
    Map<String, String> props = new HashMap<String, String>();
    sc = Sasl.createSaslClient(mechanisms, null, "xmpp", hostname, props, this);

    super.authenticate();
  }
  public void authenticate(String username, String host, String password)
      throws IOException, XMPPException {
    this.authenticationId = username;
    this.password = password;
    this.hostname = host;

    String[] mechanisms = {getName()};
    Map<String, String> props = new HashMap<String, String>();
    sc = Sasl.createSaslClient(mechanisms, null, "xmpp", host, props, this);
    super.authenticate();
  }
Example #4
0
 public SASLMechanism instanceForAuthentication(XMPPConnection connection) {
   SASLMechanism saslMechansim = newInstance();
   saslMechansim.connection = connection;
   return saslMechansim;
 }
Example #5
0
 public final int compareTo(SASLMechanism other) {
   return getPriority() - other.getPriority();
 }