/* Decoded by unphp.net */ get("rest_api_authentication_status"); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_support_request_flag", "customerSetupTab")->save(); $form["markup_library"] = array("#attached" => array("library" => array("rest_api_authentication/rest_api_authentication.main"))); if ($Wm == "PLUGIN_CONFIGURATION" && \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_license_key") == NULL) { goto Tp; } if ($Wm == "PLUGIN_CONFIGURATION") { goto cJ; } goto fg; Tp: $form["markup_top_head"] = array("#markup" => "
"); $BI = MiniorangeApiAuthConstants::BASE_URL; $form["markup_144"] = array("#markup" => "

Verify your License

"); $Ur = \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->get("rest_api_authentication_customer_admin_email"); $DD = "https://login.xecurify.com/moas/login?username=" . $Ur . "&redirectUrl=https://login.xecurify.com/moas/admin/customer/viewlicensekeys"; $form["markup_rest_lk"] = array("#markup" => "
" . "You can find all your used and unused keys under the View License Key Section in your miniOrange dashboard." . "
"); $form["rest_api_authentication_license_key"] = array("#type" => "textfield", "#title" => t("License Key *"), "#attributes" => array("style" => "width:450px", "placeholder" => "Enter your license key to activate the module")); $form["rest_api_authentication_tnc"] = array("#markup" => "

* Terms & Conditions   " . "

    \xa
  1. License key you have entered here is associated with this site instance. In future,\xa if you are re-installing the module or your site for any reason, you should remove licence key from Register/Login tab before deleting the module so that you can use the same license key again.
  2. \xa
  3. This is not a developers license. Making any kind of changes to the module code will result in deletion of all your configurations and will make the module unstable.
  4. \xa

Please note: By clicking on the Activate License button, you agree to the above Terms & Conditions

"); $form["rest_api_authentication_customer_validate_license_button"] = array("#type" => "submit", "#button_type" => "primary", "#value" => t("Activate License"), "#submit" => array("::rest_api_authentication_validate_license_submit")); $form["rest_api_authentication_customer_setup_back"] = array("#type" => "submit", "#button_type" => "danger", "#value" => t("Back"), "#submit" => array("::rest_api_authentication_back"), "#suffix" => "



"); $form["close_div"] = array("#markup" => "
"); Utilities::AddSupportButton($form, $form_state); return $form; goto fg; cJ: $cu = \Drupal::config("rest_api_authentication.settings"); $form["header_top_style_1"] = array("#markup" => "
"); $form["markup_top"] = array("#markup" => "
"); $Bd = abs(floor((strtotime($cu->get("rest_api_authentication_auth_licenseExpiry")) - time()) / (3600 * 24))); if (strtotime($cu->get("rest_api_authentication_auth_licenseExpiry")) < time()) { goto gl; } if (strtotime($cu->get("rest_api_authentication_auth_licenseExpiry")) - 30 * 24 * 60 * 60 < time()) { goto Nb; } $form["markup_top_welcome_message"] = array("#markup" => ""); goto w2; gl: $form["markup_top_welcome_message"] = array("#markup" => "
Your maintenance support has expired " . $Bd . " days earlier, please click on the Renew Maintenance button below to upgrade.
"); goto w2; Nb: $form["markup_top_welcome_message"] = array("#markup" => "
Your maintenance is going to expire in " . $Bd . " days, please click on the Renew Maintenance button below to upgrade.
"); w2: $form["markup_top_1"] = array("#markup" => "

Your Profile:

