Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * Plugin Name: miniOrange Auto login With token * Plugin URI: http://minioran..

Decoded Output download

<?php 
/** 
* Plugin Name: miniOrange Auto login With token 
* Plugin URI: http://miniorange.com 
* Description: Use to automatic login in mobile for OAuth token. 
* Version: 1.2.0 
* Author: miniOrange 
* Author URI: http://miniorange.com 
*/ 
 
 
use MoRESTAPI\JWTUtils; 
use MoRESTAPI\MRAUtils; 
class Mo_OAuth_Mobile_Token 
{ 
    function __construct() 
    { 
        add_action("init", array($this, "miniorange_oauth_mobile")); 
        add_filter("mo_rest_extend_authentication", array($this, "mo_rest_extend_authentication_flow"), 10, 1); 
        add_filter("mo_rest_extend_tokenendpoint", array($this, "mo_rest_extend_tokenendpoint_flow")); 
    } 
    private function firebase_remote_call($tT, $UR, $Yn) 
    { 
        $Qj = array("email" => $UR, "password" => $Yn, "returnSecureToken" => true); 
        $qJ = json_encode($Qj); 
        $FD = curl_init(); 
        curl_setopt($FD, CURLOPT_URL, $tT); 
        curl_setopt($FD, CURLOPT_RETURNTRANSFER, 1); 
        curl_setopt($FD, CURLOPT_POST, 1); 
        curl_setopt($FD, CURLOPT_POSTFIELDS, $qJ); 
        curl_setopt($FD, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); 
        $sG = curl_exec($FD); 
        return $sG; 
    } 
    public function mo_rest_extend_tokenendpoint_flow($xb) 
    { 
        if (!(strpos($_SERVER["REQUEST_URI"], "/api/v1/firebase-token") !== false)) { 
            goto aH; 
        } 
        $PW = file_get_contents("php://input"); 
        $PW = json_decode($PW, true); 
        if (!(json_last_error() !== JSON_ERROR_NONE)) { 
            goto k2; 
        } 
        $PW = $_POST; 
        k2: 
        $at = false; 
        $ft = new MRAUtils(); 
        $gO = $ft->mo_rest_api_authentication_get_option("mo_api_authentication_method_extras") ? $ft->mo_rest_api_authentication_get_option("mo_api_authentication_method_extras") : array(); 
        $j4 = isset($gO["oauth_client"]) ? $gO["oauth_client"] : false; 
        if ($j4["client_id"] === $PW["client_id"] && $j4["client_secret"] === $PW["client_secret"]) { 
            goto g0; 
        } 
        $at = array("status" => "error", "code" => 400, "error" => "BAD_REQUEST", "error_description" => "Invalid client ID or secret."); 
        goto oc; 
        g0: 
        $XU = sanitize_text_field($PW["username"]); 
        $Yn = sanitize_text_field($PW["password"]); 
        $user = get_user_by("login", $XU); 
        if ($user) { 
            goto tx; 
        } 
        $user = get_user_by("email", $XU); 
        tx: 
        if ($user) { 
            goto qg; 
        } 
        $at = array("status" => "error", "code" => 403, "error" => "FORBIDDEN", "error_description" => "Invalid username."); 
        goto QK; 
        qg: 
        $t8 = get_user_meta($user->ID, "mo_rest_firebase_migrated"); 
        $qk = get_option("mo_firebase_auth_api_key"); 
        if (false !== $t8 && !empty($t8)) { 
            goto Nj; 
        } 
        if (wp_check_password($Yn, $user->user_pass, $user->ID)) { 
            goto gy; 
        } 
        $at = array("status" => "error", "code" => 403, "error" => "FORBIDDEN", "error_description" => "Invalid password."); 
        goto bW; 
        gy: 
        update_user_meta($user->ID, "mo_rest_firebase_migrated", true); 
        $at = $this->firebase_remote_call("https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=" . $qk, $user->user_email, $Yn); 
        echo $at; 
        die; 
        bW: 
        goto pX; 
        Nj: 
        $at = $this->firebase_remote_call("https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=" . $qk, $user->user_email, $Yn); 
        echo $at; 
        die; 
        pX: 
        QK: 
        oc: 
        $ft->send_json_response($at); 
        aH: 
    } 
    public function mo_rest_extend_authentication_flow($NY) 
    { 
        $at = false; 
        if (!isset($NY["TPP-PROVIDER"])) { 
            goto pM; 
        } 
        if ("firebase" === $NY["TPP-PROVIDER"]) { 
            goto xn; 
        } 
        if ("apple" === $NY["TPP-PROVIDER"]) { 
            goto D9; 
        } 
        if ("facebook" === $NY["TPP-PROVIDER"]) { 
            goto Jh; 
        } 
        if (!("google" === $NY["TPP-PROVIDER"])) { 
            goto Ki; 
        } 
        $SS = "https://oauth2.googleapis.com/tokeninfo"; 
        $Qj["id_token"] = $NY["ID-TOKEN"]; 
        $Dh["method"] = "GET"; 
        $tk = array("Accept" => "application/json"); 
        $Dh["body"] = $Qj; 
        $Dh["headers"] = $tk; 
        $DQ = $this->check_valid_token($SS, $Dh); 
        if (!(false !== $DQ)) { 
            goto jw; 
        } 
        $at = true; 
        $this->set_woocommerce_session($DQ, $NY["ID-TOKEN"]); 
        jw: 
        Ki: 
        goto yR; 
        Jh: 
        $SS = "https://graph.facebook.com/me/?fields=id,name,email,age_range,first_name,gender,last_name,link"; 
        $Qj["access_token"] = $NY["ACCESS-TOKEN"]; 
        $Dh["method"] = "POST"; 
        $tk = array("Accept" => "application/json"); 
        $Dh["body"] = $Qj; 
        $Dh["headers"] = $tk; 
        $DQ = $this->check_valid_token($SS, $Dh); 
        if (!(false !== $DQ)) { 
            goto Wb; 
        } 
        $at = true; 
        $this->set_woocommerce_session($DQ, $NY["ACCESS-TOKEN"]); 
        Wb: 
        yR: 
        goto aA; 
        D9: 
        $VU = new JWTUtils($NY["ID-TOKEN"]); 
        $LW = $VU->verify_from_jwks("https://appleid.apple.com/auth/keys"); 
        if (!(true === $LW)) { 
            goto dY; 
        } 
        $at = true; 
        $this->set_woocommerce_session($VU->get_decoded_payload(), $NY["ID-TOKEN"]); 
        dY: 
        aA: 
        goto sr; 
        xn: 
        $VU = new JWTUtils($NY["ID-TOKEN"]); 
        $LW = $VU->verify_from_jwks("https://www.googleapis.com/service_accounts/v1/jwk/[email protected]"); 
        if (!(true === $LW)) { 
            goto QF; 
        } 
        $at = true; 
        $this->set_woocommerce_session($VU->get_decoded_payload(), $NY["ID-TOKEN"]); 
        QF: 
        sr: 
        pM: 
        return $at; 
    } 
    private function set_woocommerce_session($dJ, $qA) 
    { 
        if (!isset($dJ["email"])) { 
            goto RZ; 
        } 
        $UR = $dJ["email"]; 
        $user = get_user_by("email", $UR); 
        if (false === $user) { 
            goto Ok; 
        } 
        $qV = $user->ID; 
        goto Yy; 
        Ok: 
        $Yn = wp_generate_password(10, true); 
        $qV = wp_create_user($UR, $Yn, $UR); 
        Yy: 
        RZ: 
        wp_set_current_user($qV); 
        if (!class_exists("Mo_Wc_Compliance")) { 
            goto BS; 
        } 
        $gR = new \Mo_Wc_Compliance(); 
        $gR->set_user_id($qV, $qA); 
        BS: 
    } 
    public function check_valid_token($HQ, $Dh) 
    { 
        $at = wp_remote_request($HQ, $Dh); 
        if (!is_wp_error($at)) { 
            goto AC; 
        } 
        return false; 
        AC: 
        if ($at["response"]["code"] === 200) { 
            goto vv; 
        } 
        return false; 
        goto gc; 
        vv: 
        $at = $at["body"]; 
        if (is_array(json_decode($at, true))) { 
            goto Qc; 
        } 
        return false; 
        Qc: 
        $xb = json_decode($at, true); 
        if (isset($xb["error_description"])) { 
            goto Da; 
        } 
        if (isset($xb["error"])) { 
            goto rs; 
        } 
        goto Lg; 
        Da: 
        return false; 
        goto Lg; 
        rs: 
        return false; 
        Lg: 
        return $xb; 
        gc: 
    } 
    function miniorange_oauth_mobile() 
    { 
        if (!(isset($_GET["mo_token"]) && isset($_GET["appname"]) && !empty($_GET["appname"]) && !empty($_GET["mo_token"]))) { 
            goto x3; 
        } 
        $Qm = $_GET["appname"]; 
        $Tj = $_GET["mo_token"]; 
        $ec = ''; 
        $sG = array(); 
        if ($Qm === "facebook") { 
            goto Bo; 
        } 
        if ($Qm === "google") { 
            goto O3; 
        } 
        if ($Qm === "apple") { 
            goto pD; 
        } 
        if ($Qm === "firebase") { 
            goto vk; 
        } 
        if (!($Qm === "wordpress")) { 
            goto KC; 
        } 
        $ft = new MRAUtils(); 
        $gO = $ft->mo_rest_api_authentication_get_option("mo_api_authentication_method_extras") ? $ft->mo_rest_api_authentication_get_option("mo_api_authentication_method_extras") : array(); 
        $Ko = $gO["oauth_client"]["client_secret"]; 
        $VU = new JWTUtils($Tj); 
        $LW = $VU->verify($Ko); 
        if (!(true === $LW)) { 
            goto Ep; 
        } 
        $nF = $VU->get_decoded_payload(); 
        if (!($nF !== false)) { 
            goto i1; 
        } 
        $sG["email"] = isset($nF["email"]) ? $nF["email"] : false; 
        i1: 
        Ep: 
        KC: 
        goto P5; 
        vk: 
        $VU = new JWTUtils($Tj); 
        $LW = $VU->verify_from_jwks("https://www.googleapis.com/service_accounts/v1/jwk/[email protected]"); 
        if (!(true === $LW)) { 
            goto AG; 
        } 
        $nF = $VU->get_decoded_payload(); 
        if (!($nF !== false)) { 
            goto ZB; 
        } 
        $sG["email"] = isset($nF["email"]) ? $nF["email"] : false; 
        ZB: 
        AG: 
        P5: 
        goto ll; 
        pD: 
        $VU = new JWTUtils($Tj); 
        $LW = $VU->verify_from_jwks("https://appleid.apple.com/auth/keys"); 
        if (!(true === $LW)) { 
            goto xy; 
        } 
        $nF = $VU->get_decoded_payload(); 
        if (!($nF !== false)) { 
            goto X2; 
        } 
        $sG["email"] = isset($nF["email"]) ? $nF["email"] : false; 
        X2: 
        xy: 
        ll: 
        goto iw; 
        O3: 
        $ec = "https://oauth2.googleapis.com/tokeninfo"; 
        $Qj["id_token"] = $Tj; 
        $tk = array("Accept" => "application/json"); 
        $Dh["method"] = "GET"; 
        $Dh["body"] = $Qj; 
        $Dh["headers"] = $tk; 
        $sG = $this->check_valid_token($ec, $Dh); 
        iw: 
        goto MK; 
        Bo: 
        $ec = "https://graph.facebook.com/me/?fields=id,name,email,age_range,first_name,gender,last_name,link"; 
        $Qj["access_token"] = $Tj; 
        $tk = array("Accept" => "application/json"); 
        $Dh["method"] = "POST"; 
        $Dh["body"] = $Qj; 
        $Dh["headers"] = $tk; 
        $sG = $this->check_valid_token($ec, $Dh); 
        MK: 
        if (!(!empty($sG) && $sG !== false)) { 
            goto iH; 
        } 
        $UR = isset($sG["email"]) ? $sG["email"] : ''; 
        $user = get_user_by("email", $UR); 
        if (!($user !== false)) { 
            goto SG; 
        } 
        wp_set_current_user($user->ID); 
        wp_set_auth_cookie($user->ID); 
        do_action("wp_login", $user->user_login, $user); 
        SG: 
        iH: 
        x3: 
    } 
} 
new Mo_OAuth_Mobile_Token(); 
 ?>

