<commit_before><?php
class Hybrid_Providers_Poniverse extends Hybrid_Provider_Model_OAuth2
{
    function initialize()
    {
        parent::initialize();

        // Provider api end-points
        $this->api->authorize_url  = 'https://poniverse.net/oauth/authorize';
        $this->api->token_url      = 'https://poniverse.net/oauth/access_token';
        $this->api->token_info_url = 'http://api.poniverse.net/v1/users/me';
    }

    /**
     * begin login step
     */
    function loginBegin()
    {
        $parameters = array("scope" => $this->scope, "access_type" => "offline");
        $optionals  = array("scope", "access_type", "redirect_uri", "approval_prompt", "hd");

        foreach ($optionals as $parameter){
            if( isset( $this->config[$parameter] ) && ! empty( $this->config[$parameter] ) ){
                $parameters[$parameter] = $this->config[$parameter];
            }
        }

        Hybrid_Auth::redirect( $this->api->authorizeUrl( array() ) );
    }

    /**
     * load the user profile from the IDp api client
     */
    function getUserProfile()
    {
        // refresh tokens if needed
        $this->refreshToken();

        // ask google api for user infos
        $response = $this->api->api('http://api.poniverse.net/v1/users/me');

        if ( ! isset( $response->id ) || isset( $response->error ) ){<commit_msg>Updated Poniverse.net API endpoint<commit_after><?php
class Hybrid_Providers_Poniverse extends Hybrid_Provider_Model_OAuth2
{
    function initialize()
    {
        parent::initialize();

        // Provider api end-points
        $this->api->authorize_url  = 'https://poniverse.net/oauth/authorize';
        $this->api->token_url      = 'https://poniverse.net/oauth/access_token';
        $this->api->token_info_url = 'https://api.poniverse.net/v1/users/me';
    }

    /**
     * begin login step
     */
    function loginBegin()
    {
        $parameters = array("scope" => $this->scope, "access_type" => "offline");
        $optionals  = array("scope", "access_type", "redirect_uri", "approval_prompt", "hd");

        foreach ($optionals as $parameter){
            if( isset( $this->config[$parameter] ) && ! empty( $this->config[$parameter] ) ){
                $parameters[$parameter] = $this->config[$parameter];
            }
        }

        Hybrid_Auth::redirect( $this->api->authorizeUrl( array() ) );
    }

    /**
     * load the user profile from the IDp api client
     */
    function getUserProfile()
    {
        // refresh tokens if needed
        $this->refreshToken();

        // ask google api for user infos
        $response = $this->api->api('https://api.poniverse.net/v1/users/me');

        if ( ! isset( $response->id ) || isset( $response->error ) ){
{'fraction_non_alphanumeric': 0.16236832546313112, 'fraction_numerical': 0.002179440610243371, 'mean_word_length': 2.4211180124223604, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5039746', 'n_tokens_mistral': 836, 'n_tokens_neox': 826, 'n_words': 155}