Package org.pac4j.openid.profile.yahoo

Examples of org.pac4j.openid.profile.yahoo.YahooOpenIdProfile


    private int verifyCalls = 0;
    @Override
    protected void verifyProfile(final UserProfile userProfile) {
      if (verifyCalls++ == 2 && userProfile == null) //Verify3 not work because the ProfileHelper has package class name directly in the code
        return;
        final YahooOpenIdProfile profile = (YahooOpenIdProfile) userProfile;
        assertNotNull(profile);
        logger.debug("userProfile : {}", profile);
        final String id = "mnsYAxIag.AfFGVrKZckRIVkvVYLEYRM4Q--#02050";
        assertEquals("https://me.yahoo.com/a/" + id, profile.getId());
        assertEquals(YahooOpenIdProfile.class.getSimpleName() + UserProfile.SEPARATOR
               + "https://me.yahoo.com/a/" + id, profile.getTypedId());
        assertTrue(ProfileHelper.isTypedIdOf(profile.getTypedId(), YahooOpenIdProfile.class));
        assertCommonProfile(userProfile, "testscribeup@yahoo.fr", null, null, null, null,
                Gender.UNSPECIFIED, Locale.FRANCE, null, null, null);
        assertEquals(2, profile.getAttributes().size());
    }
View Full Code Here


        return fetchRequest;
    }

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

        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.yahoo.YahooOpenIdProfile

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.