class QQProfileCreator extends OAuth20ProfileCreator {

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

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

        var profileDefinition = (QQProfileDefinition) configuration.getProfileDefinition();
        var openidUrl = profileDefinition.getOpenidUrl((OAuth2AccessToken) accessToken, (OAuth20Configuration) configuration);
        val service = (OAuth20Service) this.configuration.buildService(context, client);

        var body = sendRequestForData(service, accessToken, openidUrl, Verb.GET);
        var openid = profileDefinition.extractOpenid(body);

        var profileUrl = profileDefinition.getProfileUrl(accessToken, configuration);
        profileUrl = CommonHelper.addParameter(profileUrl, "openid", openid);
        profileUrl = CommonHelper.addParameter(profileUrl, "oauth_consumer_key",
            configuration.getKey());
        body = sendRequestForData(service, accessToken, profileUrl, Verb.GET);
        if (body == null) {
            throw new HttpCommunicationException("Not data found for accessToken: " + accessToken);
        }
        val profile = profileDefinition.extractUserProfile(body);
        addTokenToProfile(profile, accessToken);
        profile.setId(openid);
        return Optional.of(profile);
    
<methods>public void <init>(org.pac4j.oauth.config.OAuth20Configuration, org.pac4j.core.client.IndirectClient) <variables>