Examples of csrfValue()


Examples of org.jamesdbloom.acceptance.login.LoginPage.csrfValue()

        HttpResponse landingPageResponse = httpClient.execute(new HttpGet("http://127.0.0.1:8080/"));

        // then - login page is displayed
        LoginPage securePageResponse = new LoginPage(getBodyAndClose(landingPageResponse));
        securePageResponse.shouldHaveCorrectFields();
        csrf = securePageResponse.csrfValue();

        // when - login is performed
        HttpPost login = new HttpPost("https://127.0.0.1:8443/login");
        login.setEntity(new UrlEncodedFormEntity(Arrays.asList(
                new BasicNameValuePair("username", "fake@email.com"),
View Full Code Here

Examples of org.jamesdbloom.acceptance.registration.RegistrationPage.csrfValue()

        // when - register
        HttpResponse registerPageResponse = httpClient.execute(new HttpGet("https://127.0.0.1:8443/register"));
        RegistrationPage registrationPage = new RegistrationPage(getBodyAndClose(registerPageResponse));
        registrationPage.shouldHaveCorrectFields();
        String csrf = registrationPage.csrfValue();

        HttpPost register = new HttpPost("https://127.0.0.1:8443/register");
        register.setEntity(new UrlEncodedFormEntity(Arrays.asList(
                new BasicNameValuePair("name", "test_user"),
                new BasicNameValuePair("email", "fake@email.com"),
View Full Code Here

Examples of org.jamesdbloom.acceptance.updatepassword.UpdatePasswordPage.csrfValue()

        // when - updating password
        HttpResponse updatePasswordPageResponse = httpClient.execute(new HttpGet(updatePasswordURL));
        UpdatePasswordPage updatePasswordPage = new UpdatePasswordPage(getBodyAndClose(updatePasswordPageResponse));
        updatePasswordPage.shouldHaveCorrectFields();
        csrf = updatePasswordPage.csrfValue();

        HttpPost updatePasswordRequest = new HttpPost(updatePasswordURL);
        updatePasswordRequest.setEntity(new UrlEncodedFormEntity(Arrays.asList(
                new BasicNameValuePair("password", "NewPassword123"),
                new BasicNameValuePair("passwordConfirm", "NewPassword123"),
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.