"); $XR = array(t("ATTRIBUTE NAME"), t("ATTRIBUTE VALUE")); $Zw = $cu->get("rest_api_authentication_customer_admin_email"); $CJ = []; $CJ[0] = array("Customer Email" => "Customer Email", "email" => $Zw); $CJ[1] = array("Customer ID" => "Customer ID", "customerid" => $cu->get("rest_api_authentication_customer_id")); $CH = $cu->get("rest_api_authentication_license_plan"); $CJ[2] = array("License Plan" => "License Plan", "license_plan" => $CH); $yt = $cu->get("rest_api_authentication_license_key"); $CJ[3] = array("License Key" => "License Key", "license_key" => $yt); $Xy = \Drupal::service("extension.list.module")->getPath("rest_api_authentication"); if (strtotime($cu->get("rest_api_authentication_auth_licenseExpiry", '')) < time()) { goto FV; } $CJ[4] = array("Maintenance Expiry" => "Maintenance Expiry", "maintenance_expiry" => date("F j, Y, g:i a", strtotime($cu->get("rest_api_authentication_auth_licenseExpiry", '')))); goto Fz; FV: $CJ[4] = array("Maintenance Expiry" => "Maintenance Expiry", "maintenance_expiry" => Markup::create("
" . date("F j, Y, g:i a", strtotime($cu->get("rest_api_authentication_auth_licenseExpiry", ''))) . "
")); Fz: $CJ[5] = array("Support Expiry" => "Support Expiry", "support_expiry" => date("F j, Y, g:i a", strtotime($cu->get("rest_api_authentication_supportExpiry", '')))); $CJ[6] = array("Drupal Version" => "Drupal Version", "drupal_version" => DRUPAL::VERSION); $CJ[7] = array("PHP Version" => "PHP Version", "php_version" => phpversion()); $CJ[8] = array("Refetch License Details" => "Refetch License Details", "refetch_license_details" => Markup::create("Fetch")); if (!(strtotime($cu->get("rest_api_authentication_auth_licenseExpiry", '')) - 30 * 24 * 60 * 60 < time())) { goto ny; } $CJ[9] = array("Renew Maintenance" => "Renew Maintenance", "renew_maintenance" => Markup::create("Renew Maintenance")); ny: $form["fieldset"]["customerinfo"] = array("#theme" => "table", "#header" => $XR, "#rows" => $CJ); $form["rest_api_authentication_customer_Remove_Account_info"] = array("#markup" => "


Remove Account:

This section will help you to remove your current\xa logged in account without losing your current configurations.

"); $form["rest_api_authentication_remove_account"] = array("#markup" => "
", "#type" => "submit", "#value" => t("Remove Account"), "#limit_validation_errors" => array(), "#submit" => array("::rest_api_authentication_remove_account"), "#attributes" => array("style" => "margin-left:0px;")); Utilities::AddSupportButton($form, $form_state); $form["rest_api_authentication_support_div_cust"] = array("#markup" => "
"); return $form; fg: $form["header_top_style_1"] = array("#markup" => "
"); $form["markup_14"] = array("#markup" => "

Login with miniOrange

