org.jivesoftware.smack.SASLAuthentication Java Examples

The following examples show how to use org.jivesoftware.smack.SASLAuthentication. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KonConnection.java    From desktopclient-java with GNU General Public License v3.0 6 votes vote down vote up
public KonConnection(EndpointServer server,
        PrivateKey privateKey,
        X509Certificate bridgeCert,
        boolean validateCertificate) {
    super(buildConfiguration(RESSOURCE,
            server,
            privateKey,
            bridgeCert,
            validateCertificate)
    );

    // blacklist PLAIN mechanism
    SASLAuthentication.blacklistSASLMechanism("PLAIN");

    // enable SM without resumption (XEP-0198)
    this.setUseStreamManagement(true);
    this.setUseStreamManagementResumption(false);
}
 
Example #2
Source File: JMeterXMPPSamplerTest.java    From jmeter-bzm-plugins with Apache License 2.0 5 votes vote down vote up
public void testLoginLogout() throws Exception {
    TestJMeterUtils.createJmeterEnv();
    JMeterXMPPSampler obj = new JMeterXMPPSampler();
    JMeterXMPPConnection conn = new JMeterXMPPConnection();
    fillActionClasses(conn.getActions());
    conn.setConnectionType(JMeterXMPPConnectionBase.Type.BOSH.toString());
    conn.setAddress("view.webcast.cisco.com");
    conn.setPort("443");
    conn.setBOSHSSL(true);
    conn.setServiceName("cisco.com");
    conn.setPacketReplyTimeout("0");
    conn.setBOSHURL("/httpbinding/");

    conn.setAddress("192.168.5.4");
    conn.setPort("7070");
    conn.setBOSHSSL(false);
    conn.setServiceName("example.com");
    conn.setPacketReplyTimeout("5000");
    conn.setBOSHURL("/http-bind/");


    conn.testStarted();
    obj.addTestElement(conn);
    obj.setProperty(Login.LOGIN, "[email protected]");
    obj.setProperty(Login.PASSWORD, "cisco123");
    obj.setProperty(Login.RESOURCE, "qanda-panelist");

    for (int a = 0; a < 2; a++) {
        doAction(obj, Connect.class);
        SASLAuthentication.getRegisterdSASLMechanisms();
        doAction(obj, Login.class);
        //Thread.sleep(500);
        doAction(obj, Disconnect.class);
        //Thread.sleep(500);
    }
}
 
Example #3
Source File: SASLJavaXSmackInitializer.java    From Smack with Apache License 2.0 5 votes vote down vote up
@Override
public List<Exception> initialize() {
    SASLAuthentication.registerSASLMechanism(new SASLExternalMechanism());
    SASLAuthentication.registerSASLMechanism(new SASLGSSAPIMechanism());
    SASLAuthentication.registerSASLMechanism(new SASLDigestMD5Mechanism());
    SASLAuthentication.registerSASLMechanism(new SASLCramMD5Mechanism());
    SASLAuthentication.registerSASLMechanism(new SASLPlainMechanism());

    return null;
}
 
Example #4
Source File: SASLProvidedSmackInitializer.java    From Smack with Apache License 2.0 5 votes vote down vote up
@Override
public List<Exception> initialize() {
    SASLAuthentication.registerSASLMechanism(new SASLDigestMD5Mechanism());
    SASLAuthentication.registerSASLMechanism(new SASLExternalMechanism());
    SASLAuthentication.registerSASLMechanism(new SASLPlainMechanism());
    return null;
}
 
Example #5
Source File: SASLDigestMD5Mechanism.java    From AndroidPNClient with Apache License 2.0 4 votes vote down vote up
public SASLDigestMD5Mechanism(SASLAuthentication saslAuthentication) {
    super(saslAuthentication);
}
 
Example #6
Source File: SASLMechanism.java    From AndroidPNClient with Apache License 2.0 4 votes vote down vote up
public SASLMechanism(SASLAuthentication saslAuthentication) {
    this.saslAuthentication = saslAuthentication;
}
 
Example #7
Source File: SASLMechanism.java    From AndroidPNClient with Apache License 2.0 4 votes vote down vote up
protected SASLAuthentication getSASLAuthentication() {
    return saslAuthentication;
}
 
Example #8
Source File: SASLCramMD5Mechanism.java    From AndroidPNClient with Apache License 2.0 4 votes vote down vote up
public SASLCramMD5Mechanism(SASLAuthentication saslAuthentication) {
    super(saslAuthentication);
}
 
Example #9
Source File: SASLExternalMechanism.java    From AndroidPNClient with Apache License 2.0 4 votes vote down vote up
public SASLExternalMechanism(SASLAuthentication saslAuthentication) {
    super(saslAuthentication);
}
 
Example #10
Source File: SASLAnonymous.java    From AndroidPNClient with Apache License 2.0 4 votes vote down vote up
public SASLAnonymous(SASLAuthentication saslAuthentication) {
    super(saslAuthentication);
}
 
Example #11
Source File: SASLPlainMechanism.java    From AndroidPNClient with Apache License 2.0 4 votes vote down vote up
public SASLPlainMechanism(SASLAuthentication saslAuthentication) {
    super(saslAuthentication);
}
 
Example #12
Source File: SASLXFacebookPlatformMechanism.java    From KlyphMessenger with MIT License 4 votes vote down vote up
/**
 * Constructor.
 */
public SASLXFacebookPlatformMechanism(SASLAuthentication saslAuthentication) {
    super(saslAuthentication);
}
 
Example #13
Source File: SASLMechanism.java    From saros with GNU General Public License v2.0 4 votes vote down vote up
public SASLMechanism(SASLAuthentication saslAuthentication) {
  this.saslAuthentication = saslAuthentication;
}
 
Example #14
Source File: SASLMechanism.java    From saros with GNU General Public License v2.0 4 votes vote down vote up
protected SASLAuthentication getSASLAuthentication() {
  return saslAuthentication;
}
 
Example #15
Source File: SASLGSSAPIMechanism.java    From saros with GNU General Public License v2.0 4 votes vote down vote up
public SASLGSSAPIMechanism(SASLAuthentication saslAuthentication) {
  super(saslAuthentication);

  System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
  System.setProperty("java.security.auth.login.config", "gss.conf");
}
 
Example #16
Source File: SASLGSSAPIMechanism.java    From AndroidPNClient with Apache License 2.0 3 votes vote down vote up
public SASLGSSAPIMechanism(SASLAuthentication saslAuthentication) {
    super(saslAuthentication);

    System.setProperty("javax.security.auth.useSubjectCredsOnly","false");
    System.setProperty("java.security.auth.login.config","gss.conf");

}