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

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

        val token = (WechatToken) accessToken;
        val profile = super.retrieveUserProfileFromToken(context, token);
        profile.get().setId(token.getOpenid());
        return profile;
    
<methods>public void <init>(org.pac4j.oauth.config.OAuth20Configuration, org.pac4j.core.client.IndirectClient) <variables>