Package com.feth.play.module.pa.providers.oauth2.foursquare

Examples of com.feth.play.module.pa.providers.oauth2.foursquare.FoursquareAuthProvider


    public void itShouldBePossibleToSignUp() {
        signupUser();

        assertThat(browser.url()).isEqualTo("/");

        final EventBriteAuthUser authUser = (EventBriteAuthUser) (MyTestUserServicePlugin.getLastAuthUser());
        assertThat(authUser.getId()).isEqualTo("107949557141");

        final User user = User.findByEmail(EVENTBRITE_USER_EMAIL);
        assertThat(user).isNotNull();
        assertThat(user.firstName).isEqualTo("Joscha");
        assertThat(user.lastName).isEqualTo("Feth");
View Full Code Here


        // Make sure the redirect from localhost to fb happened already (and that {@link MyUserServicePlugin#save()} gets called)
        Thread.sleep(3000);

        assertThat(browser.url()).isEqualTo("/#_=_");

        final FacebookAuthUser authUser = (FacebookAuthUser) (MyTestUserServicePlugin.getLastAuthUser());
        assertThat(authUser.getProfileLink()).contains(FACEBOOK_USER_ID);
        assertThat(authUser.getId()).isEqualTo(FACEBOOK_USER_ID);
        assertThat(authUser.getGender()).isEqualTo("female");

        final User user = User.findByEmail(FACEBOOK_USER_EMAIL);
        assertThat(user).isNotNull();
        assertThat(user.firstName).isEqualTo("Mary");
        assertThat(user.lastName).isEqualTo("Fallerman");
View Full Code Here

     * After the test is finished, revoke the permission to the app so the login dialog appears again on the next login when running the test
     * See https://developers.facebook.com/docs/facebook-login/permissions/v2.1#revokelogin
     */
    @After
    public void shutdown() {
        final FacebookAuthUser authUser = (FacebookAuthUser) (MyTestUserServicePlugin.getLastAuthUser());

        if (authUser == null) {
            // in case the test failed, we don't have an authUser
            return;
        }

        final String url = getConfig().getString("userInfoUrl") + "/permissions";
        WS
                .url(url)
                .setQueryParameter(OAuth2AuthProvider.Constants.ACCESS_TOKEN, authUser.getOAuth2AuthInfo().getAccessToken())
                .setQueryParameter("format", "json")
                .setQueryParameter("method", "delete")
                .get().get(10, TimeUnit.SECONDS);
    }
View Full Code Here

    public void itShouldBePossibleToSignUp() {
        signupUser();

        assertThat(browser.url()).isEqualTo("/");

        final GoogleAuthUser authUser = (GoogleAuthUser) (MyTestUserServicePlugin.getLastAuthUser());
        assertThat(authUser.getProfileLink()).isEqualTo("https://plus.google.com/109975614317978623876");
        assertThat(authUser.getId()).isEqualTo("109975614317978623876");
        assertThat(authUser.getGender()).isEqualTo("male");

        final User user = User.findByEmail(GOOGLE_USER_EMAIL);
        assertThat(user).isNotNull();
        assertThat(user.firstName).isEqualTo("Joscha");
        assertThat(user.lastName).isEqualTo("Feth");
View Full Code Here

TOP

Related Classes of com.feth.play.module.pa.providers.oauth2.foursquare.FoursquareAuthProvider

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.