class YahooProfileCreator extends OAuth10ProfileCreator {

    /**
     * <p>Constructor for YahooProfileCreator.</p>
     *
     * @param configuration a {@link OAuth10Configuration} object
     * @param client a {@link IndirectClient} object
     */
    public YahooProfileCreator(final OAuth10Configuration configuration, final IndirectClient client) {
        super(configuration, client);
    }

    /** {@inheritDoc} */
    @Override
    protected Optional<UserProfile> retrieveUserProfileFromToken(final WebContext context, final Token accessToken) {<FILL_FUNCTION_BODY>}
}

        // get the guid: https://developer.yahoo.com/social/rest_api_guide/introspective-guid-resource.html
        val profileDefinition = configuration.getProfileDefinition();
        val profileUrl = profileDefinition.getProfileUrl(accessToken, this.configuration);
        val service = (OAuth10aService) configuration.buildService(context, client);
        var body = sendRequestForData(service, accessToken, profileUrl, profileDefinition.getProfileVerb());
        val guid = CommonHelper.substringBetween(body, "<value>", "</value>");
        logger.debug("guid : {}", guid);
        if (CommonHelper.isBlank(guid)) {
            throw new HttpCommunicationException("Cannot find guid from body : " + body);
        }
        body = sendRequestForData(service, accessToken, "https://social.yahooapis.com/v1/user/" + guid + "/profile?format=json", Verb.GET);
        UserProfile profile = (YahooProfile) configuration.getProfileDefinition().extractUserProfile(body);
        addTokenToProfile(profile, accessToken);
        return Optional.of(profile);
    
<methods>public void <init>(org.pac4j.oauth.config.OAuth10Configuration, org.pac4j.core.client.IndirectClient) <variables>