Package com.heroku.api.request.login

Examples of com.heroku.api.request.login.BasicAuthLogin


     * @param password Heroku password.
     * @return An API key that can be used for subsequent API calls.
     */
    public static String obtainApiKey(String username, String password) {
        Connection tmpConn = ConnectionFactory.get();
        LoginVerification verification = tmpConn.execute(new BasicAuthLogin(username, password), null);
        return verification.getApiKey();
    }
View Full Code Here


    }

    @Test(groups = "integration")
    public void testValidUsernameAndPassword() throws IOException {
        IntegrationTestConfig.TestUser testUser = CONFIG.getDefaultUser();
        LoginVerification verification = connection.execute(new BasicAuthLogin(testUser.getUsername(), testUser.getPassword()), testUser.getApiKey());
        assertEquals(verification.getEmail(), testUser.getUsername());
    }
View Full Code Here

    @Test(groups = "integration",
            dataProvider = "invalidUsernamesAndPasswords",
            expectedExceptions = RequestFailedException.class)
    public void testInvalidUsernameAndPassword(String username, String password) throws IOException {
        connection.execute(new BasicAuthLogin(username, password), CONFIG.getDefaultUser().getApiKey());
    }
View Full Code Here

TOP

Related Classes of com.heroku.api.request.login.BasicAuthLogin

Copyright © 2018 www.massapicom. 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.