Examples of login()


Examples of org.apache.commons.net.ftp.FTPSClient.login()

                    {
                        throw new FileSystemException("vfs.provider.ftp/connect-rejected.error", hostname);
                    }

                    // Login
                    if (!client.login(
                        UserAuthenticatorUtils.toString(username),
                        UserAuthenticatorUtils.toString(password)))
                    {
                        throw new FileSystemException("vfs.provider.ftp/login.error",
                            new Object[]{hostname, UserAuthenticatorUtils.toString(username)}, null);
View Full Code Here

Examples of org.apache.commons.net.imap.IMAPClient.login()

            throw new RuntimeException("Could not connect to server.", e);
        }

        try
        {
            if (!imap.login(username, password))
            {
                System.err.println("Could not login to server. Check password.");
                imap.disconnect();
                System.exit(3);
            }
View Full Code Here

Examples of org.apache.commons.net.pop3.POP3Client.login()

    // initialize POP3 client
    POP3Client client = new POP3Client();
    client.connect(POP3_HOST, POP3_PORT);

    // Login
    boolean loginSuccess = client.login(TEST_ACCOUNT, TEST_PASSWORD);
    assertThat(loginSuccess, is(true));

    // LIST all messages
    POP3MessageInfo[] info = client.listMessages();
    assertThat(info.length, equalTo(2));
View Full Code Here

Examples of org.apache.commons.net.smtp.AuthSMTPClient.login()

    try {
      client.connect(smtpHost, smtpPort);
      if (!SMTPReply.isPositiveCompletion(client.getReplyCode())) {
        throw new EmailException("SMTP server rejected connection");
      }
      if (!client.login()) {
        String e = client.getReplyString();
        throw new EmailException("SMTP server rejected login: " + e);
      }

      if (smtpEncryption == Encryption.TLS) {
View Full Code Here

Examples of org.apache.commons.net.smtp.SMTPClient.login()

                client.disconnect();
                System.err.println("SMTP server refused connection.");
                System.exit(1);
            }

            client.login();

            client.setSender(sender);
            client.addRecipient(recipient);

            en = ccList.elements();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.UserProvider.login()

      String machineName =
          Strings.domainNamePointerToHostName(DNS.getDefaultHost(
            conf.get("hbase.thrift.dns.interface", "default"),
            conf.get("hbase.thrift.dns.nameserver", "default")));

      provider.login("hbase.thrift.keytab.file",
        "hbase.thrift.kerberos.principal", machineName);
    }
     serverRunner = new ThriftServerRunner(conf);

     // Put up info server.
View Full Code Here

Examples of org.apache.hadoop.hbase.security.UserProvider.login()

            }
            String userName = (String) conf.get(STORM_USER_NAME_KEY);
            if (userName != null) {
                hbaseConfig.set(STORM_USER_NAME_KEY, userName);
            }
            provider.login(STORM_KEYTAB_FILE_KEY, STORM_USER_NAME_KEY,
                InetAddress.getLocalHost().getCanonicalHostName());
        }
        return provider;
    }
}
View Full Code Here

Examples of org.apache.harmony.auth.module.JndiLoginModule.login()

        status.put("javax.security.auth.login.name", "tester");
        status.put("javax.security.auth.login.password", "testerPass");
        module.initialize(subject, new MockCallbackHandler(), status, options);
        try {
            module.login();
            module.commit();
        } catch (LoginException e) {
            fail("Login failed");
        } finally {
            module.logout();
View Full Code Here

Examples of org.apache.harmony.auth.module.KeyStoreLoginModule.login()

        options.remove("keyStorePasswordURL");
        options.put("keyStorePasswordURL", KEYSTORE_FAULTPASSWORD_URL);
        subject = new Subject();
        ksm.initialize(subject, null, null, options);
        try {
            ksm.login();
            fail("login should fail");
        } catch (LoginException e) {
            assertFalse("Should return false because of login failure", ksm
                    .abort());
        }
View Full Code Here

Examples of org.apache.harmony.auth.module.Krb5LoginModule.login()

        // case 1: unset 'kdc' and set 'real' sys.props
        TestUtils.setSystemProperty(ENV_KDC, null);
        TestUtils.setSystemProperty(ENV_REALM, "some_value");
        try {
            module.login();
            fail("No expected LoginException");
        } catch (LoginException e) {
        }

        // case 2: set 'kdc' and unset 'real' sys.props
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.