Package org.pac4j.openid.profile.google

Examples of org.pac4j.openid.profile.google.GoogleOpenIdProfile


        kryo.register(GoogleOpenIdProfile.class);
    }

    @Override
    protected void verifyProfile(final UserProfile userProfile) {
        final GoogleOpenIdProfile profile = (GoogleOpenIdProfile) userProfile;
        logger.debug("userProfile : {}", profile);
        final String id = "AItOawmMrzkgh-RhXW-d0iQ16ybkKpReh7g-hQQ";
        assertEquals("https://www.google.com/accounts/o8/id?id=" + id, profile.getId());
        assertEquals(GoogleOpenIdProfile.class.getSimpleName() + UserProfile.SEPARATOR
                + "https://www.google.com/accounts/o8/id?id=" + id, profile.getTypedId());
        assertTrue(ProfileHelper.isTypedIdOf(profile.getTypedId(), GoogleOpenIdProfile.class));
        assertCommonProfile(userProfile, "testscribeup@gmail.com", "Jérôme", "ScribeUP", "Jérôme ScribeUP", null,
                Gender.UNSPECIFIED, Locale.FRANCE, null, null, "FR");
        assertEquals(5, profile.getAttributes().size());
    }
View Full Code Here


        return fetchRequest;
    }

    @Override
    protected GoogleOpenIdProfile createProfile(final AuthSuccess authSuccess) throws MessageException {
        final GoogleOpenIdProfile profile = new GoogleOpenIdProfile();

        if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
            final FetchResponse fetchResp = (FetchResponse) authSuccess.getExtension(AxMessage.OPENID_NS_AX);
            for (final String name : OpenIdAttributesDefinitions.googleOpenIdDefinition.getAllAttributes()) {
                profile.addAttribute(name, fetchResp.getAttributeValue(name));
            }
        }
        return profile;
    }
View Full Code Here

TOP

Related Classes of org.pac4j.openid.profile.google.GoogleOpenIdProfile

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.