<commit_before><?php
 /*
   * Created by PhpStorm.
   * User: <NAME>
  */
class GluuOxd_Openid_Block_GluuOxOpenidConfig extends Mage_Core_Block_Template{

    private $getAuthorizationUrl = "GluuOxd_Openid/getAuthorizationUrl";
    private $getTokensByCode = "GluuOxd_Openid/getTokensByCode";
    private $getUserInfo = "GluuOxd_Openid/getUserInfo";
    private $logout = "GluuOxd_Openid/logout";

    /**
     * Customer logout action
     */
    public function logout_validation()
    {
        $logout = $this->getLogout();
        $config_option = unserialize(Mage::getStoreConfig ( 'gluu/oxd/oxd_config' ));
        $oxd_id = Mage::getStoreConfig ( 'gluu/oxd/oxd_id' );
        $logout->setRequestOxdId($oxd_id);
        $logout->setRequestPostLogoutRedirectUri($config_option['logout_redirect_uri']);
        $logout->setRequestIdToken($_SESSION['user_oxd_access_token']);
        $logout->request();
    }

    /**
     * @return string
     */
    public function getGetAuthorizationUrl()
    {
        return Mage::helper($this->getAuthorizationUrl);
    }

    /**
     * @return string
     */
    public function getGetTokensByCode()
    {
        return Mage::helper($this->getTokensByCode);
    }

    /**
     * @return string
     */
    public function getGetUserInfo()
    {
        return Mage::helper($this->getUserInfo);
    }
<commit_msg>adding shell script for logout update<commit_after><?php
 /*
   * Created by PhpStorm.
   * User: <NAME>
  */
class GluuOxd_Openid_Block_GluuOxOpenidConfig extends Mage_Core_Block_Template{

    private $getAuthorizationUrl = "GluuOxd_Openid/getAuthorizationUrl";
    private $getTokensByCode = "GluuOxd_Openid/getTokensByCode";
    private $getUserInfo = "GluuOxd_Openid/getUserInfo";
    private $logout = "GluuOxd_Openid/logout";

    /**
     * Customer logout action
     */
    public function logout_validation()
    {
        $config_option = unserialize(Mage::getStoreConfig ( 'gluu/oxd/oxd_config' ));
        $oxd_id = Mage::getStoreConfig ( 'gluu/oxd/oxd_id' );
        if($oxd_id){

            if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
                if(!exec('netstat -aon |find/i "listening" |find "'.$config_option['oxd_host_port'].'"')){
                    $startDir = Mage::getBaseDir('skin').'/adminhtml/default/default/GluuOxd_Openid/oxd-server/bin';
                    chdir($startDir);
                    $fileName = 'oxd-start.bat';
                    exec($fileName);
                }
            } else {
                if(!exec('netstat -tulpn | grep :'.$config_option['oxd_host_port'])){
                    $startDir = Mage::getBaseDir('skin').'/adminhtml/default/default/GluuOxd_Openid/oxd-server/bin';
                    chdir($startDir);
                    $fileName = './oxd-start.sh';
                    exec($fileName);
                }
            }
        }
        $logout = $this->getLogout();
        $logout->setRequestOxdId($oxd_id);
        $logout->setRequestPostLogoutRedirectUri($config_option['logout_redirect_uri']);
        $logout->setRequestIdToken($_SESSION['user_oxd_access_token']);
        $logout->request();
    }

    /**
     * @return string
     */
    public function getGetAuthorizationUrl()
    {
        return Mage::helper($this->getAuthorizationUrl);
    }

    /**
     * @return string
     */
    public function getGetTokensByCode()
    {
        return Mage::helper($this->getTokensByCode);
    }

    /**
     * @return string
     */
    public function getGetUserInfo()
    {
        return Mage::helper($this->getUserInfo);
    }

{'fraction_non_alphanumeric': 0.13493169779760245, 'fraction_numerical': 0.0005575689991636465, 'mean_word_length': 2.4936708860759493, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 0, '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': '3521289', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1147, 'n_words': 156}