Examples of FacebookAuthUser


Examples of com.feth.play.module.pa.providers.oauth2.facebook.FacebookAuthUser

        // 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

Examples of com.feth.play.module.pa.providers.oauth2.facebook.FacebookAuthUser

     * 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
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.