Did this file decode correctly?

Original Code

<?php
/**
* Plugin Name: miniOrange Auto login With token
* Plugin URI: http://miniorange.com
* Description: Use to automatic login in mobile for OAuth token.
* Version: 1.2.0
* Author: miniOrange
* Author URI: http://miniorange.com
*/


use MoRESTAPI\JWTUtils;
use MoRESTAPI\MRAUtils;
class Mo_OAuth_Mobile_Token
{
    function __construct()
    {
        add_action("\151\x6e\x69\x74", array($this, "\x6d\151\156\151\157\x72\141\156\x67\x65\137\157\141\x75\x74\x68\137\155\x6f\142\x69\x6c\x65"));
        add_filter("\155\157\137\x72\145\163\164\x5f\145\x78\x74\x65\x6e\144\x5f\141\x75\x74\x68\x65\156\x74\151\x63\141\164\x69\157\156", array($this, "\x6d\x6f\137\162\x65\163\x74\137\x65\x78\164\145\156\144\137\x61\x75\164\150\x65\x6e\x74\x69\143\141\x74\151\157\x6e\137\x66\154\x6f\167"), 10, 1);
        add_filter("\155\x6f\137\162\145\163\164\x5f\145\x78\164\x65\156\144\137\164\x6f\153\145\156\145\x6e\x64\160\157\151\156\x74", array($this, "\155\157\x5f\x72\145\163\x74\137\x65\x78\164\x65\156\144\137\164\157\153\x65\156\x65\156\144\x70\157\151\x6e\x74\x5f\146\x6c\x6f\x77"));
    }
    private function firebase_remote_call($tT, $UR, $Yn)
    {
        $Qj = array("\x65\155\x61\151\154" => $UR, "\x70\x61\x73\163\x77\157\162\x64" => $Yn, "\162\x65\x74\165\162\x6e\x53\x65\143\165\162\x65\124\x6f\153\145\156" => true);
        $qJ = json_encode($Qj);
        $FD = curl_init();
        curl_setopt($FD, CURLOPT_URL, $tT);
        curl_setopt($FD, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($FD, CURLOPT_POST, 1);
        curl_setopt($FD, CURLOPT_POSTFIELDS, $qJ);
        curl_setopt($FD, CURLOPT_HTTPHEADER, array("\103\x6f\156\x74\x65\x6e\164\55\124\x79\160\x65\x3a\x20\141\x70\x70\x6c\151\x63\141\x74\151\157\156\57\152\x73\x6f\x6e"));
        $sG = curl_exec($FD);
        return $sG;
    }
    public function mo_rest_extend_tokenendpoint_flow($xb)
    {
        if (!(strpos($_SERVER["\x52\x45\x51\125\x45\x53\124\137\125\122\111"], "\57\x61\x70\x69\x2f\x76\x31\57\146\x69\x72\145\142\x61\x73\145\x2d\x74\x6f\x6b\145\x6e") !== false)) {
            goto aH;
        }
        $PW = file_get_contents("\x70\150\160\72\x2f\57\x69\x6e\x70\x75\x74");
        $PW = json_decode($PW, true);
        if (!(json_last_error() !== JSON_ERROR_NONE)) {
            goto k2;
        }
        $PW = $_POST;
        k2:
        $at = false;
        $ft = new MRAUtils();
        $gO = $ft->mo_rest_api_authentication_get_option("\155\x6f\137\x61\x70\151\x5f\141\x75\164\x68\x65\156\x74\x69\x63\x61\x74\151\157\156\137\x6d\145\164\150\157\144\137\x65\x78\x74\162\141\163") ? $ft->mo_rest_api_authentication_get_option("\155\x6f\137\x61\160\x69\x5f\x61\165\164\x68\x65\x6e\164\151\x63\141\x74\x69\157\x6e\137\x6d\x65\x74\x68\157\144\137\145\170\x74\162\x61\163") : array();
        $j4 = isset($gO["\x6f\141\165\x74\x68\137\x63\154\151\x65\156\164"]) ? $gO["\157\x61\x75\164\150\137\143\154\151\x65\x6e\164"] : false;
        if ($j4["\x63\154\x69\145\156\x74\137\x69\x64"] === $PW["\143\154\x69\x65\156\164\137\x69\144"] && $j4["\143\x6c\151\145\156\x74\x5f\x73\x65\143\162\x65\x74"] === $PW["\x63\154\151\145\x6e\x74\x5f\x73\145\143\162\145\x74"]) {
            goto g0;
        }
        $at = array("\x73\x74\141\x74\165\x73" => "\x65\x72\162\157\x72", "\x63\157\144\x65" => 400, "\145\162\162\157\x72" => "\102\x41\x44\x5f\122\x45\x51\x55\105\x53\x54", "\145\162\162\157\162\x5f\144\x65\163\143\x72\151\160\164\x69\x6f\156" => "\111\156\166\141\x6c\x69\144\40\x63\154\x69\x65\x6e\x74\40\111\104\40\x6f\162\x20\163\145\x63\x72\145\x74\x2e");
        goto oc;
        g0:
        $XU = sanitize_text_field($PW["\165\163\145\162\156\x61\155\145"]);
        $Yn = sanitize_text_field($PW["\160\x61\163\x73\167\x6f\x72\144"]);
        $user = get_user_by("\154\x6f\147\151\x6e", $XU);
        if ($user) {
            goto tx;
        }
        $user = get_user_by("\x65\x6d\141\151\154", $XU);
        tx:
        if ($user) {
            goto qg;
        }
        $at = array("\163\x74\141\164\x75\x73" => "\145\x72\x72\157\162", "\143\x6f\x64\x65" => 403, "\x65\x72\162\x6f\x72" => "\x46\117\122\102\x49\104\104\x45\x4e", "\145\x72\x72\157\x72\137\144\x65\x73\x63\x72\x69\160\x74\x69\157\x6e" => "\111\156\x76\141\154\151\144\40\x75\x73\145\x72\156\x61\155\145\56");
        goto QK;
        qg:
        $t8 = get_user_meta($user->ID, "\x6d\157\x5f\x72\145\163\x74\x5f\x66\x69\x72\145\142\141\163\145\x5f\x6d\151\147\162\x61\x74\145\144");
        $qk = get_option("\x6d\x6f\x5f\x66\151\x72\145\x62\141\163\145\137\x61\x75\x74\150\x5f\x61\160\151\x5f\153\x65\171");
        if (false !== $t8 && !empty($t8)) {
            goto Nj;
        }
        if (wp_check_password($Yn, $user->user_pass, $user->ID)) {
            goto gy;
        }
        $at = array("\163\164\x61\x74\165\x73" => "\x65\162\162\x6f\x72", "\x63\x6f\144\145" => 403, "\x65\x72\162\157\162" => "\x46\x4f\122\x42\111\x44\104\105\x4e", "\145\x72\x72\x6f\162\x5f\144\x65\163\143\x72\151\x70\x74\x69\157\x6e" => "\111\156\166\x61\154\151\144\40\160\141\163\163\x77\157\162\144\x2e");
        goto bW;
        gy:
        update_user_meta($user->ID, "\155\x6f\x5f\x72\x65\163\x74\x5f\x66\151\x72\x65\x62\141\163\x65\137\155\x69\147\162\x61\164\x65\x64", true);
        $at = $this->firebase_remote_call("\150\x74\164\160\163\x3a\x2f\57\x69\144\x65\x6e\x74\x69\x74\171\x74\x6f\x6f\154\153\151\164\x2e\x67\x6f\157\147\154\x65\141\160\x69\x73\56\143\157\155\x2f\x76\61\57\141\143\x63\x6f\165\x6e\x74\x73\72\163\x69\x67\156\125\x70\x3f\x6b\x65\171\x3d" . $qk, $user->user_email, $Yn);
        echo $at;
        die;
        bW:
        goto pX;
        Nj:
        $at = $this->firebase_remote_call("\150\x74\164\x70\163\x3a\57\57\151\x64\145\156\x74\x69\x74\x79\164\157\157\154\153\151\x74\56\147\x6f\x6f\147\154\145\141\x70\x69\163\56\x63\157\x6d\57\166\x31\x2f\x61\x63\x63\x6f\165\x6e\164\x73\72\x73\x69\x67\x6e\111\x6e\x57\151\x74\x68\120\x61\x73\x73\x77\x6f\x72\x64\77\153\x65\x79\75" . $qk, $user->user_email, $Yn);
        echo $at;
        die;
        pX:
        QK:
        oc:
        $ft->send_json_response($at);
        aH:
    }
    public function mo_rest_extend_authentication_flow($NY)
    {
        $at = false;
        if (!isset($NY["\124\x50\x50\x2d\x50\122\117\x56\x49\104\x45\122"])) {
            goto pM;
        }
        if ("\146\x69\162\145\x62\x61\x73\x65" === $NY["\x54\120\x50\55\120\122\117\x56\x49\x44\105\122"]) {
            goto xn;
        }
        if ("\141\160\160\154\145" === $NY["\124\120\120\x2d\120\122\117\x56\x49\x44\x45\x52"]) {
            goto D9;
        }
        if ("\x66\141\x63\x65\x62\157\157\153" === $NY["\x54\120\x50\x2d\x50\122\x4f\126\x49\x44\105\122"]) {
            goto Jh;
        }
        if (!("\147\x6f\x6f\x67\x6c\145" === $NY["\124\120\120\x2d\x50\x52\x4f\126\x49\x44\x45\122"])) {
            goto Ki;
        }
        $SS = "\x68\164\164\x70\x73\72\x2f\57\x6f\141\x75\164\150\x32\x2e\x67\x6f\x6f\x67\x6c\x65\141\160\151\163\x2e\x63\x6f\x6d\57\164\157\153\145\x6e\151\156\146\x6f";
        $Qj["\x69\x64\137\164\x6f\153\145\156"] = $NY["\111\x44\x2d\x54\117\x4b\105\x4e"];
        $Dh["\155\x65\164\150\157\144"] = "\x47\x45\x54";
        $tk = array("\101\143\143\x65\x70\164" => "\x61\160\x70\x6c\x69\143\x61\164\x69\x6f\156\57\152\163\x6f\x6e");
        $Dh["\142\x6f\x64\171"] = $Qj;
        $Dh["\x68\145\x61\144\145\162\x73"] = $tk;
        $DQ = $this->check_valid_token($SS, $Dh);
        if (!(false !== $DQ)) {
            goto jw;
        }
        $at = true;
        $this->set_woocommerce_session($DQ, $NY["\111\104\55\x54\117\113\x45\116"]);
        jw:
        Ki:
        goto yR;
        Jh:
        $SS = "\150\x74\164\x70\x73\x3a\57\57\x67\162\141\160\150\x2e\146\x61\x63\145\x62\x6f\157\153\x2e\x63\157\155\57\155\145\57\77\146\x69\145\x6c\x64\x73\x3d\151\144\54\156\141\155\x65\54\145\155\x61\x69\154\54\x61\147\x65\x5f\x72\x61\x6e\147\x65\54\x66\151\x72\x73\164\137\156\141\155\145\x2c\x67\145\156\x64\x65\x72\x2c\x6c\141\163\x74\137\156\x61\x6d\145\x2c\x6c\x69\x6e\x6b";
        $Qj["\141\143\x63\x65\x73\x73\x5f\x74\157\x6b\145\x6e"] = $NY["\101\103\103\x45\123\123\x2d\x54\x4f\113\105\x4e"];
        $Dh["\155\145\164\150\157\144"] = "\120\x4f\x53\x54";
        $tk = array("\x41\143\x63\x65\x70\164" => "\141\160\x70\x6c\151\x63\141\164\151\x6f\x6e\57\x6a\x73\157\x6e");
        $Dh["\142\x6f\x64\x79"] = $Qj;
        $Dh["\150\x65\141\144\145\162\x73"] = $tk;
        $DQ = $this->check_valid_token($SS, $Dh);
        if (!(false !== $DQ)) {
            goto Wb;
        }
        $at = true;
        $this->set_woocommerce_session($DQ, $NY["\x41\103\103\105\x53\123\x2d\124\x4f\x4b\x45\116"]);
        Wb:
        yR:
        goto aA;
        D9:
        $VU = new JWTUtils($NY["\x49\104\x2d\x54\117\x4b\105\x4e"]);
        $LW = $VU->verify_from_jwks("\150\164\x74\x70\x73\x3a\x2f\57\x61\160\160\x6c\x65\x69\144\56\x61\x70\160\x6c\145\x2e\x63\157\155\x2f\141\x75\x74\x68\57\153\x65\x79\163");
        if (!(true === $LW)) {
            goto dY;
        }
        $at = true;
        $this->set_woocommerce_session($VU->get_decoded_payload(), $NY["\111\104\x2d\x54\117\x4b\105\116"]);
        dY:
        aA:
        goto sr;
        xn:
        $VU = new JWTUtils($NY["\x49\104\55\x54\x4f\x4b\x45\x4e"]);
        $LW = $VU->verify_from_jwks("\150\x74\x74\x70\163\72\57\x2f\x77\167\x77\56\x67\157\157\x67\154\x65\x61\160\x69\163\x2e\143\x6f\x6d\57\163\x65\x72\x76\x69\143\145\137\x61\143\x63\x6f\165\156\x74\163\x2f\x76\61\57\152\167\153\x2f\163\x65\x63\165\162\x65\164\157\153\145\x6e\100\163\171\163\x74\x65\x6d\56\147\x73\x65\162\x76\151\x63\145\x61\143\143\x6f\x75\156\x74\56\x63\157\155");
        if (!(true === $LW)) {
            goto QF;
        }
        $at = true;
        $this->set_woocommerce_session($VU->get_decoded_payload(), $NY["\111\x44\55\124\x4f\x4b\x45\116"]);
        QF:
        sr:
        pM:
        return $at;
    }
    private function set_woocommerce_session($dJ, $qA)
    {
        if (!isset($dJ["\145\x6d\x61\x69\154"])) {
            goto RZ;
        }
        $UR = $dJ["\x65\x6d\x61\151\154"];
        $user = get_user_by("\x65\155\x61\x69\154", $UR);
        if (false === $user) {
            goto Ok;
        }
        $qV = $user->ID;
        goto Yy;
        Ok:
        $Yn = wp_generate_password(10, true);
        $qV = wp_create_user($UR, $Yn, $UR);
        Yy:
        RZ:
        wp_set_current_user($qV);
        if (!class_exists("\115\x6f\137\x57\143\x5f\x43\x6f\x6d\160\154\x69\x61\156\143\145")) {
            goto BS;
        }
        $gR = new \Mo_Wc_Compliance();
        $gR->set_user_id($qV, $qA);
        BS:
    }
    public function check_valid_token($HQ, $Dh)
    {
        $at = wp_remote_request($HQ, $Dh);
        if (!is_wp_error($at)) {
            goto AC;
        }
        return false;
        AC:
        if ($at["\x72\145\163\x70\157\156\x73\145"]["\x63\157\144\145"] === 200) {
            goto vv;
        }
        return false;
        goto gc;
        vv:
        $at = $at["\x62\x6f\x64\171"];
        if (is_array(json_decode($at, true))) {
            goto Qc;
        }
        return false;
        Qc:
        $xb = json_decode($at, true);
        if (isset($xb["\145\162\162\x6f\x72\137\144\145\163\143\x72\x69\160\x74\x69\x6f\x6e"])) {
            goto Da;
        }
        if (isset($xb["\145\x72\x72\157\x72"])) {
            goto rs;
        }
        goto Lg;
        Da:
        return false;
        goto Lg;
        rs:
        return false;
        Lg:
        return $xb;
        gc:
    }
    function miniorange_oauth_mobile()
    {
        if (!(isset($_GET["\155\157\137\x74\x6f\x6b\x65\156"]) && isset($_GET["\x61\160\x70\156\141\155\x65"]) && !empty($_GET["\141\x70\x70\156\x61\155\145"]) && !empty($_GET["\155\x6f\x5f\164\x6f\x6b\x65\156"]))) {
            goto x3;
        }
        $Qm = $_GET["\141\x70\160\x6e\141\x6d\145"];
        $Tj = $_GET["\x6d\157\137\x74\157\153\145\x6e"];
        $ec = '';
        $sG = array();
        if ($Qm === "\x66\141\143\x65\142\x6f\157\153") {
            goto Bo;
        }
        if ($Qm === "\x67\157\157\147\x6c\145") {
            goto O3;
        }
        if ($Qm === "\x61\160\x70\154\x65") {
            goto pD;
        }
        if ($Qm === "\x66\x69\162\145\142\141\x73\x65") {
            goto vk;
        }
        if (!($Qm === "\x77\x6f\162\144\160\x72\145\x73\x73")) {
            goto KC;
        }
        $ft = new MRAUtils();
        $gO = $ft->mo_rest_api_authentication_get_option("\x6d\157\x5f\141\160\151\137\141\x75\164\x68\x65\156\164\151\x63\141\164\x69\157\x6e\137\x6d\x65\x74\150\x6f\144\x5f\x65\x78\x74\x72\x61\x73") ? $ft->mo_rest_api_authentication_get_option("\155\x6f\x5f\141\x70\x69\137\x61\x75\164\x68\x65\156\x74\151\x63\141\164\x69\157\156\137\155\145\x74\150\157\x64\x5f\x65\x78\164\162\141\163") : array();
        $Ko = $gO["\x6f\x61\165\164\150\x5f\143\x6c\151\145\156\164"]["\x63\x6c\151\x65\x6e\x74\137\163\145\x63\162\x65\164"];
        $VU = new JWTUtils($Tj);
        $LW = $VU->verify($Ko);
        if (!(true === $LW)) {
            goto Ep;
        }
        $nF = $VU->get_decoded_payload();
        if (!($nF !== false)) {
            goto i1;
        }
        $sG["\145\x6d\141\151\x6c"] = isset($nF["\145\155\141\x69\x6c"]) ? $nF["\x65\155\141\151\154"] : false;
        i1:
        Ep:
        KC:
        goto P5;
        vk:
        $VU = new JWTUtils($Tj);
        $LW = $VU->verify_from_jwks("\150\164\x74\160\x73\72\x2f\57\167\167\x77\x2e\x67\x6f\157\147\x6c\x65\141\x70\151\163\56\x63\157\155\57\x73\x65\162\x76\151\143\x65\137\x61\143\x63\157\x75\156\164\163\x2f\x76\x31\57\152\167\x6b\x2f\x73\145\143\x75\x72\x65\x74\x6f\x6b\145\156\100\x73\x79\163\164\x65\x6d\x2e\147\x73\145\x72\166\151\143\x65\141\x63\x63\157\165\x6e\x74\x2e\143\x6f\155");
        if (!(true === $LW)) {
            goto AG;
        }
        $nF = $VU->get_decoded_payload();
        if (!($nF !== false)) {
            goto ZB;
        }
        $sG["\x65\155\141\x69\x6c"] = isset($nF["\x65\155\141\x69\x6c"]) ? $nF["\145\x6d\141\x69\x6c"] : false;
        ZB:
        AG:
        P5:
        goto ll;
        pD:
        $VU = new JWTUtils($Tj);
        $LW = $VU->verify_from_jwks("\x68\x74\x74\160\163\72\x2f\57\141\160\x70\x6c\145\151\144\x2e\141\x70\x70\154\145\x2e\x63\157\155\57\x61\165\x74\150\57\x6b\x65\x79\163");
        if (!(true === $LW)) {
            goto xy;
        }
        $nF = $VU->get_decoded_payload();
        if (!($nF !== false)) {
            goto X2;
        }
        $sG["\x65\155\141\x69\x6c"] = isset($nF["\145\155\141\x69\x6c"]) ? $nF["\145\x6d\x61\x69\154"] : false;
        X2:
        xy:
        ll:
        goto iw;
        O3:
        $ec = "\x68\x74\x74\160\163\x3a\x2f\57\x6f\x61\x75\164\150\x32\56\x67\157\157\x67\x6c\145\x61\x70\x69\x73\x2e\x63\157\x6d\x2f\x74\157\x6b\x65\x6e\151\x6e\146\157";
        $Qj["\151\144\x5f\x74\x6f\153\145\x6e"] = $Tj;
        $tk = array("\x41\143\x63\145\x70\164" => "\141\160\x70\154\x69\143\x61\164\151\x6f\156\x2f\152\x73\x6f\x6e");
        $Dh["\155\145\164\x68\x6f\144"] = "\107\105\x54";
        $Dh["\x62\157\144\171"] = $Qj;
        $Dh["\150\145\141\144\145\162\x73"] = $tk;
        $sG = $this->check_valid_token($ec, $Dh);
        iw:
        goto MK;
        Bo:
        $ec = "\x68\164\x74\x70\x73\72\57\x2f\147\162\141\x70\x68\56\x66\141\143\x65\x62\157\157\x6b\56\x63\x6f\x6d\57\155\x65\57\x3f\146\x69\x65\x6c\144\163\75\x69\x64\x2c\x6e\x61\155\x65\54\x65\x6d\141\151\x6c\x2c\x61\147\x65\137\162\x61\x6e\147\145\54\146\151\162\x73\x74\137\156\141\155\x65\x2c\x67\x65\x6e\144\x65\162\54\x6c\141\163\164\137\156\141\155\x65\54\154\151\x6e\153";
        $Qj["\x61\143\x63\x65\x73\163\x5f\x74\x6f\153\145\156"] = $Tj;
        $tk = array("\x41\x63\x63\x65\x70\x74" => "\x61\x70\160\x6c\151\143\x61\x74\x69\157\x6e\57\x6a\163\x6f\156");
        $Dh["\155\x65\164\150\157\x64"] = "\x50\x4f\x53\x54";
        $Dh["\x62\x6f\x64\171"] = $Qj;
        $Dh["\x68\145\141\144\145\162\163"] = $tk;
        $sG = $this->check_valid_token($ec, $Dh);
        MK:
        if (!(!empty($sG) && $sG !== false)) {
            goto iH;
        }
        $UR = isset($sG["\x65\x6d\141\x69\154"]) ? $sG["\145\x6d\x61\151\154"] : '';
        $user = get_user_by("\x65\x6d\x61\151\x6c", $UR);
        if (!($user !== false)) {
            goto SG;
        }
        wp_set_current_user($user->ID);
        wp_set_auth_cookie($user->ID);
        do_action("\167\160\x5f\x6c\x6f\x67\151\156", $user->user_login, $user);
        SG:
        iH:
        x3:
    }
}
new Mo_OAuth_Mobile_Token();

Function Calls

None

Variables

None

Stats

MD5 dc61c30d550555efe7310b29d1298b91
Eval Count 0
Decode Time 49 ms