"); $S_ = MiniorangeApiAuthConstants::INTRANET; $form["markup_15"] = array("#markup" => "
Please log in the miniOrange account with which you have purchased your license. Once you are logged in to your account, you need to enter your license key. You can find your license keys in your miniOrange dashboard under\xa License -> View License Key section
"); $form["rest_api_authentication_customer_setup_username"] = array("#type" => "textfield", "#title" => t("Email"), "#required" => true, "#attributes" => array("style" => "width:50%;")); $form["rest_api_authentication_customer_setup_password"] = array("#type" => "password", "#title" => "Password", "#attributes" => array("style" => "width:50%;")); $form["rest_api_authentication_customer_setup_button"] = array("#type" => "submit", "#button_type" => "primary", "#limit_validation_errors" => array(), "#value" => t("Login"), "#attributes" => array("style" => "margin-left:0px")); if ($S_) { goto kc; } $form["rest_api_authentication_customer_forgot_password_button"] = array("#type" => "submit", "#button_type" => "danger", "#attributes" => array("style" => "margin-left:0px", "onclick" => "this.form.target="_blank";"), "#submit" => array("::miniorange_reset_password"), "#limit_validation_errors" => array(), "#value" => t("Forgot Password")); kc: $form["create_account_markup_15"] = array("#markup" => "
If you do not have an account with us yet, please click on the link here to create an account or you can reach out to us through the Contact Us block on the right.
"); $form["miniorange_rest_api_client_support_div_cust2"] = array("#markup" => "
"); Utilities::AddSupportButton($form, $form_state); return $form; } function miniorange_reset_password(array &$form, FormStateInterface $form_state) { $Ek = new TrustedRedirectResponse(MiniorangeApiAuthConstants::BASE_URL . "/moas/idp/resetpassword"); $form_state->setResponse($Ek); } public function submitForm(array &$form, FormStateInterface $form_state) { $S_ = MiniorangeApiAuthConstants::INTRANET; $Mb = $form["rest_api_authentication_customer_setup_username"]["#value"]; $NN = ''; $vb = null; if ($S_) { goto CV; } $vb = $form["rest_api_authentication_customer_setup_password"]["#value"]; CV: if (!$S_ && (empty($Mb) || empty($vb))) { goto sM; } if ($S_ && empty($Mb)) { goto ey; } goto qx; sM: \Drupal::messenger()->addMessage(t("The Email and Password> fields are mandatory."), "error"); return; goto qx; ey: \Drupal::messenger()->addMessage(t("The Email fields are mandatory."), "error"); return; qx: if (\Drupal::service("email.validator")->isValid($Mb)) { goto yp; } \Drupal::messenger()->addMessage(t("The email address " . $Mb . " is not valid."), "error"); return; yp: $x_ = new MiniorangeRestAPICustomer($Mb, $vb); $BU = json_decode($x_->checkCustomer()); if ($BU->status == "CUSTOMER_NOT_FOUND") { goto qr; } if ($BU->status == "CURL_ERROR") { goto dW; } if (!$S_) { goto In; } $Wm = "PLUGIN_CONFIGURATION"; \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_admin_email", $Mb)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_id", MiniorangeApiAuthConstants::CUSTOMER_ID)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_status", $Wm)->save(); \Drupal::messenger()->addMessage(t("Successfully retrieved your account.")); goto dz; In: $Vo = $x_->getCustomerKeys(); if (isset($Vo) && !empty($Vo)) { goto Lc; } \Drupal::messenger()->addMessage(t("Invalid credentials"), "error"); return; goto DI; Lc: $Ve = json_decode($x_->getCustomerKeys()); if (!(json_last_error() == JSON_ERROR_NONE)) { goto ue; } \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_id", $Ve->id)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_admin_token", $Ve->token)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_admin_email", $Mb)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_admin_phone", $NN)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_api_key", $Ve->apiKey)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_password", $vb)->save(); $Wm = "PLUGIN_CONFIGURATION"; \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_status", $Wm)->save(); \Drupal::messenger()->addMessage(t("Successfully retrieved your account.")); ue: DI: dz: goto gE; qr: \Drupal::messenger()->addMessage(t("Invalid credentials"), "error"); return; goto gE; dW: \Drupal::messenger()->addMessage(t("cURL is not enabled. Please enable cURL"), "error"); gE: } public function rest_api_authentication_back(&$form, $form_state) { $Wm = "CUSTOMER_SETUP"; \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_status", $Wm)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->clear("rest_api_authentication_customer_admin_email")->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->clear("rest_api_authentication_customer_admin_phone")->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->clear("rest_api_authentication_customer_password")->save(); \Drupal::messenger()->addMessage(t("Login with your miniOrange Account"), "status"); } function rest_api_authentication_validate_license_submit($form, &$form_state) { $k_ = str_replace(" ", '', $form["rest_api_authentication_license_key"]["#value"]); if (!empty($k_)) { goto hH; } \Drupal::messenger()->addMessage(t("The License Key field is mandatory."), "error"); return; hH: $Mb = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_customer_admin_email"); $NN = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_customer_admin_phone"); $vb = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentications_customer_password"); $x_ = new MiniorangeRestAPICustomer($Mb, $vb); $gJ = json_decode($x_->ccl(), true); $PA = $gJ["licensePlan"]; if (is_array($gJ)) { goto bp; } if (!(!isset($gJ["status"]) || empty($gJ["status"]) || !isset($gJ["licensePlan"]) || empty($gJ["licensePlan"]))) { goto IX; } \Drupal::messenger()->addMessage(t("Error:Something went wrong while processing your request."), "error"); return; IX: bp: if (!($gJ["status"] != "SUCCESS" || $gJ["licensePlan"] != Utilities::GetPlanName())) { goto g2; } \Drupal::messenger()->addMessage(t("Invalid license! Please use a valid license to activate the module"), "error"); return; g2: $bB = $x_->verifyLicense($k_); if (!(!is_array($bB) || empty($bB["status"]))) { goto mb; } \Drupal::messenger()->addMessage(t("Invalid response received while activating the license key."), "error"); return; mb: if (strcasecmp($bB["status"], "SUCCESS") == 0) { goto BD; } if (strcasecmp($bB->status, "FAILED") == 0) { goto X_; } \Drupal::messenger()->addMessage(t("An error occurred while processing your request. Please Try again."), "error"); return; goto zD; X_: if (strcasecmp($bB->message, "Code has Expired") == 0) { goto Gy; } \Drupal::messenger()->addMessage(t("You have entered an invalid license key. Please enter a valid license key."), "error"); return; goto Rs; Gy: \Drupal::messenger()->addMessage(t("License key you have entered has already been used. Please enter a key which has not been used before on any other instance or if you have exausted all your keys then buy more license from Licensing"), "error"); return; Rs: zD: goto o6; BD: \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_auth_licenseExpiry", $gJ["licenseExpiry"])->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_supportExpiry", $gJ["supportExpiry"])->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_license_key", $k_)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_status", "PLUGIN_CONFIGURATION")->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_license_plan", $PA)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_multi_site_plugin", isset($gJ["isMultiSitePluginRequested"]) ? $gJ["isMultiSitePluginRequested"] : false)->save(); \Drupal::messenger()->addMessage(t("Your license is verified. You can now setup the module."), "status"); $fL = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_customer_admin_token"); $fE = Utilities::check_fraud(); Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_admin_fraud_check", Utilities::encrypt_data($fE, $fL))->save(); o6: } function rest_api_authentication_remove_account(&$form, $form_state) { global $base_url; if (isset($_POST["value_check"]) && $_POST["value_check"] == "True") { goto t8; } $BG = array(); $BG = $_POST; $VD = $_POST["form_id"]; $Sj = $_POST["form_token"]; $pd = $_POST["op"]; $Kp = $_POST["form_build_id"]; global $base_url; echo " Confirmation\xa \xa \xa\xa
\xa
\xa Are you sure you want to remove account..!!
\xa

Warning : If you remove your account, you will have to enter licence key again after login/sign in with the new account.


\xa
\xa \xa \xa
\xa
\xa
\xa \xa "; exit; goto YJ; t8: if (!(\Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_license_key") != NULL)) { goto NW; } $Wm = "CUSTOMER_SETUP"; $Mb = \Drupal::config("rest_api_authentication.settings")->get("rest_api_authentication_customer_admin_email"); $dH = new MiniorangeRestAPICustomer($Mb, NULL); $Ek = json_decode($dH->updateStatus()); if (!($Ek->status == "SUCCESS")) { goto x8; } $m5 = ''; \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_admin_email", NULL)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_id", $m5)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_api_key", $m5)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_license_key", NULL)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_customer_password", $m5)->save(); \Drupal::configFactory()->getEditable("rest_api_authentication.settings")->set("rest_api_authentication_status", $Wm)->save(); \Drupal::messenger()->addMessage(t("Your account has been removed successfully!"), "status"); $_POST["value_check"] = "False"; x8: NW: YJ: } } ?>