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 if (defined("\x5f\120\x53\137\x56\x45\x52\x53\x49\x4f\116\137")) { goto oz..
Decoded Output download
<?php
if (defined("_PS_VERSION_")) {
goto oz;
}
exit;
oz:
require_once "controllers" . DIRECTORY_SEPARATOR . "front" . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "SPUrls.php";
require_once "controllers" . DIRECTORY_SEPARATOR . "front" . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "SAMLCustomerUtils.php";
require_once "controllers" . DIRECTORY_SEPARATOR . "front" . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "IDPMetadataReader.php";
require_once "controllers" . DIRECTORY_SEPARATOR . "front" . DIRECTORY_SEPARATOR . "sso.php";
require_once "controllers" . DIRECTORY_SEPARATOR . "front" . DIRECTORY_SEPARATOR . "metadata.php";
require_once "views" . DIRECTORY_SEPARATOR . "language" . DIRECTORY_SEPARATOR . "ModuleEnglish.php";
require_once "views" . DIRECTORY_SEPARATOR . "language" . DIRECTORY_SEPARATOR . "ModuleFrench.php";
class MoSamlSso extends Module
{
public function __construct()
{
$lR = new ModuleEnglish();
$this->name = "mosamlsso";
$this->tab = "administration";
$this->version = "1.0.3";
$this->author = "miniOrange Inc.";
$this->need_instance = 0;
$this->module_key = "7d16f2e80584dbdbdba1970311633c86";
$this->ps_versions_compliancy = ["min" => "1.0", "max" => _PS_VERSION_];
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l("SAML Single Sign-On");
$this->description = $this->l("The module allows your customers to log into your prestashop store by authenticating via any SAML compliant Identity Provider.");
$this->confirmUninstall = $this->l("Are you sure you want to uninstall?");
}
public function install()
{
if (!Shop::isFeatureActive()) {
goto j1;
}
Shop::setContext(Shop::CONTEXT_ALL);
j1:
return parent::install() && $this->registerHook("displayBanner") && $this->registerHook("actionCustomerLogoutBefore") && $this->registerHook("actionAdminLoginControllerLoginAfter") && $this->registerHook("actionAdminControllerInitBefore") && $this->registerHook("actionAdminLoginControllerBefore") && $this->registerHook("displayCustomerLoginFormAfter");
}
public function uninstall()
{
SAMLCustomerUtils::deactivateLicense();
Configuration::deleteByName("MO_IDP_ENTITY_ID");
Configuration::deleteByName("MO_SIGNED_REQUEST");
Configuration::deleteByName("MO_SAML_LOGIN_URL");
Configuration::deleteByName("MO_SAML_LOGOUT_URL");
Configuration::deleteByName("MO_SAML_NAMEID_FORMAT");
Configuration::deleteByName("MO_IDP_CERT");
Configuration::deleteByName("MO_CHARACTER_ENCODING");
Configuration::deleteByName("SAML_ATTR_EMAIL");
Configuration::deleteByName("SAML_ATTR_FIRST_NAME");
Configuration::deleteByName("SAML_ATTR_LAST_NAME");
Configuration::deleteByName("SAML_ATTR_GROUP");
Configuration::deleteByName("SAML_ATTR_DEFAULT_GROUP");
Configuration::deleteByName("SAML_DO_NOT_CREATE_NEW_ADMIN_USERS");
Configuration::deleteByName("SAML_DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED");
Configuration::deleteByName("SAML_DO_NOT_ALLOW_ADMIN_USERS_TO_LOGIN_WITH_GIVEN_GROUP");
Configuration::deleteByName("SAML_ATTR_GROUP_NOT_ALLOWED");
$UO = SPUrls::prestashopProfiles();
foreach ($UO as $sZ => $P9) {
$ch = "SAML_ATTR_" . $P9["name"];
Configuration::deleteByName($ch);
Bf:
}
tm:
Configuration::deleteByName("SAML_ENABLE_BACK_OFFICE_SSO");
Configuration::deleteByName("SAML_BACK_OFFICE_ADMIN_URL");
Configuration::deleteByName("SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT");
Configuration::deleteByName("SAML_ENABLE_BACK_OFFICE_BACKDOOR");
Configuration::deleteByName("SAML_ENABLE_BACK_OFFICE_RELAY_STATE");
Configuration::deleteByName("SAML_BACK_OFFICE_RELAY_STATE_URL");
Configuration::deleteByName("SAML_ENABLE_FRONT_OFFICE_SSO");
Configuration::deleteByName("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT_FROM_LOGIN");
Configuration::deleteByName("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT");
Configuration::deleteByName("SAML_ENABLE_FRONT_OFFICE_BACKDOOR");
Configuration::deleteByName("SAML_ENABLE_FRONT_OFFICE_RELAY_STATE");
Configuration::deleteByName("SAML_FRONT_OFFICE_RELAY_STATE_URL");
return true;
}
public function hookactionAdminControllerInitBefore()
{
$cn = Context::getContext();
if (!((isset($cn->employee) && $cn->employee->id > 0) == false)) {
goto Hc;
}
$UT = '';
$UT = !empty($_COOKIE["mo_saml_back_office_backdoor_login"]) ? $_COOKIE["mo_saml_back_office_backdoor_login"] : '';
if (!($UT != "mo_saml_back_office_backdoor_login")) {
goto YX;
}
$XV = Configuration::get("SAML_ENABLE_BACK_OFFICE_SSO");
$KH = Configuration::get("SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT");
$wm = SPUrls::getBackOfficeLoginURL();
if (!($XV && $KH)) {
goto vt;
}
if (!Configuration::get("SAML_ENABLE_BACK_OFFICE_BACKDOOR")) {
goto pb;
}
$Bu = true;
if (!\Tools::getIsset("saml_sso")) {
goto xn;
}
if (!(\Tools::getValue("saml_sso") == "false" || \Tools::getValue("saml_sso") == false)) {
goto pf;
}
$Bu = false;
pf:
xn:
$P6 = true;
if (!\Tools::getIsset("controller")) {
goto m7;
}
if (!(\Tools::getValue("controller") && \Tools::getValue("controller") == "AdminLogin")) {
goto MA;
}
$P6 = false;
MA:
m7:
if ($Bu || $P6) {
goto UJ;
}
$h2 = "mo_saml_back_office_backdoor_login";
setcookie($h2, $h2, time() + 21600, "/");
$pN = Configuration::get("SAML_BACK_OFFICE_ADMIN_URL");
Tools::redirect($pN);
goto qa;
UJ:
Tools::redirect($wm);
qa:
goto WX;
pb:
Tools::redirect($wm);
WX:
vt:
YX:
Hc:
}
public function hookactionAdminLoginControllerLoginAfter()
{
setcookie("mo_saml_back_office_backdoor_login", '', time() - 3600, "/");
}
public function hookactionAdminLoginControllerBefore()
{
if (empty($_COOKIE["set_slo_cookie"])) {
goto Ha;
}
$XV = Configuration::get("SAML_ENABLE_BACK_OFFICE_SSO");
$KH = Configuration::get("SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT");
if (!$XV) {
goto DE;
}
$Kk = Configuration::get("MO_SAML_LOGOUT_URL");
if (!($Kk != '')) {
goto De;
}
$xJ = SPUrls::getBackOfficeLogoutURL();
Tools::redirect($xJ);
De:
DE:
Ha:
}
public function hookDisplayBanner()
{
$Mg = Configuration::get("SAML_ENABLE_FRONT_OFFICE_SSO");
$a3 = Configuration::get("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT");
$iT = SPUrls::getAcsUrl() . "?option=saml_login";
if (!($Mg && $a3 && !$this->context->customer->isLogged())) {
goto ja;
}
if (!Configuration::get("SAML_ENABLE_FRONT_OFFICE_BACKDOOR")) {
goto tU;
}
$S3 = true;
if (!\Tools::getIsset(\Tools::getValue(["saml_sso"]))) {
goto uR;
}
if (!(\Tools::getValue("saml_sso") == "false" || \Tools::getValue("saml_sso") == false)) {
goto dq;
}
$S3 = false;
dq:
uR:
$I9 = true;
if (!(\Tools::getIsset(\Tools::getValue("back")) && \Tools::getValue("back") == "my-account")) {
goto NO;
}
$I9 = false;
NO:
if (!($S3 || $I9)) {
goto om;
}
\Tools::redirect($iT);
om:
goto hc;
tU:
\Tools::redirect($iT);
hc:
ja:
}
public function hookactionCustomerLogoutBefore()
{
$Mg = Configuration::get("SAML_ENABLE_FRONT_OFFICE_SSO");
$hx = '';
if (!$Mg) {
goto aG;
}
$hx = $this->context->cookie->__get("customer_sessionIndex");
aG:
if (!($hx != '')) {
goto KG;
}
$Kk = Configuration::get("MO_SAML_LOGOUT_URL");
if (!($Kk != '')) {
goto ND;
}
$Qa = SPUrls::getFrontOfficeLogoutURL();
Tools::redirect($Qa);
ND:
KG:
}
public function hookdisplayCustomerLoginFormAfter()
{
$JJ = Configuration::get("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT_FROM_LOGIN");
if (!$JJ) {
goto Me;
}
$iT = SPUrls::getAcsUrl() . "?option=saml_login";
Tools::redirect($iT);
Me:
}
public function upload_metadata($kI)
{
$eR = new DOMDocument();
$eR->loadXML($kI);
$fC = $eR->firstChild;
if (!empty($fC)) {
goto i1;
}
if (!empty($_FILES["META_FILE"]["tmp_name"])) {
goto vi;
}
if (!empty($_POST["metadata_url"])) {
goto AZ;
}
$ug = $this->displayError($this->l("Please provide a valid metadata file or a valid URL."));
return;
goto oq;
vi:
$ug = $this->displayError($this->l("Please provide a valid metadata file."));
goto oq;
AZ:
$ug = $this->displayError($this->l("Please provide a valid metadata URL."));
oq:
goto Gq;
i1:
$LC = new IDPMetadataReader($eR);
$WW = $LC->getIdentityProviders();
if (!empty($WW)) {
goto Of;
}
$ug = $this->displayError("Please provide a valid metadata file.");
return;
Of:
foreach ($WW as $sZ => $D7) {
$wi = "HttpRedirect";
$GH = '';
if (array_key_exists("HTTP-Redirect", $D7->getLoginDetails())) {
goto qm;
}
if (array_key_exists("HTTP-POST", $D7->getLoginDetails())) {
goto kr;
}
goto kT;
qm:
$GH = $D7->getLoginURL("HTTP-Redirect");
goto kT;
kr:
$wi = "HttpPost";
$GH = $D7->getLoginURL("HTTP-POST");
kT:
$GG = "HttpRedirect";
$FO = '';
if (array_key_exists("HTTP-Redirect", $D7->getLogoutDetails())) {
goto Ns;
}
if (array_key_exists("HTTP-POST", $D7->getLogoutDetails())) {
goto d5;
}
goto m1;
Ns:
$FO = $D7->getLogoutURL("HTTP-Redirect");
goto m1;
d5:
$GG = "HttpPost";
$FO = $D7->getLogoutURL("HTTP-POST");
m1:
$Oj = $D7->getEntityID();
$gD = $D7->getSigningCertificate();
$Jo = $gD[0];
$Jo = SPUrls::sanitize_certificate($Jo);
Configuration::updateValue("MO_IDP_ENTITY_ID", $Oj);
Configuration::updateValue("MO_SAML_LOGIN_URL", $GH);
Configuration::updateValue("MO_SAML_LOGOUT_URL", $FO);
Configuration::updateValue("MO_SAML_NAMEID_FORMAT", "1.1:nameid-format:unspecified");
Configuration::updateValue("MO_IDP_CERT", $Jo);
goto tH;
yQ:
}
tH:
$ug = $this->displayConfirmation($this->l("Identity Provider details saved successfully."));
Gq:
}
public function mo_saml_is_extension_installed($JP)
{
if (in_array($JP, get_loaded_extensions())) {
goto Lw;
}
return 0;
goto bc;
Lw:
return 1;
bc:
}
public function getContent()
{
$lR = new ModuleEnglish();
$this->context->controller->addJS($this->_path . "views/js/settings.js");
$ug = '';
if (!Tools::getIsset("update_license")) {
goto fA;
}
$Yz = SAMLCustomerUtils::check_customer_ln();
if ($Yz) {
goto JM;
}
return;
JM:
$Yz = json_decode($Yz, true);
if (strcasecmp($Yz["status"], "SUCCESS") == 0) {
goto Tz;
}
$ug = $this->displayError($this->l($lR::LICENSE_NOT_UPGRADED));
goto Xk;
Tz:
$Uq = $Yz["licenseExpiry"];
$ug = $this->displayConfirmation($this->l($lR::LICENSE_UPDATE));
Xk:
fA:
if (!Tools::getIsset("remove_account")) {
goto YW;
}
SAMLCustomerUtils::deactivateLicense();
YW:
if (!Tools::isSubmit("saml_mo_account_details" . $this->name)) {
goto kv;
}
$Nh = (string) Tools::getValue("mo_saml_admin_customer_email");
$ho = (string) Tools::getValue("SAML_CUSTOMER_PASSWORD");
if (empty($Nh) || empty($ho)) {
goto Xo;
}
$Yz = SAMLCustomerUtils::get_customer_key($Nh, $ho);
if ($Yz) {
goto I1;
}
return;
I1:
$dC = json_decode($Yz, true);
if (json_last_error() == JSON_ERROR_NONE) {
goto GO;
}
$ug = $this->displayError($this->l($lR::INVALID_PASSWORD_USERNAME));
goto hB;
GO:
Configuration::updateValue("mo_saml_admin_customer_email", $Nh);
Configuration::updateValue("mo_saml_admin_customer_key", $dC["id"]);
Configuration::updateValue("mo_saml_admin_api_key", $dC["apiKey"]);
Configuration::updateValue("mo_saml_customer_token", $dC["token"]);
hB:
goto gM;
Xo:
$ug = $this->displayError($this->l($lR::INVALID_VALUE));
gM:
kv:
if (!Tools::isSubmit("saml_mo_license_key" . $this->name)) {
goto L9;
}
$pV = (string) Tools::getValue("saml_LICENSE_KEY");
$Yz = SAMLCustomerUtils::check_customer_ln();
if ($Yz) {
goto mR;
}
return;
mR:
$Yz = json_decode($Yz, true);
$sZ = Configuration::get("mo_saml_customer_token");
if (!($sZ == '')) {
goto wj;
}
$sZ = "POT5XCI9BR";
wj:
if (strcasecmp($Yz["status"], "SUCCESS") == 0) {
goto NV;
}
$ug = $this->displayError($this->l($lR::LICENSE_NOT_UPGRADED));
goto MT;
NV:
$Uq = $Yz["licenseExpiry"];
$Yz = json_decode(SAMLCustomerUtils::mo_saml_vl($pV, false), true);
Configuration::updateValue("vl_check_t", time());
if (is_array($Yz) and strcasecmp($Yz["status"], "SUCCESS") == 0) {
goto Q3;
}
if (is_array($Yz) and strcasecmp($Yz["status"], "FAILED") == 0) {
goto ii;
}
$ug = $this->displayError($this->l($lR::REQUEST_ERROR));
goto EP;
Q3:
Configuration::updateValue("saml_lk", SAMLCustomerUtils::encrypt_data($pV, $sZ));
Configuration::updateValue("saml_site_status", SAMLCustomerUtils::encrypt_data("false", $sZ));
$ug = $this->displayConfirmation($this->l($lR::LICENSE_VERIFIED));
goto EP;
ii:
if (strcasecmp($Yz["message"], "Code has Expired") == 0) {
goto G9;
}
$ug = $this->displayError($this->l($lR::INVALID_LICENSE_KEY));
goto aC;
G9:
$ug = $this->displayError($this->l($lR::LICENSE_KEY_USED));
aC:
EP:
MT:
L9:
if (!Tools::isSubmit("submit_sp_metadata" . $this->name)) {
goto SP;
}
$Tq = (string) Tools::getValue("MO_SP_ENTITY_ID");
Configuration::updateValue("MO_SP_ENTITY_ID", $Tq);
$ug = $this->displayConfirmation($this->l($lR::CONFIRM));
SP:
if (!Tools::isSubmit("metaurlsubmit" . $this->name)) {
goto dm;
}
if (!(isset($_FILES["META_FILE"]) || Tools::getIsset(["META_URL"]))) {
goto CU;
}
if (!empty($_FILES["META_FILE"]["tmp_name"])) {
goto Tm;
}
if (!empty(Tools::getValue("META_URL"))) {
goto NR;
}
$ug = $this->displayError($this->l("Please provide a valid metadata file or a valid URL."));
goto Ai;
Tm:
$kI = Tools::file_get_contents($_FILES["META_FILE"]["tmp_name"]);
$this->upload_metadata($kI);
goto Ai;
NR:
if ($this->mo_saml_is_extension_installed("curl")) {
goto l2;
}
$ug = $this->displayError($this->l("PHP cURL extension is not installed or disabled. Cannot fetch metadata from URL."));
return;
l2:
$ku = filter_var(htmlspecialchars(Tools::getValue("META_URL"), FILTER_SANITIZE_URL));
$kI = Tools::file_get_contents($ku);
$this->upload_metadata($kI);
Ai:
CU:
dm:
if (!Tools::isSubmit("submit" . $this->name)) {
goto JU;
}
$tt = (string) Tools::getValue("MO_IDP_ENTITY_ID");
$O1 = (int) Tools::getvalue("MO_SIGNED_REQUEST");
$YY = (int) Tools::getvalue("MO_SLO_BINDING_TYPE");
$EX = (int) Tools::getvalue("MO_SSO_BINDING_TYPE");
$g0 = (string) Tools::getValue("MO_SAML_LOGIN_URL");
$Kk = (string) Tools::getValue("MO_SAML_LOGOUT_URL");
$yH = (string) Tools::getValue("MO_SAML_NAMEID_FORMAT");
$p9 = (string) Tools::getValue("MO_IDP_CERT");
$i7 = (int) Tools::getvalue("MO_CHARACTER_ENCODING");
if (!(empty($tt) || empty($g0) || empty($p9))) {
goto Ls;
}
$ug = $this->displayError($this->l($lR::INVALID_CONFIGURATION));
Ls:
Configuration::updateValue("MO_SLO_BINDING_TYPE", $YY);
Configuration::updateValue("MO_SSO_BINDING_TYPE", $EX);
Configuration::updateValue("MO_IDP_ENTITY_ID", $tt);
Configuration::updateValue("MO_SIGNED_REQUEST", $O1);
Configuration::updateValue("MO_SAML_LOGIN_URL", $g0);
Configuration::updateValue("MO_SAML_LOGOUT_URL", $Kk);
Configuration::updateValue("MO_SAML_NAMEID_FORMAT", $yH);
$p9 = SPUrls::sanitize_certificate($p9);
Configuration::updateValue("MO_IDP_CERT", $p9);
Configuration::updateValue("MO_CHARACTER_ENCODING", $i7);
$ug = $this->displayConfirmation($this->l($lR::CONFIRM));
JU:
if (!Tools::isSubmit("saml_save_user_attr" . $this->name)) {
goto S9;
}
$xn = (string) Tools::getValue("SAML_ATTR_EMAIL");
Configuration::updateValue("SAML_ATTR_EMAIL", $xn);
$oW = (string) Tools::getValue("SAML_ATTR_FIRST_NAME");
Configuration::updateValue("SAML_ATTR_FIRST_NAME", $oW);
$tm = (string) Tools::getValue("SAML_ATTR_LAST_NAME");
Configuration::updateValue("SAML_ATTR_LAST_NAME", $tm);
if ($xn) {
goto mw;
}
$ug = $ug . $this->displayError($this->l($lR::MAP_EMAIL));
mw:
if ($oW) {
goto ju;
}
$ug = $ug . $this->displayError($this->l($lR::MAP_FIRST_NAME));
ju:
if ($tm) {
goto lZ;
}
$ug = $ug . $this->displayError($this->l($lR::MAP_LAST_NAME));
lZ:
$ug = $ug . $this->displayConfirmation($this->l($lR::MAPPING_UPDATED));
S9:
if (!Tools::isSubmit("saml_save_user_group_attr" . $this->name)) {
goto a5;
}
$sq = (string) Tools::getValue("SAML_ATTR_GROUP");
$As = (int) Tools::getValue("SAML_ATTR_DEFAULT_GROUP");
$YW = (int) Tools::getValue("SAML_DO_NOT_CREATE_NEW_ADMIN_USERS");
$oK = (int) Tools::getValue("SAML_DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED");
$PV = (int) Tools::getValue("SAML_DO_NOT_ALLOW_ADMIN_USERS_TO_LOGIN_WITH_GIVEN_GROUP");
$RF = (string) Tools::getValue("SAML_ATTR_GROUP_NOT_ALLOWED");
$UO = SPUrls::prestashopProfiles();
$P4 = [];
foreach ($UO as $sZ => $P9) {
array_push($P4, $P9["id_profile"]);
$ch = "SAML_ATTR_" . $P9["name"];
$cl = (string) Tools::getValue($ch);
Configuration::updateValue($ch, $cl);
Vu:
}
QR:
Configuration::updateValue("SAML_ATTR_GROUP", $sq);
Configuration::updateValue("SAML_ATTR_DEFAULT_GROUP", $As);
Configuration::updateValue("SAML_DO_NOT_CREATE_NEW_ADMIN_USERS", $YW);
Configuration::updateValue("SAML_DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED", $oK);
Configuration::updateValue("SAML_DO_NOT_ALLOW_ADMIN_USERS_TO_LOGIN_WITH_GIVEN_GROUP", $PV);
Configuration::updateValue("SAML_ATTR_GROUP_NOT_ALLOWED", $RF);
if (isset($P4[$As])) {
goto cd;
}
$ug = $ug . $this->displayError($this->l($lR::ID_DOESNT_EXIST));
cd:
if ($sq) {
goto Tp;
}
$ug = $ug . $this->displayError($this->l($lR::MAP_GROUP));
Tp:
$ug = $ug . $this->displayConfirmation($this->l($lR::GROUP_MAPPING_UPDATED));
a5:
if (!Tools::isSubmit("saml_backoffice_settings" . $this->name)) {
goto RK;
}
$XV = (int) Tools::getvalue("SAML_ENABLE_BACK_OFFICE_SSO");
Configuration::updateValue("SAML_ENABLE_BACK_OFFICE_SSO", $XV);
$pN = (string) Tools::getValue("SAML_BACK_OFFICE_ADMIN_URL");
$VN = false;
if (filter_var($pN, FILTER_VALIDATE_URL)) {
goto NH;
}
if ($XV) {
goto pY;
}
goto oD;
NH:
Configuration::updateValue("SAML_BACK_OFFICE_ADMIN_URL", $pN);
goto oD;
pY:
$VN = true;
oD:
$KH = (int) Tools::getvalue("SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT");
Configuration::updateValue("SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT", $KH);
$RX = (int) Tools::getvalue("SAML_ENABLE_BACK_OFFICE_BACKDOOR");
Configuration::updateValue("SAML_ENABLE_BACK_OFFICE_BACKDOOR", $RX);
$av = (int) Tools::getvalue("SAML_ENABLE_BACK_OFFICE_RELAY_STATE");
Configuration::updateValue("SAML_ENABLE_BACK_OFFICE_RELAY_STATE", $av);
$qi = false;
$RJ = (string) Tools::getValue("SAML_BACK_OFFICE_RELAY_STATE_URL");
if (filter_var($RJ, FILTER_VALIDATE_URL)) {
goto TB;
}
if ($av) {
goto Kc;
}
goto rq;
TB:
Configuration::updateValue("SAML_BACK_OFFICE_RELAY_STATE_URL", $RJ);
goto rq;
Kc:
$qi = true;
rq:
if (!$VN) {
goto gj;
}
$ug = $ug . $this->displayError($this->l($lR::ENTER_VALID_BACKOFFICE_URL));
gj:
if (!$qi) {
goto Ux;
}
$ug = $ug . $this->displayError($this->l($lR::ENTER_VALID_RELAYSTATE));
Ux:
$ug = $ug . $this->displayConfirmation($this->l($lR::BACKOFFICE_SSO_UPDATED));
RK:
if (!Tools::isSubmit("saml_frontoffice_settings" . $this->name)) {
goto TS;
}
$Mg = (int) Tools::getvalue("SAML_ENABLE_FRONT_OFFICE_SSO");
Configuration::updateValue("SAML_ENABLE_FRONT_OFFICE_SSO", $Mg);
$JJ = (int) Tools::getvalue("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT_FROM_LOGIN");
Configuration::updateValue("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT_FROM_LOGIN", $JJ);
$a3 = (int) Tools::getvalue("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT");
Configuration::updateValue("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT", $a3);
$q5 = (int) Tools::getvalue("SAML_ENABLE_FRONT_OFFICE_BACKDOOR");
Configuration::updateValue("SAML_ENABLE_FRONT_OFFICE_BACKDOOR", $q5);
$p7 = (int) Tools::getvalue("SAML_ENABLE_FRONT_OFFICE_RELAY_STATE");
Configuration::updateValue("SAML_ENABLE_FRONT_OFFICE_RELAY_STATE", $p7);
$X9 = false;
$Br = (string) Tools::getValue("SAML_FRONT_OFFICE_RELAY_STATE_URL");
if (filter_var($Br, FILTER_VALIDATE_URL)) {
goto QW;
}
if ($p7) {
goto Lx;
}
goto Kg;
QW:
Configuration::updateValue("SAML_FRONT_OFFICE_RELAY_STATE_URL", $Br);
goto Kg;
Lx:
$X9 = true;
Kg:
if (!$X9) {
goto vU;
}
$ug = $ug . $this->displayError($this->l($lR::ENTER_VALID_FRONTOFFICE_URL));
vU:
$ug = $ug . $this->displayConfirmation($this->l($lR::FORNTOFFICE_SSO_UPDATED));
TS:
if (!Tools::isSubmit("saml_support_submit" . $this->name)) {
goto ih;
}
$Nh = (string) Tools::getValue("CUSTOMER_EMAIL");
$Mz = (string) Tools::getValue("CUSTOMER_QUERY");
if (empty($Nh) || empty($Mz)) {
goto Vh;
}
$Ba = false;
if (!filter_var($Nh, FILTER_VALIDATE_EMAIL)) {
goto NN;
}
$Ba = SAMLCustomerUtils::submit_contact_us($Nh, $Mz);
NN:
if ($Ba == false) {
goto Ys;
}
$ug = $this->displayConfirmation($this->l($lR::QUERY_SUBMITTED));
goto NF;
Ys:
$ug = $this->displayError($this->l($lR::QUERY_NOT_SUBMITTED));
NF:
goto zR;
Vh:
$ug = $this->displayError($this->l($lR::QUERY_NOT_SUBMITTED));
zR:
ih:
if (!SAMLCustomerUtils::isCustomerRegistered()) {
goto oA;
}
if (!SAMLCustomerUtils::isLicenseKeyVerified()) {
goto eE;
}
return $ug . $this->getSPForm($lR) . $this->uploadmetadata() . $this->getIDPForm($lR) . $this->SAMLAttributeMapping($lR) . $this->SAMLGroupMapping($lR) . $this->SAMLbackofficeSSOSettings($lR) . $this->SAMLFrontOfficeSSOSettings($lR);
goto cU;
oA:
return $ug . $this->SAMLLicenseExpired($lR) . $this->SAMLAccountVerification($lR) . $this->SAMLSupport($lR);
goto cU;
eE:
return $ug . $this->SAMLLicenseExpired($lR) . $this->SAMLLicenseVerification($lR) . $this->SAMLSupport($lR);
cU:
}
public function getSPForm($lR)
{
$VT = SPUrls::getCert();
$O5 = SPUrls::getMetaUrl();
$b4 = SPUrls::getMetaXml();
$form = ["form" => ["legend" => ["title" => $this->l($lR::SP_META_DATA)], "input" => [["type" => "text", "label" => $this->l($lR::SP_ENTITY_ID), "name" => "MO_SP_ENTITY_ID", "size" => 20], ["type" => "text", "label" => $this->l($lR::SP_ACS_URL), "name" => "MO_ACS_URL", "size" => 20, "disabled" => true], ["type" => "textarea", "label" => $this->l($lR::SP_CRT), "name" => "MO_SP_CERT", "size" => 20, "disabled" => true], ["type" => "text", "label" => $this->l($lR::METADATA_URL), "name" => "MO_SP_METADATA", "size" => 20, "disabled" => true]], "buttons" => [["href" => $VT, "type" => "button", "id" => "download_cert", "name" => "Download Certificate", "icon" => "icon-foo", "title" => $lR::DOWNLOAD_CRT], ["href" => $b4, "type" => "button", "id" => "download_xml", "name" => "Download XML ", "icon" => "icon-foo", "title" => $lR::DOWNLOAD_XML_METADATA]], "submit" => ["title" => $this->l($lR::SAVE), "icon" => "icon-foo"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "submit_sp_metadata" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["MO_SP_ENTITY_ID"] = SPUrls::getSPEntityID();
$fA->fields_value["MO_ACS_URL"] = SPUrls::getAcsUrl();
$fA->fields_value["MO_SP_METADATA"] = $O5;
$fA->fields_value["MO_SP_CERT"] = SPUrls::getPublicCert();
return $fA->generateForm([$form]);
}
public function uploadmetadata()
{
$form = ["form" => ["legend" => ["title" => $this->l("Upload Metadata")], "input" => [["type" => "file", "label" => "Select a file:", "name" => "META_FILE"], ["type" => "text", "label" => "Upload metadata URL:", "name" => "META_URL"]], "submit" => ["id" => "metaurlsubmit", "title" => $this->l("Fetch metadata"), "icon" => "icon-foo"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "metaurlsubmit" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["META_FILE"] = Tools::getValue("META_FILE", Configuration::get("META_FILE"));
$fA->fields_value["META_URL"] = Tools::getValue("META_URL", Configuration::get("META_URL"));
return $fA->generateForm([$form]);
}
public function getIDPForm($lR)
{
$is = ToolsCore::getShopDomainSsl(true) . __PS_BASE_URI__ . "module/mosamlsso/sso?option=saml_login&relayState=testValidate";
$O5 = Tools::getHttpHost(true) . __PS_BASE_URI__ . "modules\mosamlsso\sp-metadata.xml";
$form = ["form" => ["legend" => ["title" => $this->l($lR::SP_SET_UP)], "input" => [["type" => "text", "label" => $this->l($lR::IDP_ENTITY_ID), "name" => "MO_IDP_ENTITY_ID", "size" => 20, "required" => true], ["type" => "switch", "label" => $this->l($lR::MO_SIGNED_REQUEST), "name" => "MO_SIGNED_REQUEST", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "text", "label" => $this->l($lR::SAML_LOGIN_URL), "name" => "MO_SAML_LOGIN_URL", "size" => 20, "required" => true], ["type" => "radio", "label" => $this->l($lR::SELECT_BINDING_TYPE_FOR_SSO), "name" => "MO_SSO_BINDING_TYPE", "values" => [["id" => "active_on", "value" => 0, "label" => $this->l($lR::HTTP_REDIRECT_SSO)], ["id" => "active_ff", "value" => 1, "label" => $this->l($lR::HTTP_POST_SSO)]]], ["type" => "text", "label" => $this->l($lR::SAML_LOGOUT_URL), "name" => "MO_SAML_LOGOUT_URL", "size" => 20], ["type" => "radio", "label" => $this->l($lR::SELECT_BINDING_TYPE_FOR_SLO), "name" => "MO_SLO_BINDING_TYPE", "values" => [["id" => "active_on", "value" => 0, "label" => $this->l($lR::HTTP_REDIRECT_SLO)], ["id" => "active_ff", "value" => 1, "label" => $this->l($lR::HTTP_POST_SLO)]]], ["type" => "select", "label" => $this->trans($lR::NAME_ID_FORMATE), "name" => "MO_SAML_NAMEID_FORMAT", "required" => true, "options" => ["query" => [["id" => "1.1:nameid-format:email", "name" => $this->trans($lR::NAMEID_EMAIL)], ["id" => "1.1:nameid-format:unspecified", "name" => $this->trans($lR::UNSPECIFIED)], ["id" => "1.1:nameid-format:persistent", "name" => $this->trans($lR::NAMEID_PERSISTENT)], ["id" => "1.1:nameid-format:transcient", "name" => $this->trans($lR::NAMEID_TRANSCIENT)]], "id" => "id", "name" => "name"]], ["type" => "textarea", "label" => $this->l($lR::IDP_CERTIFICATE), "name" => "MO_IDP_CERT", "size" => 20, "id" => "idp_cert", "required" => true], ["type" => "switch", "label" => $this->l($lR::CHAR_ENCODING), "name" => "MO_CHARACTER_ENCODING", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]]], "buttons" => [["type" => "button", "id" => "test_config", "name" => $is, "icon" => "icon-foo", "title" => $lR::TEST_CONFIG]], "submit" => ["title" => $this->l($lR::SAVE), "icon" => "icon-foo"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "submit" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["MO_IDP_ENTITY_ID"] = Tools::getValue("MO_IDP_ENTITY_ID", Configuration::get("MO_IDP_ENTITY_ID"));
$fA->fields_value["MO_SIGNED_REQUEST"] = Tools::getValue("MO_SIGNED_REQUEST", Configuration::get("MO_SIGNED_REQUEST"));
$fA->fields_value["MO_SAML_LOGIN_URL"] = Tools::getValue("MO_SAML_LOGIN_URL", Configuration::get("MO_SAML_LOGIN_URL"));
$fA->fields_value["MO_SAML_LOGOUT_URL"] = Tools::getValue("MO_SAML_LOGOUT_URL", Configuration::get("MO_SAML_LOGOUT_URL"));
$fA->fields_value["MO_SLO_BINDING_TYPE"] = Tools::getValue("MO_SLO_BINDING_TYPE", Configuration::get("MO_SLO_BINDING_TYPE"));
$fA->fields_value["MO_SSO_BINDING_TYPE"] = Tools::getValue("MO_SSO_BINDING_TYPEss", Configuration::get("MO_SSO_BINDING_TYPE"));
$fA->fields_value["MO_SAML_NAMEID_FORMAT"] = SPUrls::getNameIDFormat();
$fA->fields_value["MO_IDP_CERT"] = Tools::getValue("MO_IDP_CERT", Configuration::get("MO_IDP_CERT"));
$fA->fields_value["MO_CHARACTER_ENCODING"] = Tools::getValue("MO_CHARACTER_ENCODING", Configuration::get("MO_CHARACTER_ENCODING"));
return $fA->generateForm([$form]);
}
public function SAMLAttributeMapping($lR)
{
$form = ["form" => ["legend" => ["title" => $this->l($lR::ATTR_MAPPING)], "input" => [["type" => "text", "label" => $this->l($lR::EMAIL), "name" => "SAML_ATTR_EMAIL", "size" => 20], ["type" => "text", "label" => $this->l($lR::FIRST_NAME), "name" => "SAML_ATTR_FIRST_NAME", "size" => 20], ["type" => "text", "label" => $this->l($lR::LAST_NAME), "name" => "SAML_ATTR_LAST_NAME", "size" => 20]], "submit" => ["id" => "saml_save_user_attr", "title" => $this->l($lR::SAVE), "icon" => "icon-foo"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "saml_save_user_attr" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["SAML_ATTR_EMAIL"] = Tools::getValue("SAML_ATTR_EMAIL", Configuration::get("SAML_ATTR_EMAIL"));
$fA->fields_value["SAML_ATTR_FIRST_NAME"] = Tools::getValue("SAML_ATTR_FIRST_NAME", Configuration::get("SAML_ATTR_FIRST_NAME"));
$fA->fields_value["SAML_ATTR_LAST_NAME"] = Tools::getValue("SAML_ATTR_LAST_NAME", Configuration::get("SAML_ATTR_LAST_NAME"));
return $fA->generateForm([$form]);
}
public function SAMLGroupMapping($lR)
{
$UO = SPUrls::prestashopProfiles();
$Uc = [];
$Uc[] = ["type" => "text", "label" => $this->l($lR::GROUP), "name" => "SAML_ATTR_GROUP", "size" => 20, "required" => true];
$Uc[] = ["type" => "switch", "label" => $this->l($lR::DONT_CREATE_BACK_OFFICE_USER), "name" => "SAML_DO_NOT_CREATE_NEW_ADMIN_USERS", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]];
$Uc[] = ["type" => "switch", "label" => $this->l($lR::DONT_LOGIN_NON_MAPPED_USER), "name" => "SAML_DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]];
$Uc[] = ["type" => "switch", "label" => $this->l($lR::DONT_ALLOW_NONMAPPED_USERS_TO_LOGIN), "name" => "SAML_DO_NOT_ALLOW_ADMIN_USERS_TO_LOGIN_WITH_GIVEN_GROUP", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]];
$Uc[] = ["type" => "text", "label" => $this->l($lR::GROUPS_NOT_ALLOWED_SSO), "name" => "SAML_ATTR_GROUP_NOT_ALLOWED", "size" => 20, "required" => true];
$Uc[] = ["type" => "text", "label" => $this->l($lR::DEFAULT_BACKOFFICE_ID), "name" => "SAML_ATTR_DEFAULT_GROUP", "size" => 20, "required" => true];
foreach ($UO as $sZ => $P9) {
$Uc[] = ["type" => "text", "label" => $P9["name"], "name" => "SAML_ATTR_" . $P9["name"], "size" => 20];
HS:
}
vp:
$form = ["form" => ["legend" => ["title" => $this->l($lR::BACKOFFICE_GROUP_ROLL_MAPPING)], "input" => $Uc, "submit" => ["id" => "saml_save_user_group_attr", "title" => $this->l($lR::SAVE), "icon" => "icon-foo"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "saml_save_user_group_attr" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["SAML_ATTR_GROUP"] = Tools::getValue("SAML_ATTR_GROUP", Configuration::get("SAML_ATTR_GROUP"));
$fA->fields_value["SAML_DO_NOT_CREATE_NEW_ADMIN_USERS"] = Tools::getValue("SAML_DO_NOT_CREATE_NEW_ADMIN_USERS", Configuration::get("SAML_DO_NOT_CREATE_NEW_ADMIN_USERS", true));
$fA->fields_value["SAML_DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED"] = Tools::getValue("SAML_DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED", Configuration::get("SAML_DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED", true));
$fA->fields_value["SAML_DO_NOT_ALLOW_ADMIN_USERS_TO_LOGIN_WITH_GIVEN_GROUP"] = Tools::getValue("SAML_DO_NOT_ALLOW_ADMIN_USERS_TO_LOGIN_WITH_GIVEN_GROUP", Configuration::get("SAML_DO_NOT_ALLOW_ADMIN_USERS_TO_LOGIN_WITH_GIVEN_GROUP"));
$fA->fields_value["SAML_ATTR_GROUP_NOT_ALLOWED"] = Tools::getValue("SAML_ATTR_GROUP_NOT_ALLOWED", Configuration::get("SAML_ATTR_GROUP_NOT_ALLOWED"));
$fA->fields_value["SAML_ATTR_DEFAULT_GROUP"] = Tools::getValue("SAML_ATTR_DEFAULT_GROUP", Configuration::get("SAML_ATTR_DEFAULT_GROUP"));
foreach ($UO as $sZ => $P9) {
$ch = "SAML_ATTR_" . $P9["name"];
$cl = Tools::getValue($ch, Configuration::get($ch));
$fA->fields_value[$ch] = $cl;
M8:
}
wC:
return $fA->generateForm([$form]);
}
public function SAMLBackOfficeSSOSettings($lR)
{
$form = ["form" => ["legend" => ["title" => $this->l($lR::BACKOFFICE_REDIRECTION_SETTINGS)], "input" => [["type" => "switch", "label" => $this->l($lR::ENABLE_BACKOFFICE_SSO), "name" => "SAML_ENABLE_BACK_OFFICE_SSO", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "text", "label" => $this->l($lR::BACKOFFICE_ADMIN_URL), "name" => "SAML_BACK_OFFICE_ADMIN_URL", "size" => 20, "required" => true], ["type" => "switch", "label" => $this->l($lR::AUTO_REDIRECT_FORM_BACK_OFFICE), "name" => "SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "switch", "label" => $this->l($lR::ENABLE_BACKOFFICE_BACKDOOR), "name" => "SAML_ENABLE_BACK_OFFICE_BACKDOOR", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "text", "label" => $this->l($lR::BACKOFFICE_BACKDOOR_URL), "name" => "SAML_BACK_OFFICE_BACKDOOR_URL", "size" => 20, "disabled" => true], ["type" => "switch", "label" => $this->l($lR::RELAYSTATE_BACKOFFICE), "name" => "SAML_ENABLE_BACK_OFFICE_RELAY_STATE", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "text", "label" => $this->l($lR::BACK_OFFICE_RELAYSTATE_URL), "name" => "SAML_BACK_OFFICE_RELAY_STATE_URL", "size" => 20, "required" => true], ["type" => "text", "label" => $this->l($lR::BACKOFFICE_SSO_INIT_URL), "name" => "SAML_BACK_OFFICE_LOGIN_URL", "size" => 20, "disabled" => true], ["type" => "text", "label" => $this->l($lR::BACKOFFICE_SLO_INIT_URL), "name" => "SAML_BACK_OFFICE_LOGOUT_URL", "size" => 20, "disabled" => true]], "submit" => ["id" => "saml_backoffice_settings", "title" => $this->l($lR::UPDATE), "icon" => "icon-foo"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "saml_backoffice_settings" . $this->name;
$fA->fields_value["SAML_ENABLE_BACK_OFFICE_SSO"] = Tools::getValue("SAML_ENABLE_BACK_OFFICE_SSO", Configuration::get("SAML_ENABLE_BACK_OFFICE_SSO"));
$fA->fields_value["SAML_BACK_OFFICE_ADMIN_URL"] = Tools::getValue("SAML_BACK_OFFICE_ADMIN_URL", Configuration::get("SAML_BACK_OFFICE_ADMIN_URL"));
$fA->fields_value["SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT"] = Tools::getValue("SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT", Configuration::get("SAML_ENABLE_BACK_OFFICE_AUTO_REDIRECT"));
$fA->fields_value["SAML_ENABLE_BACK_OFFICE_BACKDOOR"] = Tools::getValue("SAML_ENABLE_BACK_OFFICE_BACKDOOR", Configuration::get("SAML_ENABLE_BACK_OFFICE_BACKDOOR"));
$fA->fields_value["SAML_BACK_OFFICE_BACKDOOR_URL"] = Tools::getValue("SAML_BACK_OFFICE_ADMIN_URL", Configuration::get("SAML_BACK_OFFICE_ADMIN_URL")) . "/index.php?controller=AdminLogin&saml_sso=false";
$fA->fields_value["SAML_ENABLE_BACK_OFFICE_RELAY_STATE"] = Tools::getValue("SAML_ENABLE_BACK_OFFICE_RELAY_STATE", Configuration::get("SAML_ENABLE_BACK_OFFICE_RELAY_STATE"));
$fA->fields_value["SAML_BACK_OFFICE_RELAY_STATE_URL"] = Tools::getValue("SAML_BACK_OFFICE_RELAY_STATE_URL", Configuration::get("SAML_BACK_OFFICE_RELAY_STATE_URL"));
$fA->fields_value["SAML_BACK_OFFICE_LOGIN_URL"] = SPUrls::getBackOfficeLoginURL();
$fA->fields_value["SAML_BACK_OFFICE_LOGOUT_URL"] = SPUrls::getBackOfficeLogoutURL();
return $fA->generateForm([$form]);
}
public function SAMLFrontOfficeSSOSettings($lR)
{
$form = ["form" => ["legend" => ["title" => $this->l($lR::FRONTOFFICE_REDIRECT_SETTING)], "input" => [["type" => "switch", "label" => $this->l($lR::ENABLE_FRONTOFFICE_SSO), "name" => "SAML_ENABLE_FRONT_OFFICE_SSO", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "switch", "label" => $this->l($lR::AUTO_REDIRECT_FORM_FRONT_OFFICE_FROM_LOGIN), "name" => "SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT_FROM_LOGIN", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "switch", "label" => $this->l($lR::AUTO_REDIRECT_FORM_FRONT_OFFICE), "name" => "SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "switch", "label" => $this->l($lR::SAML_ENABLE_FRONT_OFFICE_BACKDOOR), "name" => "SAML_ENABLE_FRONT_OFFICE_BACKDOOR", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "text", "label" => $this->l($lR::FRONTOFFICE_BACKDOOR_URL), "name" => "SAML_FRONT_OFFICE_BACKDOOR_URL", "size" => 20, "disabled" => true], ["type" => "switch", "label" => $this->l($lR::ENABLE_RELAYSTATE_FRONT_OFFICE), "name" => "SAML_ENABLE_FRONT_OFFICE_RELAY_STATE", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l($lR::YES)], ["id" => "active_ff", "value" => 0, "label" => $this->l($lR::NO)]]], ["type" => "text", "label" => $this->l($lR::FRONT_OFFICE_RELAY_STATE_URL), "name" => "SAML_FRONT_OFFICE_RELAY_STATE_URL", "size" => 20, "required" => true], ["type" => "text", "label" => $this->l($lR::FRONTOFFICE_SSO_INIT_URL), "name" => "SAML_FRONT_OFFICE_LOGIN_URL", "size" => 20, "disabled" => true], ["type" => "text", "label" => $this->l($lR::SAML_FRONT_OFFICE_LOGOUT_URL), "name" => "SAML_FRONT_OFFICE_LOGOUT_URL", "size" => 20, "disabled" => true]], "submit" => ["id" => "saml_frontoffice_settings", "title" => $this->l($lR::UPDATE), "icon" => "icon-foo"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "saml_frontoffice_settings" . $this->name;
$fA->fields_value["SAML_ENABLE_FRONT_OFFICE_SSO"] = Tools::getValue("SAML_ENABLE_FRONT_OFFICE_SSO", Configuration::get("SAML_ENABLE_FRONT_OFFICE_SSO"));
$fA->fields_value["SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT_FROM_LOGIN"] = Tools::getValue("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT_FROM_LOGIN", Configuration::get("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT_FROM_LOGIN"));
$fA->fields_value["SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT"] = Tools::getValue("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT", Configuration::get("SAML_ENABLE_FRONT_OFFICE_AUTO_REDIRECT"));
$fA->fields_value["SAML_ENABLE_FRONT_OFFICE_RELAY_STATE"] = Tools::getValue("SAML_ENABLE_FRONT_OFFICE_RELAY_STATE", Configuration::get("SAML_ENABLE_FRONT_OFFICE_RELAY_STATE"));
$fA->fields_value["SAML_FRONT_OFFICE_RELAY_STATE_URL"] = Tools::getValue("SAML_FRONT_OFFICE_RELAY_STATE_URL", Configuration::get("SAML_FRONT_OFFICE_RELAY_STATE_URL"));
$fA->fields_value["SAML_ENABLE_FRONT_OFFICE_BACKDOOR"] = Tools::getValue("SAML_ENABLE_FRONT_OFFICE_BACKDOOR", Configuration::get("SAML_ENABLE_FRONT_OFFICE_BACKDOOR"));
$fA->fields_value["SAML_FRONT_OFFICE_BACKDOOR_URL"] = SPUrls::getFrontOfficeBackDoorURL();
$fA->fields_value["SAML_FRONT_OFFICE_LOGIN_URL"] = SPUrls::getAcsUrl() . "?option=saml_login";
$fA->fields_value["SAML_FRONT_OFFICE_LOGOUT_URL"] = SPUrls::getFrontOfficeLogoutURL();
return $fA->generateForm([$form]);
}
public function testConfig($Gy)
{
foreach ($Gy as $sZ => $P9) {
$iG = $P9[0];
$Gy[$sZ] = $iG;
C3:
}
by:
$this->context->smarty->assign(["profile" => $Gy]);
return $this->context->smarty->fetch($this->local_path . "views/templates/front/testconfig.tpl");
}
public function SAMLAccountVerification($lR)
{
$form = ["form" => ["legend" => ["title" => $this->l($lR::LOGIN_MINIORANGE_ACC)], "input" => [["type" => "text", "label" => $this->l($lR::EMAIL), "name" => "mo_saml_admin_customer_email", "size" => 20, "required" => true], ["type" => "password", "label" => $this->l($lR::PASSWORD), "name" => "SAML_CUSTOMER_PASSWORD", "size" => 20, "required" => true]], "submit" => ["id" => "saml_mo_account_details", "title" => $this->l($lR::SAVE), "class" => "btn btn-default pull-right"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "saml_mo_account_details" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["mo_saml_admin_customer_email"] = '';
$fA->fields_value["SAML_CUSTOMER_PASSWORD"] = '';
return $fA->generateForm([$form]);
}
public function SAMLLicenseVerification($lR)
{
$form = ["form" => ["legend" => ["title" => $this->l($lR::ENTER_LICENSE_KEY)], "input" => [["type" => "text", "label" => $this->l($lR::LICENSE_KEY), "name" => "SAML_LICENSE_KEY", "size" => 20, "required" => true]], "submit" => ["id" => "saml_mo_license_key", "title" => $this->l($lR::SAVE), "class" => "btn btn-default pull-right"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "saml_mo_license_key" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["SAML_LICENSE_KEY"] = '';
return $fA->generateForm([$form]);
}
public function SAMLAccountDetails($lR)
{
$form = ["form" => ["legend" => ["title" => $this->l($lR::ACCOUNT_INFO)], "input" => [["type" => "text", "label" => $this->l($lR::MINIORANGE_EMAIL), "name" => "mo_saml_admin_customer_email", "size" => 20, "disabled" => true]], "buttons" => [["type" => "submit", "id" => "update_license", "name" => "update_license", "icon" => "icon-foo", "title" => $lR::UPDATE_LICENSE], ["type" => "submit", "id" => "remove_account", "name" => "remove_account", "icon" => "icon-foo", "title" => $lR::REMOVE_ACC]]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["mo_saml_admin_customer_email"] = Tools::getValue("mo_saml_admin_customer_email", Configuration::get("mo_saml_admin_customer_email"));
return $fA->generateForm([$form]);
}
public function SAMLSupport($lR)
{
$form = ["form" => ["legend" => ["title" => $this->l($lR::MINIORANGE_SUPPORT)], "input" => [["type" => "text", "label" => $this->l($lR::YOUR_EMAIL), "name" => "CUSTOMER_EMAIL", "size" => 20, "required" => true], ["type" => "textarea", "label" => $this->l($lR::QUERY), "name" => "CUSTOMER_QUERY", "size" => 40, "required" => true]], "submit" => ["id" => "saml_support_submit", "title" => $this->l($lR::SEND), "icon" => "icon-foo"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "saml_support_submit" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["CUSTOMER_EMAIL"] = '';
$fA->fields_value["CUSTOMER_QUERY"] = '';
return $fA->generateForm([$form]);
}
public function SAMLLicenseExpired($lR)
{
$form = ["form" => ["legend" => ["title" => $this->l($lR::MODULE_NOT_ACTIVE)]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("AdminModules");
$fA->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$fA->submit_action = "support_submit" . $this->name;
$fA->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$fA->fields_value["CUSTOMER_EMAIL"] = '';
$fA->fields_value["CUSTOMER_QUERY"] = '';
return $fA->generateForm([$form]);
}
}
?>
Did this file decode correctly?
Original Code
<?php
if (defined("\x5f\120\x53\137\x56\x45\x52\x53\x49\x4f\116\137")) {
goto oz;
}
exit;
oz:
require_once "\143\x6f\x6e\x74\x72\x6f\x6c\154\x65\x72\x73" . DIRECTORY_SEPARATOR . "\146\162\x6f\x6e\x74" . DIRECTORY_SEPARATOR . "\x6c\151\142" . DIRECTORY_SEPARATOR . "\x53\x50\x55\162\154\163\x2e\160\x68\x70";
require_once "\143\157\x6e\164\162\157\154\x6c\x65\x72\163" . DIRECTORY_SEPARATOR . "\x66\x72\157\156\x74" . DIRECTORY_SEPARATOR . "\154\x69\142" . DIRECTORY_SEPARATOR . "\x53\x41\x4d\x4c\x43\165\x73\164\157\155\145\162\125\164\x69\x6c\x73\x2e\160\150\160";
require_once "\143\157\156\x74\x72\157\154\154\x65\162\x73" . DIRECTORY_SEPARATOR . "\x66\162\157\x6e\164" . DIRECTORY_SEPARATOR . "\x6c\151\x62" . DIRECTORY_SEPARATOR . "\x49\104\120\x4d\145\164\x61\144\141\x74\x61\122\145\141\x64\x65\162\x2e\160\150\x70";
require_once "\x63\157\156\164\162\157\x6c\154\x65\x72\163" . DIRECTORY_SEPARATOR . "\x66\x72\x6f\156\164" . DIRECTORY_SEPARATOR . "\163\163\157\56\x70\x68\x70";
require_once "\x63\x6f\x6e\164\162\157\x6c\154\145\x72\163" . DIRECTORY_SEPARATOR . "\x66\x72\x6f\x6e\x74" . DIRECTORY_SEPARATOR . "\x6d\x65\x74\141\x64\x61\164\x61\56\x70\150\x70";
require_once "\166\x69\x65\x77\163" . DIRECTORY_SEPARATOR . "\154\x61\156\x67\x75\x61\147\145" . DIRECTORY_SEPARATOR . "\115\x6f\x64\x75\x6c\x65\105\156\147\x6c\x69\163\x68\56\160\x68\160";
require_once "\x76\x69\145\x77\x73" . DIRECTORY_SEPARATOR . "\x6c\x61\156\147\165\141\147\x65" . DIRECTORY_SEPARATOR . "\115\x6f\x64\165\x6c\x65\x46\162\x65\156\143\150\56\160\150\x70";
class MoSamlSso extends Module
{
public function __construct()
{
$lR = new ModuleEnglish();
$this->name = "\x6d\x6f\x73\141\155\x6c\x73\x73\157";
$this->tab = "\141\x64\x6d\151\x6e\x69\163\x74\162\x61\x74\151\157\156";
$this->version = "\61\56\x30\56\x33";
$this->author = "\155\x69\156\151\117\x72\141\x6e\x67\x65\40\111\x6e\x63\x2e";
$this->need_instance = 0;
$this->module_key = "\x37\x64\x31\x36\146\62\145\70\60\x35\x38\x34\x64\142\144\x62\x64\142\x61\x31\x39\67\x30\63\x31\61\66\x33\63\x63\70\66";
$this->ps_versions_compliancy = ["\x6d\x69\156" => "\61\x2e\x30", "\x6d\x61\x78" => _PS_VERSION_];
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l("\x53\x41\x4d\114\40\123\x69\156\147\x6c\x65\x20\123\x69\147\156\55\117\x6e");
$this->description = $this->l("\124\150\x65\40\155\x6f\144\x75\154\145\40\x61\x6c\x6c\157\167\163\40\171\157\x75\x72\x20\x63\165\x73\164\x6f\x6d\145\162\163\40\164\157\x20\x6c\157\x67\40\x69\156\x74\x6f\x20\171\157\165\x72\40\160\162\x65\163\x74\x61\163\150\x6f\160\x20\163\x74\x6f\x72\x65\40\x62\171\x20\x61\165\x74\150\145\156\164\151\x63\x61\x74\x69\156\x67\x20\x76\x69\x61\40\141\x6e\x79\x20\123\x41\115\114\40\x63\157\x6d\x70\154\x69\141\x6e\164\40\111\144\x65\x6e\164\x69\164\171\x20\120\x72\x6f\x76\151\144\145\162\x2e");
$this->confirmUninstall = $this->l("\x41\x72\145\40\x79\x6f\x75\40\163\165\x72\x65\40\x79\x6f\x75\40\167\141\156\x74\40\x74\x6f\x20\x75\156\x69\156\x73\x74\141\154\154\77");
}
public function install()
{
if (!Shop::isFeatureActive()) {
goto j1;
}
Shop::setContext(Shop::CONTEXT_ALL);
j1:
return parent::install() && $this->registerHook("\144\151\163\160\x6c\141\171\x42\141\x6e\x6e\145\x72") && $this->registerHook("\x61\143\x74\151\157\x6e\x43\165\163\x74\157\155\x65\162\x4c\x6f\x67\157\x75\x74\102\x65\146\x6f\x72\145") && $this->registerHook("\141\143\x74\151\157\156\101\144\x6d\x69\x6e\114\x6f\x67\x69\156\x43\157\x6e\164\162\x6f\154\x6c\x65\162\x4c\x6f\x67\x69\x6e\x41\146\x74\145\x72") && $this->registerHook("\141\143\x74\x69\x6f\156\101\144\155\x69\x6e\103\x6f\x6e\164\162\x6f\x6c\154\145\162\111\x6e\x69\x74\x42\145\x66\157\x72\145") && $this->registerHook("\141\143\x74\x69\x6f\x6e\101\144\x6d\x69\156\114\x6f\x67\x69\156\103\x6f\x6e\x74\162\x6f\x6c\154\145\162\102\x65\x66\x6f\162\x65") && $this->registerHook("\x64\x69\x73\x70\154\x61\171\x43\x75\x73\164\157\155\145\x72\x4c\157\147\x69\156\x46\157\x72\155\101\146\x74\145\162");
}
public function uninstall()
{
SAMLCustomerUtils::deactivateLicense();
Configuration::deleteByName("\x4d\x4f\x5f\111\104\120\x5f\x45\116\x54\x49\x54\x59\x5f\111\x44");
Configuration::deleteByName("\x4d\x4f\x5f\123\x49\107\x4e\105\104\x5f\x52\x45\x51\125\x45\x53\x54");
Configuration::deleteByName("\x4d\x4f\x5f\123\101\115\114\137\x4c\117\107\111\x4e\x5f\x55\x52\x4c");
Configuration::deleteByName("\115\117\x5f\123\101\x4d\114\137\114\x4f\107\x4f\x55\124\137\x55\122\114");
Configuration::deleteByName("\115\117\x5f\123\101\115\x4c\x5f\x4e\101\x4d\x45\x49\104\137\106\x4f\122\115\101\x54");
Configuration::deleteByName("\115\117\137\x49\x44\120\x5f\x43\x45\122\124");
Configuration::deleteByName("\x4d\x4f\x5f\x43\110\x41\122\x41\x43\124\105\x52\137\x45\x4e\x43\x4f\104\111\x4e\x47");
Configuration::deleteByName("\x53\x41\x4d\114\x5f\x41\124\124\122\137\x45\x4d\101\111\114");
Configuration::deleteByName("\x53\x41\x4d\114\137\x41\124\124\122\x5f\106\x49\122\x53\124\x5f\116\x41\x4d\x45");
Configuration::deleteByName("\123\101\115\114\137\x41\124\124\x52\x5f\x4c\x41\123\x54\x5f\x4e\x41\115\105");
Configuration::deleteByName("\123\101\115\114\x5f\101\x54\124\122\x5f\x47\x52\117\125\x50");
Configuration::deleteByName("\x53\x41\x4d\x4c\x5f\101\x54\124\x52\137\104\105\106\x41\125\114\x54\137\x47\x52\x4f\x55\x50");
Configuration::deleteByName("\123\101\x4d\x4c\x5f\104\x4f\137\116\117\124\137\x43\122\105\x41\x54\105\x5f\x4e\x45\x57\x5f\101\104\x4d\111\116\137\125\x53\105\122\123");
Configuration::deleteByName("\x53\101\115\114\x5f\104\x4f\137\x4e\x4f\124\x5f\x43\122\x45\101\124\x45\x5f\x41\104\x4d\111\x4e\137\125\x53\x45\x52\123\x5f\127\111\124\110\117\125\124\137\x47\x52\x4f\125\120\137\115\x41\120\120\105\104");
Configuration::deleteByName("\123\101\x4d\114\x5f\x44\x4f\x5f\x4e\x4f\124\137\101\114\x4c\x4f\x57\x5f\x41\104\115\x49\116\x5f\x55\123\105\122\x53\x5f\124\117\137\x4c\117\107\111\116\x5f\127\111\x54\x48\137\107\111\126\105\116\137\107\x52\x4f\x55\120");
Configuration::deleteByName("\x53\101\x4d\x4c\137\x41\124\x54\x52\137\107\x52\x4f\125\x50\137\x4e\x4f\x54\x5f\x41\114\114\117\x57\x45\104");
$UO = SPUrls::prestashopProfiles();
foreach ($UO as $sZ => $P9) {
$ch = "\x53\x41\115\114\x5f\x41\124\124\x52\137" . $P9["\156\x61\x6d\x65"];
Configuration::deleteByName($ch);
Bf:
}
tm:
Configuration::deleteByName("\123\101\115\x4c\x5f\105\116\101\102\x4c\x45\x5f\102\x41\103\x4b\137\x4f\106\106\x49\x43\x45\x5f\x53\x53\x4f");
Configuration::deleteByName("\x53\101\115\114\137\102\101\103\113\x5f\117\x46\x46\x49\x43\105\137\101\x44\115\x49\116\x5f\125\x52\114");
Configuration::deleteByName("\x53\x41\x4d\114\137\x45\x4e\101\x42\x4c\x45\137\x42\101\103\113\137\x4f\x46\106\111\103\x45\137\x41\125\x54\117\137\122\105\104\x49\x52\105\x43\124");
Configuration::deleteByName("\x53\x41\115\114\137\x45\116\x41\102\114\105\x5f\x42\101\103\113\x5f\x4f\106\106\x49\x43\105\137\102\101\x43\113\x44\117\117\122");
Configuration::deleteByName("\123\101\115\x4c\x5f\105\x4e\101\102\x4c\x45\x5f\102\101\103\113\x5f\x4f\106\x46\x49\x43\105\x5f\122\x45\x4c\x41\131\137\123\124\x41\124\x45");
Configuration::deleteByName("\x53\x41\x4d\x4c\137\102\x41\103\x4b\x5f\117\106\x46\111\103\105\x5f\x52\105\114\101\x59\137\123\124\x41\x54\105\137\125\x52\114");
Configuration::deleteByName("\123\x41\x4d\114\137\x45\116\101\102\114\105\x5f\106\x52\x4f\x4e\x54\x5f\117\106\x46\111\103\x45\x5f\x53\123\117");
Configuration::deleteByName("\x53\101\x4d\114\137\105\116\101\102\114\105\x5f\x46\x52\117\116\124\x5f\x4f\x46\x46\x49\103\x45\137\x41\x55\x54\117\137\122\x45\x44\x49\x52\105\103\124\x5f\x46\122\x4f\115\137\114\117\107\111\116");
Configuration::deleteByName("\123\101\115\114\x5f\105\x4e\x41\102\x4c\105\137\106\122\117\x4e\x54\137\x4f\106\106\x49\103\x45\x5f\x41\125\x54\117\137\122\x45\x44\x49\122\x45\x43\x54");
Configuration::deleteByName("\123\x41\115\114\137\x45\x4e\101\102\114\105\x5f\x46\x52\x4f\116\124\x5f\x4f\x46\106\x49\x43\105\x5f\102\101\x43\113\x44\117\117\122");
Configuration::deleteByName("\123\x41\115\114\137\105\116\101\x42\114\x45\137\x46\x52\117\116\x54\x5f\117\x46\x46\x49\103\105\x5f\122\x45\x4c\x41\x59\137\x53\124\x41\x54\x45");
Configuration::deleteByName("\x53\101\115\x4c\137\106\122\x4f\x4e\x54\137\117\x46\x46\x49\x43\105\x5f\122\x45\x4c\x41\131\x5f\123\124\101\x54\x45\x5f\125\x52\114");
return true;
}
public function hookactionAdminControllerInitBefore()
{
$cn = Context::getContext();
if (!((isset($cn->employee) && $cn->employee->id > 0) == false)) {
goto Hc;
}
$UT = '';
$UT = !empty($_COOKIE["\155\x6f\x5f\x73\141\x6d\x6c\137\142\141\143\x6b\137\157\146\x66\151\143\x65\137\x62\x61\143\153\144\x6f\157\x72\x5f\x6c\157\147\x69\156"]) ? $_COOKIE["\155\x6f\137\163\x61\155\154\x5f\142\x61\x63\153\137\x6f\146\146\151\x63\145\137\142\141\143\x6b\144\157\x6f\x72\x5f\x6c\157\x67\x69\x6e"] : '';
if (!($UT != "\155\157\x5f\163\141\155\x6c\x5f\x62\141\143\153\137\157\146\x66\x69\143\145\137\x62\141\x63\x6b\x64\157\157\162\137\x6c\x6f\x67\x69\156")) {
goto YX;
}
$XV = Configuration::get("\123\101\115\114\137\105\x4e\x41\102\114\105\137\102\101\103\x4b\137\x4f\x46\x46\111\103\x45\x5f\x53\x53\117");
$KH = Configuration::get("\x53\101\115\x4c\x5f\105\x4e\x41\102\x4c\x45\137\x42\x41\x43\x4b\x5f\x4f\x46\106\111\103\105\x5f\101\x55\124\x4f\x5f\122\105\x44\111\122\105\x43\x54");
$wm = SPUrls::getBackOfficeLoginURL();
if (!($XV && $KH)) {
goto vt;
}
if (!Configuration::get("\123\101\115\x4c\137\x45\116\101\x42\114\105\137\x42\101\103\x4b\137\x4f\x46\106\111\103\105\x5f\x42\x41\x43\113\104\117\117\x52")) {
goto pb;
}
$Bu = true;
if (!\Tools::getIsset("\x73\x61\x6d\x6c\x5f\x73\x73\x6f")) {
goto xn;
}
if (!(\Tools::getValue("\163\x61\x6d\x6c\137\x73\x73\x6f") == "\x66\x61\154\163\x65" || \Tools::getValue("\163\141\155\x6c\137\163\x73\x6f") == false)) {
goto pf;
}
$Bu = false;
pf:
xn:
$P6 = true;
if (!\Tools::getIsset("\143\x6f\x6e\164\x72\157\154\x6c\x65\x72")) {
goto m7;
}
if (!(\Tools::getValue("\x63\157\156\164\x72\157\154\x6c\145\x72") && \Tools::getValue("\143\157\x6e\x74\x72\157\154\x6c\145\162") == "\x41\144\x6d\x69\156\x4c\x6f\x67\151\156")) {
goto MA;
}
$P6 = false;
MA:
m7:
if ($Bu || $P6) {
goto UJ;
}
$h2 = "\155\157\137\163\x61\155\154\x5f\x62\x61\x63\153\137\157\146\x66\x69\143\x65\x5f\142\x61\143\x6b\144\157\x6f\x72\x5f\154\x6f\147\151\156";
setcookie($h2, $h2, time() + 21600, "\57");
$pN = Configuration::get("\123\101\x4d\x4c\x5f\x42\101\x43\x4b\x5f\x4f\x46\x46\x49\103\x45\x5f\101\x44\x4d\x49\x4e\x5f\x55\122\x4c");
Tools::redirect($pN);
goto qa;
UJ:
Tools::redirect($wm);
qa:
goto WX;
pb:
Tools::redirect($wm);
WX:
vt:
YX:
Hc:
}
public function hookactionAdminLoginControllerLoginAfter()
{
setcookie("\x6d\x6f\x5f\x73\x61\x6d\154\x5f\142\x61\x63\153\137\157\x66\x66\x69\x63\x65\137\142\141\x63\x6b\x64\157\157\162\x5f\154\157\147\151\156", '', time() - 3600, "\57");
}
public function hookactionAdminLoginControllerBefore()
{
if (empty($_COOKIE["\163\x65\x74\137\163\154\157\137\x63\x6f\157\153\151\x65"])) {
goto Ha;
}
$XV = Configuration::get("\x53\101\x4d\x4c\x5f\105\x4e\x41\x42\x4c\105\x5f\x42\x41\103\x4b\137\x4f\x46\x46\x49\103\105\x5f\x53\123\117");
$KH = Configuration::get("\123\x41\115\x4c\x5f\x45\116\101\102\114\x45\137\102\101\103\113\x5f\117\106\x46\111\x43\105\137\101\x55\x54\117\x5f\x52\x45\x44\x49\x52\105\x43\124");
if (!$XV) {
goto DE;
}
$Kk = Configuration::get("\115\x4f\137\x53\101\x4d\x4c\137\114\x4f\107\117\x55\x54\x5f\x55\122\114");
if (!($Kk != '')) {
goto De;
}
$xJ = SPUrls::getBackOfficeLogoutURL();
Tools::redirect($xJ);
De:
DE:
Ha:
}
public function hookDisplayBanner()
{
$Mg = Configuration::get("\x53\x41\x4d\x4c\x5f\105\116\101\102\114\105\x5f\106\x52\x4f\x4e\124\137\x4f\x46\106\111\103\x45\137\x53\x53\117");
$a3 = Configuration::get("\123\101\x4d\114\x5f\x45\116\x41\102\x4c\x45\137\106\x52\x4f\x4e\x54\x5f\x4f\106\106\111\103\105\137\101\125\124\117\x5f\122\105\104\111\122\105\103\124");
$iT = SPUrls::getAcsUrl() . "\77\157\x70\x74\151\x6f\156\x3d\x73\x61\155\154\137\x6c\x6f\x67\151\x6e";
if (!($Mg && $a3 && !$this->context->customer->isLogged())) {
goto ja;
}
if (!Configuration::get("\123\x41\x4d\114\137\x45\x4e\101\x42\114\105\137\x46\x52\x4f\116\x54\137\x4f\x46\106\x49\x43\x45\x5f\102\x41\x43\113\104\x4f\117\x52")) {
goto tU;
}
$S3 = true;
if (!\Tools::getIsset(\Tools::getValue(["\x73\141\x6d\154\x5f\163\x73\157"]))) {
goto uR;
}
if (!(\Tools::getValue("\163\x61\155\154\137\x73\163\x6f") == "\146\x61\154\163\145" || \Tools::getValue("\x73\x61\155\x6c\x5f\x73\x73\x6f") == false)) {
goto dq;
}
$S3 = false;
dq:
uR:
$I9 = true;
if (!(\Tools::getIsset(\Tools::getValue("\142\141\x63\153")) && \Tools::getValue("\x62\x61\143\153") == "\x6d\x79\x2d\141\143\143\157\165\x6e\x74")) {
goto NO;
}
$I9 = false;
NO:
if (!($S3 || $I9)) {
goto om;
}
\Tools::redirect($iT);
om:
goto hc;
tU:
\Tools::redirect($iT);
hc:
ja:
}
public function hookactionCustomerLogoutBefore()
{
$Mg = Configuration::get("\123\x41\x4d\x4c\x5f\105\116\101\102\x4c\105\x5f\106\122\x4f\x4e\x54\x5f\x4f\x46\106\x49\103\x45\137\123\123\117");
$hx = '';
if (!$Mg) {
goto aG;
}
$hx = $this->context->cookie->__get("\x63\x75\x73\x74\x6f\x6d\x65\162\x5f\163\145\x73\x73\x69\157\x6e\x49\156\144\x65\170");
aG:
if (!($hx != '')) {
goto KG;
}
$Kk = Configuration::get("\115\117\x5f\123\101\115\114\x5f\114\117\107\117\x55\124\137\x55\x52\114");
if (!($Kk != '')) {
goto ND;
}
$Qa = SPUrls::getFrontOfficeLogoutURL();
Tools::redirect($Qa);
ND:
KG:
}
public function hookdisplayCustomerLoginFormAfter()
{
$JJ = Configuration::get("\123\101\115\114\x5f\x45\x4e\101\102\114\105\x5f\x46\x52\x4f\116\124\137\117\x46\x46\x49\103\x45\137\101\x55\x54\117\137\x52\105\x44\111\122\x45\103\x54\x5f\106\122\x4f\x4d\137\x4c\x4f\x47\111\116");
if (!$JJ) {
goto Me;
}
$iT = SPUrls::getAcsUrl() . "\77\x6f\160\x74\x69\157\156\x3d\x73\141\x6d\x6c\137\x6c\x6f\x67\151\x6e";
Tools::redirect($iT);
Me:
}
public function upload_metadata($kI)
{
$eR = new DOMDocument();
$eR->loadXML($kI);
$fC = $eR->firstChild;
if (!empty($fC)) {
goto i1;
}
if (!empty($_FILES["\115\x45\124\101\137\x46\x49\114\x45"]["\x74\x6d\x70\137\156\141\x6d\x65"])) {
goto vi;
}
if (!empty($_POST["\x6d\x65\x74\x61\144\141\164\x61\x5f\x75\162\154"])) {
goto AZ;
}
$ug = $this->displayError($this->l("\120\x6c\145\x61\163\x65\40\x70\x72\x6f\x76\x69\x64\145\40\141\40\x76\x61\x6c\x69\x64\x20\x6d\145\x74\x61\144\141\x74\141\x20\x66\x69\154\x65\40\x6f\162\40\x61\x20\x76\x61\154\x69\x64\40\x55\x52\114\x2e"));
return;
goto oq;
vi:
$ug = $this->displayError($this->l("\x50\x6c\x65\x61\163\x65\x20\160\x72\157\166\x69\144\x65\x20\141\40\166\141\x6c\151\x64\40\155\x65\164\x61\x64\x61\x74\x61\x20\146\x69\154\x65\x2e"));
goto oq;
AZ:
$ug = $this->displayError($this->l("\x50\x6c\x65\141\x73\145\40\160\162\157\166\151\x64\x65\x20\x61\x20\x76\x61\154\x69\144\x20\155\145\x74\141\144\141\164\141\x20\125\x52\114\56"));
oq:
goto Gq;
i1:
$LC = new IDPMetadataReader($eR);
$WW = $LC->getIdentityProviders();
if (!empty($WW)) {
goto Of;
}
$ug = $this->displayError("\120\154\x65\x61\163\x65\x20\160\162\x6f\x76\x69\144\145\x20\x61\x20\166\141\154\151\x64\x20\155\145\x74\141\144\x61\x74\141\x20\x66\151\154\x65\x2e");
return;
Of:
foreach ($WW as $sZ => $D7) {
$wi = "\110\164\x74\160\x52\145\144\151\x72\145\143\x74";
$GH = '';
if (array_key_exists("\110\124\124\120\x2d\x52\145\144\151\x72\145\x63\x74", $D7->getLoginDetails())) {
goto qm;
}
if (array_key_exists("\x48\124\x54\x50\x2d\x50\x4f\x53\124", $D7->getLoginDetails())) {
goto kr;
}
goto kT;
qm:
$GH = $D7->getLoginURL("\x48\x54\124\x50\55\x52\145\x64\x69\x72\x65\143\164");
goto kT;
kr:
$wi = "\110\x74\x74\x70\120\157\x73\164";
$GH = $D7->getLoginURL("\110\124\x54\120\55\120\x4f\x53\124");
kT:
$GG = "\x48\164\x74\160\122\x65\x64\151\162\x65\143\x74";
$FO = '';
if (array_key_exists("\x48\124\x54\120\x2d\x52\x65\x64\x69\x72\145\x63\164", $D7->getLogoutDetails())) {
goto Ns;
}
if (array_key_exists("\x48\124\x54\x50\x2d\x50\x4f\x53\x54", $D7->getLogoutDetails())) {
goto d5;
}
goto m1;
Ns:
$FO = $D7->getLogoutURL("\x48\x54\x54\120\x2d\122\145\144\x69\162\145\143\x74");
goto m1;
d5:
$GG = "\110\164\164\160\120\x6f\x73\x74";
$FO = $D7->getLogoutURL("\110\124\x54\120\55\120\117\123\x54");
m1:
$Oj = $D7->getEntityID();
$gD = $D7->getSigningCertificate();
$Jo = $gD[0];
$Jo = SPUrls::sanitize_certificate($Jo);
Configuration::updateValue("\115\x4f\137\x49\104\x50\x5f\x45\x4e\124\x49\124\131\x5f\x49\x44", $Oj);
Configuration::updateValue("\x4d\117\x5f\123\101\x4d\x4c\x5f\114\x4f\x47\x49\x4e\x5f\125\122\114", $GH);
Configuration::updateValue("\x4d\x4f\x5f\x53\101\x4d\114\x5f\x4c\117\107\117\x55\x54\x5f\125\122\114", $FO);
Configuration::updateValue("\x4d\117\x5f\x53\101\x4d\x4c\137\116\101\115\105\111\x44\137\106\x4f\x52\115\x41\x54", "\x31\x2e\61\72\156\141\x6d\145\151\x64\55\146\157\x72\155\x61\x74\72\165\x6e\163\x70\145\143\x69\146\151\x65\144");
Configuration::updateValue("\x4d\x4f\x5f\111\104\120\137\103\105\x52\x54", $Jo);
goto tH;
yQ:
}
tH:
$ug = $this->displayConfirmation($this->l("\111\144\145\x6e\x74\x69\164\x79\x20\x50\x72\x6f\x76\151\x64\x65\162\40\x64\145\x74\x61\x69\x6c\163\40\x73\141\x76\x65\144\x20\x73\x75\x63\x63\145\163\163\x66\165\154\x6c\171\x2e"));
Gq:
}
public function mo_saml_is_extension_installed($JP)
{
if (in_array($JP, get_loaded_extensions())) {
goto Lw;
}
return 0;
goto bc;
Lw:
return 1;
bc:
}
public function getContent()
{
$lR = new ModuleEnglish();
$this->context->controller->addJS($this->_path . "\x76\x69\145\x77\x73\57\152\163\x2f\x73\145\164\164\151\x6e\147\x73\x2e\152\x73");
$ug = '';
if (!Tools::getIsset("\x75\160\x64\141\x74\145\x5f\x6c\151\x63\x65\x6e\163\145")) {
goto fA;
}
$Yz = SAMLCustomerUtils::check_customer_ln();
if ($Yz) {
goto JM;
}
return;
JM:
$Yz = json_decode($Yz, true);
if (strcasecmp($Yz["\x73\x74\141\164\165\x73"], "\x53\125\x43\103\x45\123\x53") == 0) {
goto Tz;
}
$ug = $this->displayError($this->l($lR::LICENSE_NOT_UPGRADED));
goto Xk;
Tz:
$Uq = $Yz["\x6c\151\143\145\156\163\145\105\x78\160\151\162\171"];
$ug = $this->displayConfirmation($this->l($lR::LICENSE_UPDATE));
Xk:
fA:
if (!Tools::getIsset("\x72\x65\155\157\166\x65\137\141\x63\143\157\165\x6e\164")) {
goto YW;
}
SAMLCustomerUtils::deactivateLicense();
YW:
if (!Tools::isSubmit("\163\141\155\154\137\155\157\137\141\x63\143\x6f\165\156\x74\137\144\145\164\x61\151\154\163" . $this->name)) {
goto kv;
}
$Nh = (string) Tools::getValue("\x6d\x6f\x5f\x73\141\155\x6c\137\141\x64\155\x69\156\137\143\165\x73\x74\x6f\155\x65\x72\137\x65\x6d\141\151\x6c");
$ho = (string) Tools::getValue("\x53\x41\115\x4c\x5f\103\x55\123\x54\x4f\115\105\x52\x5f\x50\x41\123\123\x57\117\x52\104");
if (empty($Nh) || empty($ho)) {
goto Xo;
}
$Yz = SAMLCustomerUtils::get_customer_key($Nh, $ho);
if ($Yz) {
goto I1;
}
return;
I1:
$dC = json_decode($Yz, true);
if (json_last_error() == JSON_ERROR_NONE) {
goto GO;
}
$ug = $this->displayError($this->l($lR::INVALID_PASSWORD_USERNAME));
goto hB;
GO:
Configuration::updateValue("\x6d\157\x5f\163\x61\155\x6c\x5f\x61\144\x6d\151\x6e\x5f\143\x75\x73\164\x6f\x6d\145\162\x5f\145\155\141\151\x6c", $Nh);
Configuration::updateValue("\155\157\x5f\163\141\155\154\137\x61\x64\155\x69\x6e\x5f\143\x75\163\x74\157\x6d\x65\162\137\x6b\x65\171", $dC["\x69\144"]);
Configuration::updateValue("\x6d\157\137\163\x61\155\x6c\x5f\141\144\155\151\156\x5f\x61\x70\151\137\153\145\x79", $dC["\141\160\x69\113\x65\x79"]);
Configuration::updateValue("\155\157\137\x73\141\155\154\x5f\143\165\x73\x74\x6f\x6d\145\x72\x5f\x74\x6f\x6b\x65\156", $dC["\164\157\x6b\x65\x6e"]);
hB:
goto gM;
Xo:
$ug = $this->displayError($this->l($lR::INVALID_VALUE));
gM:
kv:
if (!Tools::isSubmit("\163\141\x6d\154\137\x6d\x6f\137\154\x69\143\x65\x6e\x73\145\137\153\x65\x79" . $this->name)) {
goto L9;
}
$pV = (string) Tools::getValue("\x73\x61\x6d\x6c\x5f\114\x49\103\x45\116\123\105\137\x4b\105\x59");
$Yz = SAMLCustomerUtils::check_customer_ln();
if ($Yz) {
goto mR;
}
return;
mR:
$Yz = json_decode($Yz, true);
$sZ = Configuration::get("\155\157\x5f\x73\x61\x6d\x6c\137\x63\x75\x73\x74\x6f\x6d\145\x72\x5f\x74\157\153\145\x6e");
if (!($sZ == '')) {
goto wj;
}
$sZ = "\x50\117\124\65\130\103\111\x39\102\x52";
wj:
if (strcasecmp($Yz["\x73\x74\141\164\165\x73"], "\123\x55\103\x43\105\x53\x53") == 0) {
goto NV;
}
$ug = $this->displayError($this->l($lR::LICENSE_NOT_UPGRADED));
goto MT;
NV:
$Uq = $Yz["\154\151\x63\x65\x6e\x73\x65\105\x78\160\x69\x72\x79"];
$Yz = json_decode(SAMLCustomerUtils::mo_saml_vl($pV, false), true);
Configuration::updateValue("\166\x6c\137\x63\150\x65\143\153\x5f\164", time());
if (is_array($Yz) and strcasecmp($Yz["\163\164\x61\x74\165\163"], "\123\x55\x43\103\x45\x53\123") == 0) {
goto Q3;
}
if (is_array($Yz) and strcasecmp($Yz["\163\164\x61\x74\165\163"], "\106\x41\x49\x4c\105\104") == 0) {
goto ii;
}
$ug = $this->displayError($this->l($lR::REQUEST_ERROR));
goto EP;
Q3:
Configuration::updateValue("\x73\x61\155\154\137\154\x6b", SAMLCustomerUtils::encrypt_data($pV, $sZ));
Configuration::updateValue("\x73\141\x6d\154\137\x73\x69\164\x65\x5f\163\x74\141\164\x75\x73", SAMLCustomerUtils::encrypt_data("\146\141\154\163\x65", $sZ));
$ug = $this->displayConfirmation($this->l($lR::LICENSE_VERIFIED));
goto EP;
ii:
if (strcasecmp($Yz["\155\145\x73\x73\141\x67\x65"], "\x43\x6f\144\145\40\150\141\x73\40\x45\x78\160\151\162\145\144") == 0) {
goto G9;
}
$ug = $this->displayError($this->l($lR::INVALID_LICENSE_KEY));
goto aC;
G9:
$ug = $this->displayError($this->l($lR::LICENSE_KEY_USED));
aC:
EP:
MT:
L9:
if (!Tools::isSubmit("\163\165\x62\155\x69\164\x5f\x73\x70\x5f\x6d\145\164\x61\144\141\164\x61" . $this->name)) {
goto SP;
}
$Tq = (string) Tools::getValue("\115\x4f\137\x53\x50\137\105\x4e\x54\111\124\131\x5f\x49\104");
Configuration::updateValue("\x4d\x4f\137\x53\120\x5f\x45\x4e\124\111\124\x59\x5f\x49\104", $Tq);
$ug = $this->displayConfirmation($this->l($lR::CONFIRM));
SP:
if (!Tools::isSubmit("\x6d\x65\164\141\x75\162\154\163\165\x62\155\x69\164" . $this->name)) {
goto dm;
}
if (!(isset($_FILES["\x4d\105\124\x41\137\x46\111\x4c\105"]) || Tools::getIsset(["\115\105\124\101\137\125\122\114"]))) {
goto CU;
}
if (!empty($_FILES["\x4d\x45\124\101\137\106\x49\x4c\x45"]["\x74\155\x70\x5f\x6e\141\x6d\x65"])) {
goto Tm;
}
if (!empty(Tools::getValue("\115\x45\124\x41\x5f\x55\122\x4c"))) {
goto NR;
}
$ug = $this->displayError($this->l("\x50\154\145\141\163\145\x20\160\x72\x6f\166\151\x64\145\40\x61\x20\166\x61\154\x69\144\40\x6d\x65\x74\x61\x64\141\x74\x61\x20\146\151\154\145\x20\157\162\x20\141\x20\166\141\x6c\151\x64\x20\125\122\114\x2e"));
goto Ai;
Tm:
$kI = Tools::file_get_contents($_FILES["\x4d\x45\124\101\137\106\111\114\105"]["\x74\x6d\160\137\x6e\141\x6d\145"]);
$this->upload_metadata($kI);
goto Ai;
NR:
if ($this->mo_saml_is_extension_installed("\x63\165\x72\154")) {
goto l2;
}
$ug = $this->displayError($this->l("\120\x48\120\40\x63\125\x52\114\40\145\170\164\145\156\x73\x69\157\156\x20\x69\x73\40\156\157\x74\40\x69\x6e\163\164\x61\154\154\145\x64\x20\x6f\162\40\144\x69\x73\141\x62\x6c\145\144\56\40\103\x61\156\x6e\157\x74\x20\146\x65\x74\143\150\x20\155\145\164\x61\144\x61\164\x61\40\x66\x72\157\155\40\125\x52\114\x2e"));
return;
l2:
$ku = filter_var(htmlspecialchars(Tools::getValue("\x4d\x45\124\101\x5f\x55\122\x4c"), FILTER_SANITIZE_URL));
$kI = Tools::file_get_contents($ku);
$this->upload_metadata($kI);
Ai:
CU:
dm:
if (!Tools::isSubmit("\x73\165\x62\x6d\151\164" . $this->name)) {
goto JU;
}
$tt = (string) Tools::getValue("\x4d\x4f\x5f\x49\x44\120\x5f\x45\116\124\111\x54\x59\x5f\111\x44");
$O1 = (int) Tools::getvalue("\x4d\x4f\x5f\x53\x49\x47\116\x45\104\137\122\105\121\x55\x45\123\x54");
$YY = (int) Tools::getvalue("\x4d\117\137\123\x4c\x4f\137\x42\x49\116\x44\111\x4e\x47\x5f\x54\131\120\105");
$EX = (int) Tools::getvalue("\x4d\117\137\123\123\117\137\102\x49\116\x44\x49\116\107\x5f\124\x59\120\x45");
$g0 = (string) Tools::getValue("\115\117\x5f\123\101\x4d\x4c\x5f\114\117\x47\111\x4e\137\125\122\114");
$Kk = (string) Tools::getValue("\x4d\x4f\x5f\123\x41\x4d\114\x5f\114\117\107\x4f\x55\124\137\x55\122\x4c");
$yH = (string) Tools::getValue("\115\117\137\123\101\x4d\114\x5f\116\x41\115\x45\x49\x44\x5f\106\x4f\122\115\x41\x54");
$p9 = (string) Tools::getValue("\x4d\x4f\137\x49\104\120\137\103\105\122\x54");
$i7 = (int) Tools::getvalue("\x4d\x4f\137\x43\x48\x41\122\x41\103\124\x45\122\137\105\x4e\103\x4f\x44\x49\x4e\x47");
if (!(empty($tt) || empty($g0) || empty($p9))) {
goto Ls;
}
$ug = $this->displayError($this->l($lR::INVALID_CONFIGURATION));
Ls:
Configuration::updateValue("\115\x4f\x5f\123\114\x4f\137\x42\x49\x4e\104\x49\x4e\107\137\x54\131\120\105", $YY);
Configuration::updateValue("\x4d\x4f\137\x53\123\117\x5f\x42\111\116\104\111\116\107\x5f\124\131\120\105", $EX);
Configuration::updateValue("\115\117\x5f\x49\x44\120\137\x45\x4e\x54\x49\x54\131\x5f\111\x44", $tt);
Configuration::updateValue("\x4d\x4f\137\123\x49\107\116\x45\x44\137\x52\105\121\125\105\x53\124", $O1);
Configuration::updateValue("\115\117\x5f\x53\x41\x4d\114\x5f\114\x4f\x47\x49\x4e\x5f\125\122\x4c", $g0);
Configuration::updateValue("\x4d\x4f\137\123\101\x4d\114\x5f\x4c\x4f\107\x4f\x55\x54\137\x55\x52\114", $Kk);
Configuration::updateValue("\115\117\137\x53\x41\115\114\x5f\116\101\115\x45\111\x44\137\106\117\x52\115\x41\x54", $yH);
$p9 = SPUrls::sanitize_certificate($p9);
Configuration::updateValue("\115\117\137\111\x44\x50\x5f\103\x45\x52\124", $p9);
Configuration::updateValue("\x4d\x4f\x5f\x43\110\x41\x52\x41\103\x54\105\x52\x5f\x45\116\103\117\104\x49\116\x47", $i7);
$ug = $this->displayConfirmation($this->l($lR::CONFIRM));
JU:
if (!Tools::isSubmit("\x73\141\155\154\x5f\163\x61\166\x65\137\x75\163\x65\162\137\141\x74\164\x72" . $this->name)) {
goto S9;
}
$xn = (string) Tools::getValue("\123\101\x4d\x4c\137\x41\124\124\122\137\105\x4d\x41\x49\x4c");
Configuration::updateValue("\123\x41\115\x4c\x5f\101\x54\124\x52\137\105\x4d\x41\x49\114", $xn);
$oW = (string) Tools::getValue("\x53\101\x4d\x4c\137\101\x54\124\x52\x5f\x46\111\122\123\x54\x5f\116\101\115\105");
Configuration::updateValue("\x53\101\115\114\x5f\101\124\124\x52\137\106\x49\x52\x53\124\x5f\116\101\x4d\x45", $oW);
$tm = (string) Tools::getValue("\123\101\x4d\x4c\x5f\101\124\x54\122\x5f\x4c\101\123\124\x5f\116\x41\115\x45");
Configuration::updateValue("\x53\101\x4d\x4c\137\x41\124\x54\122\137\x4c\101\123\x54\137\x4e\x41\x4d\105", $tm);
if ($xn) {
goto mw;
}
$ug = $ug . $this->displayError($this->l($lR::MAP_EMAIL));
mw:
if ($oW) {
goto ju;
}
$ug = $ug . $this->displayError($this->l($lR::MAP_FIRST_NAME));
ju:
if ($tm) {
goto lZ;
}
$ug = $ug . $this->displayError($this->l($lR::MAP_LAST_NAME));
lZ:
$ug = $ug . $this->displayConfirmation($this->l($lR::MAPPING_UPDATED));
S9:
if (!Tools::isSubmit("\163\x61\x6d\154\137\x73\141\166\145\x5f\165\163\145\x72\137\147\162\157\165\x70\137\141\164\x74\162" . $this->name)) {
goto a5;
}
$sq = (string) Tools::getValue("\123\101\115\114\x5f\101\124\124\122\x5f\x47\122\x4f\125\120");
$As = (int) Tools::getValue("\x53\x41\x4d\114\137\x41\x54\x54\122\137\104\105\x46\101\125\114\x54\137\107\122\x4f\x55\120");
$YW = (int) Tools::getValue("\x53\101\115\x4c\x5f\104\117\137\116\x4f\x54\x5f\103\x52\105\101\124\x45\137\116\x45\x57\137\x41\104\x4d\x49\x4e\137\x55\x53\105\122\x53");
$oK = (int) Tools::getValue("\123\101\x4d\114\137\104\117\x5f\x4e\117\124\x5f\x43\x52\105\101\x54\105\137\x41\104\x4d\x49\116\x5f\x55\x53\x45\122\x53\137\x57\x49\124\110\x4f\125\124\x5f\x47\122\x4f\125\x50\137\115\x41\x50\x50\x45\x44");
$PV = (int) Tools::getValue("\x53\101\115\x4c\x5f\104\117\x5f\116\x4f\x54\137\101\114\114\x4f\x57\137\101\x44\x4d\x49\116\137\125\x53\x45\x52\123\x5f\x54\117\137\114\117\x47\111\116\137\x57\111\124\110\137\x47\111\x56\105\116\x5f\107\x52\117\125\x50");
$RF = (string) Tools::getValue("\x53\101\x4d\x4c\137\101\124\x54\x52\x5f\x47\x52\117\125\x50\137\x4e\117\x54\x5f\x41\114\x4c\117\127\x45\104");
$UO = SPUrls::prestashopProfiles();
$P4 = [];
foreach ($UO as $sZ => $P9) {
array_push($P4, $P9["\151\x64\137\x70\x72\157\x66\151\154\145"]);
$ch = "\123\x41\x4d\x4c\x5f\x41\x54\x54\x52\x5f" . $P9["\x6e\x61\x6d\145"];
$cl = (string) Tools::getValue($ch);
Configuration::updateValue($ch, $cl);
Vu:
}
QR:
Configuration::updateValue("\123\101\115\114\x5f\x41\124\124\x52\137\x47\x52\117\125\120", $sq);
Configuration::updateValue("\x53\x41\115\114\137\101\124\124\122\x5f\x44\105\x46\x41\125\114\x54\x5f\107\122\117\x55\120", $As);
Configuration::updateValue("\x53\x41\x4d\114\x5f\x44\117\x5f\116\x4f\124\x5f\103\x52\x45\101\124\x45\x5f\116\105\x57\x5f\101\x44\x4d\111\116\137\x55\x53\x45\x52\x53", $YW);
Configuration::updateValue("\123\101\x4d\114\137\x44\x4f\137\116\x4f\x54\137\103\122\105\101\x54\105\137\101\104\x4d\111\x4e\137\x55\123\x45\122\123\x5f\x57\111\124\x48\117\125\x54\x5f\107\x52\117\x55\120\137\115\x41\120\x50\x45\x44", $oK);
Configuration::updateValue("\x53\101\115\114\x5f\x44\x4f\137\116\117\124\x5f\x41\114\114\x4f\127\x5f\101\x44\x4d\x49\x4e\x5f\x55\x53\x45\x52\123\137\124\x4f\x5f\114\117\107\111\116\137\127\111\x54\x48\x5f\107\111\126\105\116\137\107\122\117\x55\x50", $PV);
Configuration::updateValue("\123\x41\x4d\x4c\137\x41\124\x54\x52\137\107\122\117\125\x50\x5f\x4e\117\x54\137\101\114\114\x4f\127\x45\104", $RF);
if (isset($P4[$As])) {
goto cd;
}
$ug = $ug . $this->displayError($this->l($lR::ID_DOESNT_EXIST));
cd:
if ($sq) {
goto Tp;
}
$ug = $ug . $this->displayError($this->l($lR::MAP_GROUP));
Tp:
$ug = $ug . $this->displayConfirmation($this->l($lR::GROUP_MAPPING_UPDATED));
a5:
if (!Tools::isSubmit("\163\141\155\154\137\x62\141\x63\153\157\146\146\151\x63\145\137\x73\x65\x74\x74\x69\156\x67\x73" . $this->name)) {
goto RK;
}
$XV = (int) Tools::getvalue("\123\x41\115\x4c\x5f\x45\x4e\x41\x42\x4c\105\137\102\x41\x43\x4b\137\117\106\x46\x49\103\105\x5f\x53\123\x4f");
Configuration::updateValue("\x53\101\x4d\x4c\x5f\x45\x4e\x41\x42\114\x45\137\x42\x41\x43\113\137\x4f\x46\106\111\x43\x45\137\x53\123\x4f", $XV);
$pN = (string) Tools::getValue("\123\x41\115\114\x5f\x42\x41\x43\113\137\x4f\x46\x46\x49\x43\x45\x5f\101\104\x4d\111\x4e\137\125\122\114");
$VN = false;
if (filter_var($pN, FILTER_VALIDATE_URL)) {
goto NH;
}
if ($XV) {
goto pY;
}
goto oD;
NH:
Configuration::updateValue("\x53\101\x4d\x4c\x5f\102\x41\103\113\x5f\117\106\106\x49\x43\105\137\x41\x44\x4d\111\116\137\125\x52\x4c", $pN);
goto oD;
pY:
$VN = true;
oD:
$KH = (int) Tools::getvalue("\x53\101\115\114\x5f\105\116\101\x42\x4c\105\137\x42\101\x43\113\x5f\117\106\x46\111\103\x45\137\101\125\x54\x4f\x5f\x52\105\104\111\x52\105\103\124");
Configuration::updateValue("\123\x41\x4d\x4c\137\105\x4e\101\102\114\105\137\x42\101\103\x4b\137\117\x46\106\x49\x43\105\x5f\101\125\124\117\x5f\x52\x45\x44\x49\122\x45\103\124", $KH);
$RX = (int) Tools::getvalue("\x53\x41\x4d\x4c\x5f\x45\x4e\x41\102\114\105\137\102\101\x43\x4b\x5f\x4f\x46\106\111\x43\105\137\x42\101\103\113\104\117\x4f\x52");
Configuration::updateValue("\x53\101\x4d\114\137\105\116\x41\102\114\x45\x5f\x42\101\103\x4b\x5f\117\106\106\x49\x43\x45\x5f\x42\101\103\x4b\x44\117\x4f\122", $RX);
$av = (int) Tools::getvalue("\x53\x41\x4d\114\x5f\105\116\101\x42\x4c\x45\x5f\102\x41\x43\x4b\x5f\117\x46\106\111\x43\105\137\x52\105\114\101\x59\x5f\123\124\x41\x54\x45");
Configuration::updateValue("\123\101\115\x4c\137\x45\x4e\101\x42\114\105\137\x42\101\x43\113\137\117\x46\x46\111\x43\x45\137\x52\105\x4c\101\x59\137\x53\124\x41\124\105", $av);
$qi = false;
$RJ = (string) Tools::getValue("\123\101\115\x4c\137\102\101\103\113\137\x4f\x46\106\x49\x43\x45\137\122\x45\114\101\x59\137\x53\124\x41\x54\105\x5f\x55\x52\114");
if (filter_var($RJ, FILTER_VALIDATE_URL)) {
goto TB;
}
if ($av) {
goto Kc;
}
goto rq;
TB:
Configuration::updateValue("\x53\x41\115\114\137\102\101\x43\113\137\117\x46\106\111\x43\x45\x5f\122\x45\114\x41\131\137\x53\x54\x41\x54\105\137\x55\122\x4c", $RJ);
goto rq;
Kc:
$qi = true;
rq:
if (!$VN) {
goto gj;
}
$ug = $ug . $this->displayError($this->l($lR::ENTER_VALID_BACKOFFICE_URL));
gj:
if (!$qi) {
goto Ux;
}
$ug = $ug . $this->displayError($this->l($lR::ENTER_VALID_RELAYSTATE));
Ux:
$ug = $ug . $this->displayConfirmation($this->l($lR::BACKOFFICE_SSO_UPDATED));
RK:
if (!Tools::isSubmit("\x73\x61\155\154\137\x66\x72\157\x6e\x74\x6f\146\x66\x69\x63\145\137\x73\145\x74\164\151\x6e\147\x73" . $this->name)) {
goto TS;
}
$Mg = (int) Tools::getvalue("\x53\101\115\114\137\x45\116\101\102\114\105\x5f\106\x52\x4f\x4e\124\x5f\x4f\x46\106\111\x43\105\137\123\x53\x4f");
Configuration::updateValue("\123\101\x4d\114\137\105\116\101\x42\x4c\x45\137\106\x52\x4f\116\124\137\117\x46\x46\x49\x43\x45\137\x53\123\117", $Mg);
$JJ = (int) Tools::getvalue("\123\x41\115\x4c\137\x45\116\x41\102\x4c\x45\x5f\x46\122\x4f\x4e\124\137\x4f\106\106\111\x43\x45\137\x41\x55\124\117\x5f\x52\x45\104\111\x52\x45\103\124\x5f\106\122\x4f\x4d\137\x4c\117\x47\x49\116");
Configuration::updateValue("\x53\101\115\114\137\x45\x4e\101\x42\x4c\105\137\x46\x52\x4f\x4e\124\x5f\117\106\106\111\x43\x45\x5f\x41\125\124\x4f\x5f\x52\105\x44\111\122\x45\x43\124\137\106\x52\x4f\115\137\114\117\107\111\116", $JJ);
$a3 = (int) Tools::getvalue("\x53\101\115\x4c\137\105\116\101\102\114\x45\x5f\x46\122\x4f\116\124\x5f\x4f\x46\x46\x49\x43\105\x5f\x41\x55\124\x4f\137\122\x45\x44\x49\x52\x45\103\x54");
Configuration::updateValue("\123\101\115\x4c\x5f\x45\x4e\101\102\x4c\105\137\x46\122\x4f\116\x54\137\x4f\106\x46\x49\103\x45\x5f\101\x55\x54\117\137\x52\x45\104\x49\122\105\103\124", $a3);
$q5 = (int) Tools::getvalue("\123\101\x4d\114\137\105\116\101\102\x4c\x45\x5f\x46\122\x4f\116\x54\x5f\x4f\106\106\x49\x43\105\137\102\101\x43\x4b\104\x4f\x4f\122");
Configuration::updateValue("\123\x41\115\x4c\137\x45\x4e\x41\102\x4c\x45\137\x46\x52\117\x4e\124\137\x4f\x46\x46\111\103\x45\137\x42\101\x43\x4b\x44\117\x4f\x52", $q5);
$p7 = (int) Tools::getvalue("\x53\101\115\x4c\x5f\x45\x4e\101\102\x4c\105\x5f\x46\x52\x4f\116\x54\137\117\x46\x46\111\103\105\x5f\x52\105\114\101\131\137\123\124\101\x54\105");
Configuration::updateValue("\123\101\x4d\x4c\137\105\x4e\x41\x42\x4c\x45\137\x46\x52\117\116\124\137\117\106\106\x49\103\105\x5f\x52\105\x4c\x41\x59\137\x53\x54\101\x54\105", $p7);
$X9 = false;
$Br = (string) Tools::getValue("\x53\101\115\114\x5f\x46\122\x4f\116\x54\x5f\x4f\106\x46\x49\103\x45\137\122\105\114\x41\x59\137\123\x54\101\124\105\137\125\x52\114");
if (filter_var($Br, FILTER_VALIDATE_URL)) {
goto QW;
}
if ($p7) {
goto Lx;
}
goto Kg;
QW:
Configuration::updateValue("\123\101\x4d\x4c\x5f\106\x52\x4f\x4e\124\137\117\x46\106\x49\103\x45\x5f\x52\105\114\101\x59\137\123\124\x41\x54\105\x5f\125\122\114", $Br);
goto Kg;
Lx:
$X9 = true;
Kg:
if (!$X9) {
goto vU;
}
$ug = $ug . $this->displayError($this->l($lR::ENTER_VALID_FRONTOFFICE_URL));
vU:
$ug = $ug . $this->displayConfirmation($this->l($lR::FORNTOFFICE_SSO_UPDATED));
TS:
if (!Tools::isSubmit("\163\141\155\x6c\137\x73\165\x70\x70\x6f\x72\164\137\x73\x75\142\x6d\151\x74" . $this->name)) {
goto ih;
}
$Nh = (string) Tools::getValue("\103\125\x53\x54\x4f\115\105\x52\137\x45\x4d\x41\111\x4c");
$Mz = (string) Tools::getValue("\x43\125\x53\x54\117\x4d\x45\122\x5f\x51\125\x45\122\x59");
if (empty($Nh) || empty($Mz)) {
goto Vh;
}
$Ba = false;
if (!filter_var($Nh, FILTER_VALIDATE_EMAIL)) {
goto NN;
}
$Ba = SAMLCustomerUtils::submit_contact_us($Nh, $Mz);
NN:
if ($Ba == false) {
goto Ys;
}
$ug = $this->displayConfirmation($this->l($lR::QUERY_SUBMITTED));
goto NF;
Ys:
$ug = $this->displayError($this->l($lR::QUERY_NOT_SUBMITTED));
NF:
goto zR;
Vh:
$ug = $this->displayError($this->l($lR::QUERY_NOT_SUBMITTED));
zR:
ih:
if (!SAMLCustomerUtils::isCustomerRegistered()) {
goto oA;
}
if (!SAMLCustomerUtils::isLicenseKeyVerified()) {
goto eE;
}
return $ug . $this->getSPForm($lR) . $this->uploadmetadata() . $this->getIDPForm($lR) . $this->SAMLAttributeMapping($lR) . $this->SAMLGroupMapping($lR) . $this->SAMLbackofficeSSOSettings($lR) . $this->SAMLFrontOfficeSSOSettings($lR);
goto cU;
oA:
return $ug . $this->SAMLLicenseExpired($lR) . $this->SAMLAccountVerification($lR) . $this->SAMLSupport($lR);
goto cU;
eE:
return $ug . $this->SAMLLicenseExpired($lR) . $this->SAMLLicenseVerification($lR) . $this->SAMLSupport($lR);
cU:
}
public function getSPForm($lR)
{
$VT = SPUrls::getCert();
$O5 = SPUrls::getMetaUrl();
$b4 = SPUrls::getMetaXml();
$form = ["\146\157\x72\155" => ["\154\x65\147\145\x6e\144" => ["\164\x69\164\154\x65" => $this->l($lR::SP_META_DATA)], "\151\x6e\x70\x75\164" => [["\164\x79\x70\x65" => "\x74\145\x78\x74", "\154\141\142\x65\x6c" => $this->l($lR::SP_ENTITY_ID), "\156\141\155\x65" => "\115\117\x5f\123\x50\x5f\x45\x4e\124\111\124\131\x5f\x49\x44", "\x73\x69\x7a\x65" => 20], ["\x74\171\x70\x65" => "\x74\145\170\x74", "\x6c\x61\142\x65\154" => $this->l($lR::SP_ACS_URL), "\156\141\x6d\x65" => "\115\117\x5f\x41\x43\x53\x5f\125\122\x4c", "\x73\151\x7a\x65" => 20, "\x64\x69\x73\x61\x62\154\x65\x64" => true], ["\164\x79\160\145" => "\x74\145\x78\164\x61\x72\x65\x61", "\154\x61\x62\x65\x6c" => $this->l($lR::SP_CRT), "\x6e\x61\x6d\x65" => "\x4d\x4f\x5f\123\120\137\103\x45\122\124", "\163\x69\172\145" => 20, "\144\x69\163\141\x62\x6c\x65\x64" => true], ["\x74\x79\x70\x65" => "\164\x65\170\x74", "\x6c\141\x62\145\x6c" => $this->l($lR::METADATA_URL), "\156\x61\155\145" => "\115\117\x5f\123\120\x5f\115\x45\x54\x41\104\x41\x54\101", "\x73\x69\x7a\145" => 20, "\x64\151\x73\x61\142\154\145\144" => true]], "\x62\x75\164\164\157\x6e\163" => [["\150\x72\145\x66" => $VT, "\x74\171\x70\145" => "\142\x75\x74\x74\x6f\x6e", "\x69\144" => "\x64\157\x77\x6e\154\157\x61\144\x5f\x63\x65\162\164", "\x6e\141\x6d\x65" => "\x44\157\167\156\x6c\157\141\x64\x20\x43\145\162\164\x69\146\151\x63\x61\164\145", "\151\143\157\x6e" => "\151\143\x6f\x6e\55\146\x6f\157", "\x74\151\164\x6c\145" => $lR::DOWNLOAD_CRT], ["\x68\x72\145\146" => $b4, "\x74\171\160\x65" => "\142\x75\164\164\157\x6e", "\151\144" => "\144\x6f\167\x6e\x6c\x6f\141\144\x5f\170\155\x6c", "\156\x61\x6d\145" => "\104\157\x77\156\154\x6f\141\144\40\x58\x4d\x4c\x20", "\151\x63\157\156" => "\x69\x63\157\x6e\55\x66\x6f\x6f", "\164\x69\x74\x6c\x65" => $lR::DOWNLOAD_XML_METADATA]], "\163\165\x62\x6d\x69\164" => ["\164\x69\x74\154\145" => $this->l($lR::SAVE), "\151\x63\x6f\156" => "\151\143\x6f\x6e\55\x66\x6f\157"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\144\x6d\x69\x6e\x4d\157\x64\165\154\145\163");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\x63\157\x6e\x66\151\147\165\162\145" => $this->name]);
$fA->submit_action = "\163\x75\x62\x6d\151\164\137\163\160\x5f\x6d\145\164\x61\x64\x61\x74\141" . $this->name;
$fA->default_form_language = (int) Configuration::get("\x50\x53\x5f\x4c\101\x4e\x47\x5f\x44\105\106\x41\x55\x4c\124");
$fA->fields_value["\115\x4f\137\x53\x50\x5f\x45\116\124\x49\124\131\137\x49\x44"] = SPUrls::getSPEntityID();
$fA->fields_value["\x4d\x4f\137\x41\x43\x53\137\x55\x52\114"] = SPUrls::getAcsUrl();
$fA->fields_value["\x4d\x4f\137\x53\x50\137\115\105\124\101\x44\x41\124\101"] = $O5;
$fA->fields_value["\115\117\x5f\123\x50\137\x43\105\122\124"] = SPUrls::getPublicCert();
return $fA->generateForm([$form]);
}
public function uploadmetadata()
{
$form = ["\146\157\162\x6d" => ["\154\x65\147\145\x6e\x64" => ["\164\x69\164\154\145" => $this->l("\125\160\154\x6f\x61\144\40\x4d\x65\x74\141\x64\x61\164\x61")], "\x69\x6e\160\165\x74" => [["\x74\x79\160\x65" => "\146\x69\x6c\x65", "\154\x61\x62\x65\154" => "\123\x65\x6c\x65\143\164\40\141\x20\146\151\x6c\145\x3a", "\x6e\x61\x6d\145" => "\x4d\x45\124\x41\137\x46\111\x4c\x45"], ["\164\x79\x70\x65" => "\164\145\170\x74", "\154\141\142\x65\154" => "\125\160\154\157\x61\x64\40\x6d\145\164\x61\x64\141\x74\141\40\125\x52\x4c\x3a", "\156\x61\x6d\x65" => "\x4d\105\x54\101\x5f\125\122\114"]], "\163\x75\142\155\151\x74" => ["\x69\144" => "\x6d\x65\x74\141\x75\x72\x6c\x73\165\142\x6d\x69\x74", "\x74\151\164\x6c\145" => $this->l("\106\145\x74\143\150\x20\x6d\x65\164\x61\144\x61\x74\141"), "\151\x63\x6f\156" => "\x69\x63\x6f\x6e\55\x66\157\157"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\144\x6d\151\156\115\x6f\x64\x75\154\145\163");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\x63\x6f\156\146\x69\147\165\x72\x65" => $this->name]);
$fA->submit_action = "\155\x65\164\141\x75\162\154\163\x75\142\x6d\151\x74" . $this->name;
$fA->default_form_language = (int) Configuration::get("\x50\123\137\114\x41\116\x47\137\104\105\x46\101\125\x4c\124");
$fA->fields_value["\x4d\105\x54\x41\137\x46\111\x4c\105"] = Tools::getValue("\x4d\x45\124\x41\137\106\111\114\x45", Configuration::get("\115\105\x54\101\137\106\111\114\105"));
$fA->fields_value["\115\x45\124\x41\x5f\125\122\114"] = Tools::getValue("\x4d\105\x54\101\137\125\x52\114", Configuration::get("\115\x45\124\101\x5f\x55\122\x4c"));
return $fA->generateForm([$form]);
}
public function getIDPForm($lR)
{
$is = ToolsCore::getShopDomainSsl(true) . __PS_BASE_URI__ . "\x6d\x6f\144\x75\x6c\x65\57\155\x6f\163\x61\x6d\154\x73\x73\157\57\x73\x73\157\x3f\157\160\x74\151\157\156\75\x73\x61\155\154\137\154\157\x67\151\156\x26\162\x65\154\x61\x79\123\x74\x61\164\145\x3d\x74\x65\x73\x74\x56\x61\x6c\151\x64\141\x74\145";
$O5 = Tools::getHttpHost(true) . __PS_BASE_URI__ . "\155\x6f\144\x75\x6c\x65\x73\134\x6d\157\x73\141\155\154\x73\x73\x6f\x5c\163\x70\55\155\x65\x74\141\144\x61\164\141\56\x78\x6d\154";
$form = ["\x66\x6f\162\155" => ["\154\145\147\145\x6e\144" => ["\164\151\164\x6c\x65" => $this->l($lR::SP_SET_UP)], "\x69\156\x70\165\x74" => [["\164\171\x70\x65" => "\164\145\x78\x74", "\x6c\x61\x62\x65\x6c" => $this->l($lR::IDP_ENTITY_ID), "\156\141\155\x65" => "\x4d\x4f\137\111\x44\x50\x5f\105\116\x54\x49\x54\131\x5f\111\x44", "\163\151\172\x65" => 20, "\x72\145\161\x75\x69\162\145\144" => true], ["\x74\x79\160\x65" => "\163\167\151\x74\143\150", "\x6c\x61\x62\x65\154" => $this->l($lR::MO_SIGNED_REQUEST), "\x6e\141\x6d\x65" => "\115\117\137\123\111\x47\x4e\x45\x44\137\x52\105\121\125\105\x53\x54", "\x76\141\154\x75\x65\163" => [["\151\x64" => "\x61\143\164\x69\166\x65\x5f\157\x6e", "\166\x61\154\x75\x65" => 1, "\154\x61\142\x65\x6c" => $this->l($lR::YES)], ["\x69\x64" => "\x61\143\x74\x69\166\x65\x5f\146\x66", "\x76\x61\x6c\165\145" => 0, "\154\141\x62\x65\154" => $this->l($lR::NO)]]], ["\x74\x79\x70\145" => "\x74\145\x78\x74", "\x6c\141\x62\x65\x6c" => $this->l($lR::SAML_LOGIN_URL), "\156\x61\155\145" => "\115\x4f\137\123\101\115\x4c\x5f\114\x4f\x47\x49\x4e\x5f\x55\x52\x4c", "\x73\151\172\145" => 20, "\162\x65\x71\165\151\162\x65\144" => true], ["\x74\x79\x70\145" => "\162\141\x64\x69\x6f", "\154\x61\142\145\154" => $this->l($lR::SELECT_BINDING_TYPE_FOR_SSO), "\x6e\x61\155\x65" => "\x4d\117\x5f\x53\123\117\137\x42\x49\x4e\x44\x49\116\x47\137\124\131\x50\x45", "\x76\x61\154\165\145\163" => [["\151\x64" => "\141\x63\x74\151\166\145\137\157\156", "\166\141\154\165\x65" => 0, "\x6c\141\142\145\154" => $this->l($lR::HTTP_REDIRECT_SSO)], ["\x69\x64" => "\x61\143\164\151\x76\x65\137\x66\146", "\x76\141\x6c\x75\145" => 1, "\154\141\x62\x65\x6c" => $this->l($lR::HTTP_POST_SSO)]]], ["\x74\x79\x70\145" => "\x74\x65\x78\x74", "\154\141\142\x65\154" => $this->l($lR::SAML_LOGOUT_URL), "\156\141\155\x65" => "\x4d\x4f\x5f\x53\x41\115\x4c\x5f\x4c\x4f\107\117\x55\x54\x5f\125\x52\114", "\x73\151\172\145" => 20], ["\x74\x79\x70\145" => "\x72\141\x64\x69\x6f", "\154\141\142\x65\x6c" => $this->l($lR::SELECT_BINDING_TYPE_FOR_SLO), "\x6e\x61\155\145" => "\115\x4f\137\x53\x4c\x4f\137\x42\x49\x4e\x44\111\x4e\x47\x5f\x54\131\120\105", "\x76\x61\154\165\145\163" => [["\151\x64" => "\x61\x63\x74\x69\x76\145\x5f\157\156", "\166\x61\154\165\145" => 0, "\154\141\142\145\x6c" => $this->l($lR::HTTP_REDIRECT_SLO)], ["\x69\x64" => "\x61\x63\x74\x69\166\x65\137\146\x66", "\x76\x61\x6c\x75\145" => 1, "\x6c\x61\142\x65\x6c" => $this->l($lR::HTTP_POST_SLO)]]], ["\x74\171\x70\145" => "\x73\145\154\x65\143\x74", "\154\141\x62\145\154" => $this->trans($lR::NAME_ID_FORMATE), "\x6e\x61\155\145" => "\115\x4f\137\x53\x41\115\114\x5f\116\101\x4d\x45\x49\x44\137\x46\117\x52\x4d\x41\124", "\x72\x65\161\165\151\x72\x65\x64" => true, "\x6f\160\x74\x69\x6f\156\x73" => ["\x71\165\145\x72\x79" => [["\151\144" => "\x31\x2e\x31\72\156\141\155\x65\151\x64\x2d\x66\x6f\162\155\x61\164\72\145\x6d\x61\151\154", "\156\x61\155\x65" => $this->trans($lR::NAMEID_EMAIL)], ["\x69\x64" => "\61\56\x31\72\156\x61\155\x65\x69\x64\x2d\146\157\162\155\x61\x74\x3a\x75\x6e\163\160\x65\143\151\x66\x69\x65\x64", "\156\141\x6d\145" => $this->trans($lR::UNSPECIFIED)], ["\x69\x64" => "\61\56\x31\x3a\156\x61\155\145\x69\x64\x2d\146\157\x72\155\x61\164\x3a\160\145\x72\x73\x69\163\x74\145\x6e\164", "\156\x61\155\x65" => $this->trans($lR::NAMEID_PERSISTENT)], ["\x69\144" => "\x31\x2e\x31\x3a\156\141\x6d\x65\151\x64\55\x66\x6f\x72\x6d\x61\x74\x3a\164\x72\141\156\x73\143\x69\145\x6e\x74", "\x6e\141\x6d\x65" => $this->trans($lR::NAMEID_TRANSCIENT)]], "\x69\144" => "\151\144", "\156\141\155\x65" => "\156\x61\x6d\145"]], ["\164\171\x70\145" => "\164\145\170\x74\141\162\x65\141", "\x6c\141\142\x65\x6c" => $this->l($lR::IDP_CERTIFICATE), "\x6e\x61\155\x65" => "\115\117\137\x49\104\x50\137\103\105\122\x54", "\163\151\x7a\x65" => 20, "\x69\x64" => "\x69\x64\160\137\x63\145\x72\164", "\x72\x65\161\x75\151\162\145\x64" => true], ["\164\171\x70\145" => "\163\x77\x69\x74\143\x68", "\x6c\x61\142\145\154" => $this->l($lR::CHAR_ENCODING), "\156\x61\x6d\145" => "\115\117\x5f\103\x48\101\122\x41\x43\x54\105\x52\x5f\x45\116\103\x4f\104\111\x4e\107", "\166\141\154\x75\x65\x73" => [["\x69\x64" => "\x61\143\x74\x69\166\145\x5f\157\156", "\166\x61\x6c\165\x65" => 1, "\154\x61\142\145\154" => $this->l($lR::YES)], ["\151\144" => "\141\x63\164\x69\x76\x65\x5f\146\x66", "\x76\x61\154\165\x65" => 0, "\154\x61\142\x65\154" => $this->l($lR::NO)]]]], "\x62\165\164\x74\157\x6e\163" => [["\x74\171\x70\145" => "\142\x75\x74\x74\x6f\x6e", "\151\144" => "\164\145\163\164\137\143\157\156\x66\151\x67", "\x6e\141\x6d\145" => $is, "\151\x63\157\x6e" => "\x69\x63\157\x6e\55\x66\157\157", "\x74\151\164\x6c\145" => $lR::TEST_CONFIG]], "\163\165\142\155\x69\x74" => ["\x74\x69\x74\154\145" => $this->l($lR::SAVE), "\151\143\x6f\156" => "\151\x63\157\x6e\x2d\146\157\x6f"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\144\155\x69\156\x4d\157\x64\x75\154\x65\x73");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\x63\x6f\x6e\x66\x69\x67\x75\162\x65" => $this->name]);
$fA->submit_action = "\163\x75\142\155\151\x74" . $this->name;
$fA->default_form_language = (int) Configuration::get("\x50\x53\x5f\114\101\x4e\x47\x5f\104\x45\x46\x41\125\114\124");
$fA->fields_value["\x4d\117\137\x49\x44\120\x5f\x45\116\124\111\x54\131\x5f\111\104"] = Tools::getValue("\x4d\117\137\111\104\x50\137\105\x4e\x54\x49\x54\131\137\111\104", Configuration::get("\115\117\137\x49\x44\x50\x5f\x45\x4e\x54\x49\124\131\x5f\x49\104"));
$fA->fields_value["\x4d\x4f\137\123\111\x47\116\x45\x44\137\122\105\121\x55\105\123\124"] = Tools::getValue("\115\x4f\137\123\111\107\116\x45\x44\137\x52\105\x51\x55\x45\123\124", Configuration::get("\x4d\117\x5f\123\111\107\x4e\x45\104\137\122\105\x51\125\105\x53\x54"));
$fA->fields_value["\115\117\x5f\123\101\115\114\x5f\114\117\x47\111\x4e\137\125\x52\114"] = Tools::getValue("\x4d\117\137\123\101\115\x4c\x5f\114\x4f\107\x49\x4e\x5f\125\x52\x4c", Configuration::get("\115\x4f\137\123\101\x4d\x4c\x5f\114\117\107\111\x4e\x5f\x55\x52\114"));
$fA->fields_value["\x4d\117\137\x53\101\x4d\114\x5f\x4c\117\x47\x4f\125\124\137\x55\x52\x4c"] = Tools::getValue("\x4d\x4f\137\123\101\x4d\114\x5f\114\x4f\x47\117\x55\124\x5f\x55\x52\114", Configuration::get("\115\x4f\137\123\x41\x4d\x4c\x5f\x4c\117\x47\117\x55\124\137\x55\122\x4c"));
$fA->fields_value["\x4d\117\137\x53\114\x4f\137\102\111\116\x44\x49\x4e\x47\x5f\x54\x59\120\105"] = Tools::getValue("\115\117\137\123\x4c\117\x5f\x42\x49\116\104\111\x4e\x47\137\124\131\x50\105", Configuration::get("\x4d\x4f\x5f\123\114\x4f\x5f\102\111\x4e\104\x49\116\x47\x5f\x54\131\x50\x45"));
$fA->fields_value["\115\117\137\123\x53\x4f\137\x42\111\116\x44\x49\x4e\107\137\x54\x59\x50\105"] = Tools::getValue("\x4d\117\x5f\x53\x53\x4f\137\102\111\x4e\104\x49\116\x47\x5f\124\x59\x50\105\x73\x73", Configuration::get("\x4d\x4f\137\123\123\x4f\x5f\102\111\116\104\x49\x4e\107\137\x54\x59\120\105"));
$fA->fields_value["\x4d\x4f\x5f\123\101\115\x4c\137\116\101\115\x45\x49\104\x5f\106\117\x52\x4d\101\x54"] = SPUrls::getNameIDFormat();
$fA->fields_value["\x4d\117\137\x49\104\x50\x5f\x43\x45\122\x54"] = Tools::getValue("\x4d\x4f\x5f\111\x44\120\137\103\105\x52\124", Configuration::get("\x4d\x4f\137\x49\104\x50\x5f\x43\105\x52\124"));
$fA->fields_value["\x4d\117\137\103\110\101\122\101\103\x54\105\x52\137\x45\x4e\103\117\x44\111\x4e\x47"] = Tools::getValue("\x4d\117\x5f\x43\110\101\x52\x41\x43\124\x45\122\x5f\105\x4e\103\x4f\104\x49\116\x47", Configuration::get("\115\117\x5f\103\110\x41\122\x41\103\x54\x45\x52\137\105\x4e\103\x4f\104\x49\x4e\x47"));
return $fA->generateForm([$form]);
}
public function SAMLAttributeMapping($lR)
{
$form = ["\x66\x6f\162\x6d" => ["\x6c\145\147\145\x6e\144" => ["\164\151\x74\154\145" => $this->l($lR::ATTR_MAPPING)], "\151\x6e\160\x75\x74" => [["\164\x79\x70\145" => "\164\x65\x78\x74", "\x6c\x61\142\145\154" => $this->l($lR::EMAIL), "\x6e\x61\155\x65" => "\x53\x41\x4d\x4c\137\x41\x54\124\x52\137\x45\115\x41\x49\x4c", "\163\151\172\145" => 20], ["\x74\x79\x70\x65" => "\164\x65\x78\164", "\x6c\x61\142\x65\x6c" => $this->l($lR::FIRST_NAME), "\x6e\x61\x6d\145" => "\123\x41\115\x4c\137\101\124\x54\122\137\x46\111\x52\x53\x54\137\x4e\x41\115\105", "\x73\151\x7a\145" => 20], ["\164\x79\x70\145" => "\164\145\170\164", "\154\141\142\145\154" => $this->l($lR::LAST_NAME), "\156\x61\x6d\145" => "\123\101\115\114\x5f\101\124\124\x52\x5f\114\x41\123\124\x5f\x4e\x41\115\x45", "\x73\x69\172\145" => 20]], "\163\x75\142\x6d\x69\x74" => ["\151\144" => "\163\141\155\x6c\137\163\x61\x76\x65\x5f\165\163\145\162\137\x61\164\x74\x72", "\x74\151\164\x6c\x65" => $this->l($lR::SAVE), "\151\143\x6f\x6e" => "\x69\x63\x6f\156\55\x66\x6f\x6f"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\144\155\x69\x6e\x4d\x6f\144\x75\x6c\145\163");
$fA->currentIndex = AdminController::$currentIndex . "\46" . http_build_query(["\143\157\x6e\x66\151\147\165\162\x65" => $this->name]);
$fA->submit_action = "\163\x61\155\x6c\137\163\141\x76\x65\x5f\165\x73\145\162\x5f\x61\164\164\x72" . $this->name;
$fA->default_form_language = (int) Configuration::get("\120\123\x5f\x4c\x41\116\107\137\x44\105\x46\x41\x55\x4c\x54");
$fA->fields_value["\123\101\x4d\114\137\x41\124\124\x52\x5f\x45\115\101\111\114"] = Tools::getValue("\x53\x41\115\114\x5f\x41\124\124\122\137\x45\115\101\111\114", Configuration::get("\123\101\x4d\x4c\x5f\101\x54\124\122\x5f\x45\x4d\x41\111\x4c"));
$fA->fields_value["\x53\x41\x4d\114\x5f\x41\x54\124\x52\137\x46\111\x52\x53\x54\x5f\x4e\x41\115\x45"] = Tools::getValue("\123\101\x4d\114\x5f\x41\124\124\122\x5f\106\x49\122\123\x54\137\x4e\x41\115\x45", Configuration::get("\x53\101\x4d\x4c\137\x41\x54\x54\122\137\106\111\x52\123\x54\x5f\116\101\115\105"));
$fA->fields_value["\x53\x41\115\114\137\x41\x54\x54\122\137\x4c\x41\x53\x54\137\116\x41\115\x45"] = Tools::getValue("\x53\x41\x4d\x4c\x5f\101\x54\124\122\137\114\101\x53\124\x5f\116\101\115\x45", Configuration::get("\123\x41\x4d\114\137\x41\124\124\x52\x5f\x4c\101\x53\124\x5f\116\x41\x4d\105"));
return $fA->generateForm([$form]);
}
public function SAMLGroupMapping($lR)
{
$UO = SPUrls::prestashopProfiles();
$Uc = [];
$Uc[] = ["\x74\x79\160\145" => "\164\x65\170\164", "\154\141\x62\x65\x6c" => $this->l($lR::GROUP), "\x6e\141\155\145" => "\123\x41\x4d\x4c\137\x41\124\x54\x52\137\107\122\x4f\125\120", "\x73\x69\172\145" => 20, "\162\145\x71\165\151\162\x65\144" => true];
$Uc[] = ["\164\171\160\x65" => "\163\x77\x69\164\x63\x68", "\154\x61\142\x65\154" => $this->l($lR::DONT_CREATE_BACK_OFFICE_USER), "\156\x61\x6d\x65" => "\123\101\115\x4c\137\104\x4f\x5f\116\x4f\124\137\103\x52\105\101\x54\105\x5f\116\x45\127\137\x41\104\x4d\111\116\137\x55\x53\105\x52\123", "\x76\x61\x6c\165\x65\163" => [["\x69\144" => "\x61\143\164\x69\x76\x65\137\x6f\x6e", "\166\141\x6c\165\x65" => 1, "\154\x61\x62\145\154" => $this->l($lR::YES)], ["\151\x64" => "\141\x63\x74\x69\166\145\137\146\146", "\x76\141\154\165\145" => 0, "\x6c\x61\142\145\x6c" => $this->l($lR::NO)]]];
$Uc[] = ["\x74\x79\160\145" => "\163\x77\151\x74\x63\150", "\x6c\x61\x62\x65\x6c" => $this->l($lR::DONT_LOGIN_NON_MAPPED_USER), "\x6e\141\155\145" => "\123\101\x4d\114\x5f\104\x4f\137\116\117\124\137\x43\x52\x45\x41\124\x45\137\x41\104\x4d\111\x4e\x5f\125\123\105\122\x53\x5f\127\x49\124\x48\x4f\x55\124\x5f\107\122\117\125\x50\x5f\x4d\x41\120\120\x45\x44", "\166\x61\x6c\165\145\163" => [["\151\144" => "\141\x63\x74\151\x76\145\137\x6f\x6e", "\166\x61\154\x75\145" => 1, "\x6c\x61\142\145\154" => $this->l($lR::YES)], ["\x69\x64" => "\x61\143\x74\151\x76\x65\x5f\146\146", "\x76\141\x6c\x75\145" => 0, "\154\x61\x62\x65\154" => $this->l($lR::NO)]]];
$Uc[] = ["\x74\171\160\x65" => "\x73\x77\151\x74\143\150", "\154\x61\x62\145\x6c" => $this->l($lR::DONT_ALLOW_NONMAPPED_USERS_TO_LOGIN), "\156\x61\x6d\145" => "\123\x41\115\114\137\104\x4f\137\x4e\x4f\x54\x5f\101\114\x4c\117\x57\x5f\101\104\115\x49\x4e\x5f\125\123\105\x52\x53\x5f\124\117\137\x4c\117\x47\x49\x4e\137\127\111\124\x48\137\x47\x49\126\x45\x4e\x5f\x47\122\117\125\120", "\166\141\x6c\165\x65\163" => [["\151\144" => "\x61\x63\164\151\166\x65\137\x6f\156", "\166\x61\154\x75\x65" => 1, "\x6c\141\142\145\x6c" => $this->l($lR::YES)], ["\x69\x64" => "\x61\x63\x74\x69\x76\x65\137\x66\146", "\x76\141\x6c\165\145" => 0, "\x6c\x61\x62\x65\x6c" => $this->l($lR::NO)]]];
$Uc[] = ["\164\171\x70\x65" => "\x74\x65\x78\x74", "\154\141\142\x65\x6c" => $this->l($lR::GROUPS_NOT_ALLOWED_SSO), "\x6e\141\155\145" => "\123\101\115\114\137\x41\x54\x54\122\x5f\x47\x52\117\x55\x50\x5f\116\117\x54\137\101\114\x4c\117\127\x45\104", "\x73\x69\x7a\145" => 20, "\x72\x65\x71\x75\x69\162\145\144" => true];
$Uc[] = ["\x74\x79\160\145" => "\x74\145\170\164", "\x6c\x61\x62\145\x6c" => $this->l($lR::DEFAULT_BACKOFFICE_ID), "\x6e\141\x6d\x65" => "\x53\x41\x4d\114\x5f\x41\x54\124\122\x5f\104\x45\106\x41\125\x4c\124\137\107\122\x4f\x55\120", "\x73\x69\x7a\145" => 20, "\162\x65\x71\165\x69\x72\x65\144" => true];
foreach ($UO as $sZ => $P9) {
$Uc[] = ["\x74\171\x70\x65" => "\x74\x65\170\164", "\x6c\141\142\x65\154" => $P9["\x6e\141\155\145"], "\156\141\155\145" => "\123\101\x4d\x4c\137\x41\124\x54\x52\137" . $P9["\x6e\141\155\145"], "\163\151\172\145" => 20];
HS:
}
vp:
$form = ["\146\x6f\x72\x6d" => ["\x6c\145\x67\x65\x6e\144" => ["\x74\x69\x74\x6c\x65" => $this->l($lR::BACKOFFICE_GROUP_ROLL_MAPPING)], "\151\x6e\x70\x75\x74" => $Uc, "\x73\165\142\x6d\x69\164" => ["\x69\x64" => "\163\141\x6d\154\x5f\163\141\166\x65\x5f\x75\163\145\162\137\147\x72\x6f\165\x70\x5f\141\164\x74\162", "\164\151\x74\154\x65" => $this->l($lR::SAVE), "\x69\x63\157\x6e" => "\151\143\157\156\x2d\146\157\157"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\x64\155\151\156\115\157\x64\165\154\x65\163");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\143\157\x6e\x66\151\147\165\162\145" => $this->name]);
$fA->submit_action = "\163\x61\155\x6c\x5f\x73\141\166\x65\x5f\165\x73\x65\162\137\x67\162\157\165\x70\x5f\141\x74\x74\162" . $this->name;
$fA->default_form_language = (int) Configuration::get("\120\123\137\x4c\101\116\107\137\x44\105\x46\x41\125\114\124");
$fA->fields_value["\x53\101\115\x4c\137\x41\124\124\122\x5f\107\122\x4f\125\x50"] = Tools::getValue("\123\101\115\x4c\x5f\101\124\x54\x52\x5f\x47\x52\117\125\120", Configuration::get("\x53\101\115\x4c\137\101\x54\x54\122\137\x47\122\x4f\125\x50"));
$fA->fields_value["\123\101\x4d\114\137\104\117\137\116\x4f\124\137\103\122\105\101\x54\105\x5f\116\x45\127\x5f\x41\104\115\x49\116\x5f\x55\123\x45\122\x53"] = Tools::getValue("\123\101\115\114\x5f\104\117\x5f\x4e\117\124\x5f\103\122\x45\101\x54\105\x5f\116\105\127\x5f\x41\104\x4d\111\116\x5f\125\x53\x45\x52\x53", Configuration::get("\123\101\x4d\x4c\137\x44\x4f\137\x4e\x4f\x54\x5f\x43\x52\105\101\124\105\137\116\x45\x57\x5f\101\x44\x4d\x49\116\x5f\125\x53\x45\122\x53", true));
$fA->fields_value["\123\x41\x4d\114\x5f\x44\117\x5f\116\x4f\x54\x5f\x43\122\x45\x41\x54\x45\x5f\101\104\115\111\116\137\x55\123\105\122\123\x5f\x57\111\x54\x48\x4f\x55\x54\137\x47\x52\117\125\120\x5f\x4d\101\x50\x50\105\104"] = Tools::getValue("\123\x41\x4d\114\137\104\117\x5f\x4e\117\x54\x5f\x43\122\x45\x41\x54\x45\x5f\101\x44\115\x49\x4e\137\125\x53\x45\x52\123\x5f\127\111\124\110\x4f\125\x54\137\x47\122\x4f\125\120\x5f\x4d\x41\120\x50\105\x44", Configuration::get("\123\x41\x4d\114\137\x44\x4f\137\116\117\x54\x5f\103\122\105\x41\124\x45\x5f\101\x44\x4d\x49\116\137\x55\x53\x45\x52\x53\137\127\111\124\x48\x4f\x55\x54\x5f\107\122\x4f\x55\x50\x5f\x4d\x41\x50\x50\x45\104", true));
$fA->fields_value["\123\x41\115\114\137\104\x4f\137\x4e\x4f\124\137\x41\x4c\x4c\117\127\137\101\x44\115\111\x4e\137\125\x53\105\122\123\137\124\x4f\137\114\x4f\x47\111\x4e\137\127\111\x54\110\x5f\107\x49\x56\x45\x4e\137\107\x52\x4f\x55\x50"] = Tools::getValue("\123\x41\115\114\137\x44\x4f\x5f\116\x4f\124\137\x41\114\114\117\127\x5f\x41\104\x4d\111\116\x5f\x55\123\105\122\x53\x5f\x54\x4f\137\x4c\117\107\111\116\x5f\x57\x49\x54\x48\x5f\107\111\126\105\116\137\x47\x52\x4f\x55\120", Configuration::get("\x53\x41\x4d\114\x5f\104\117\x5f\116\x4f\124\x5f\x41\114\114\x4f\x57\x5f\x41\x44\x4d\x49\x4e\137\125\x53\x45\122\x53\137\x54\117\x5f\x4c\x4f\x47\111\116\x5f\x57\111\124\110\137\107\111\x56\105\116\x5f\107\122\x4f\125\x50"));
$fA->fields_value["\x53\x41\115\x4c\x5f\x41\124\124\122\137\107\x52\117\125\x50\x5f\116\117\x54\x5f\101\114\x4c\117\127\105\104"] = Tools::getValue("\123\101\x4d\x4c\137\101\x54\x54\x52\137\107\x52\x4f\125\120\x5f\x4e\117\x54\137\101\x4c\x4c\x4f\x57\x45\104", Configuration::get("\x53\x41\115\114\x5f\x41\124\x54\x52\137\x47\x52\117\x55\120\x5f\116\x4f\124\x5f\101\x4c\114\x4f\x57\x45\104"));
$fA->fields_value["\123\101\115\x4c\137\x41\124\124\122\x5f\x44\x45\x46\101\125\114\124\x5f\107\122\117\125\x50"] = Tools::getValue("\123\101\115\x4c\x5f\101\x54\124\x52\137\x44\x45\106\101\x55\x4c\x54\137\107\x52\x4f\x55\120", Configuration::get("\x53\101\x4d\x4c\137\101\x54\x54\x52\137\x44\x45\x46\x41\125\x4c\x54\x5f\107\122\117\125\120"));
foreach ($UO as $sZ => $P9) {
$ch = "\x53\x41\115\114\x5f\101\124\124\x52\x5f" . $P9["\156\x61\x6d\x65"];
$cl = Tools::getValue($ch, Configuration::get($ch));
$fA->fields_value[$ch] = $cl;
M8:
}
wC:
return $fA->generateForm([$form]);
}
public function SAMLBackOfficeSSOSettings($lR)
{
$form = ["\x66\157\x72\155" => ["\x6c\145\x67\145\156\144" => ["\164\x69\x74\x6c\145" => $this->l($lR::BACKOFFICE_REDIRECTION_SETTINGS)], "\x69\x6e\160\165\x74" => [["\x74\x79\x70\145" => "\x73\167\x69\x74\143\150", "\154\x61\142\x65\154" => $this->l($lR::ENABLE_BACKOFFICE_SSO), "\156\141\155\145" => "\123\101\x4d\x4c\x5f\105\x4e\101\102\x4c\105\x5f\102\x41\x43\113\x5f\x4f\x46\106\111\x43\x45\137\x53\123\117", "\x76\x61\x6c\165\145\x73" => [["\x69\144" => "\141\143\164\151\x76\145\137\x6f\156", "\x76\141\154\x75\145" => 1, "\x6c\x61\x62\x65\x6c" => $this->l($lR::YES)], ["\x69\x64" => "\141\143\164\151\x76\145\x5f\x66\146", "\166\141\x6c\165\145" => 0, "\154\141\x62\145\154" => $this->l($lR::NO)]]], ["\x74\171\x70\145" => "\164\x65\x78\x74", "\x6c\x61\142\x65\154" => $this->l($lR::BACKOFFICE_ADMIN_URL), "\156\141\x6d\x65" => "\x53\101\x4d\114\137\x42\x41\x43\x4b\x5f\117\x46\x46\x49\x43\105\137\x41\104\115\x49\116\137\125\122\114", "\x73\x69\x7a\145" => 20, "\162\145\161\x75\x69\162\145\144" => true], ["\x74\171\x70\145" => "\x73\167\151\x74\x63\x68", "\x6c\x61\142\145\154" => $this->l($lR::AUTO_REDIRECT_FORM_BACK_OFFICE), "\156\x61\x6d\x65" => "\x53\x41\x4d\x4c\137\105\116\x41\102\114\105\x5f\x42\101\103\x4b\137\x4f\106\x46\x49\x43\x45\x5f\x41\x55\124\x4f\137\122\105\x44\111\122\105\x43\x54", "\x76\141\x6c\x75\145\163" => [["\151\144" => "\x61\143\x74\151\x76\145\x5f\157\x6e", "\166\x61\x6c\x75\x65" => 1, "\154\x61\x62\x65\x6c" => $this->l($lR::YES)], ["\x69\144" => "\x61\x63\x74\151\x76\x65\137\146\x66", "\166\x61\154\x75\x65" => 0, "\154\x61\142\x65\154" => $this->l($lR::NO)]]], ["\x74\171\x70\x65" => "\x73\167\x69\164\143\150", "\x6c\141\142\145\x6c" => $this->l($lR::ENABLE_BACKOFFICE_BACKDOOR), "\156\141\155\145" => "\123\101\x4d\x4c\137\105\x4e\x41\x42\x4c\105\137\102\101\x43\x4b\x5f\117\x46\x46\x49\x43\105\137\x42\101\x43\113\x44\x4f\117\x52", "\166\x61\154\x75\145\163" => [["\x69\144" => "\141\x63\x74\151\166\x65\x5f\x6f\x6e", "\166\141\154\165\145" => 1, "\x6c\x61\x62\145\x6c" => $this->l($lR::YES)], ["\x69\x64" => "\141\143\x74\151\x76\x65\x5f\146\x66", "\x76\x61\154\165\145" => 0, "\x6c\141\x62\x65\154" => $this->l($lR::NO)]]], ["\164\171\x70\145" => "\x74\x65\x78\x74", "\154\141\x62\145\154" => $this->l($lR::BACKOFFICE_BACKDOOR_URL), "\x6e\141\x6d\x65" => "\x53\101\115\114\x5f\102\x41\103\113\x5f\117\106\106\x49\x43\105\x5f\x42\x41\103\x4b\104\117\x4f\122\x5f\125\x52\114", "\163\151\x7a\145" => 20, "\x64\x69\163\x61\142\154\x65\144" => true], ["\x74\x79\160\x65" => "\x73\167\x69\x74\x63\150", "\154\141\x62\x65\154" => $this->l($lR::RELAYSTATE_BACKOFFICE), "\156\x61\x6d\x65" => "\x53\101\x4d\x4c\x5f\x45\116\x41\x42\114\x45\137\x42\x41\x43\113\x5f\x4f\x46\x46\111\x43\x45\x5f\x52\x45\x4c\x41\x59\x5f\x53\124\101\x54\x45", "\x76\141\x6c\x75\145\x73" => [["\x69\144" => "\x61\x63\164\151\x76\145\137\157\156", "\x76\141\154\165\x65" => 1, "\x6c\141\x62\x65\x6c" => $this->l($lR::YES)], ["\x69\144" => "\141\143\164\151\x76\145\137\146\x66", "\x76\x61\154\x75\x65" => 0, "\154\141\x62\145\x6c" => $this->l($lR::NO)]]], ["\164\171\x70\145" => "\164\145\x78\x74", "\154\x61\x62\145\154" => $this->l($lR::BACK_OFFICE_RELAYSTATE_URL), "\156\141\x6d\x65" => "\123\101\115\x4c\x5f\102\101\x43\113\x5f\117\106\106\111\x43\105\x5f\x52\105\114\101\x59\x5f\x53\x54\101\124\x45\137\x55\x52\x4c", "\163\151\172\x65" => 20, "\162\145\161\x75\x69\162\145\144" => true], ["\164\171\x70\145" => "\164\145\x78\164", "\x6c\x61\x62\x65\154" => $this->l($lR::BACKOFFICE_SSO_INIT_URL), "\156\141\x6d\x65" => "\123\x41\115\x4c\x5f\102\101\103\113\x5f\117\x46\x46\x49\x43\105\x5f\114\x4f\x47\x49\116\x5f\125\122\114", "\163\151\172\x65" => 20, "\144\151\x73\141\x62\154\x65\x64" => true], ["\x74\171\x70\x65" => "\x74\145\x78\164", "\154\x61\x62\145\154" => $this->l($lR::BACKOFFICE_SLO_INIT_URL), "\156\x61\x6d\145" => "\x53\101\115\x4c\137\x42\x41\x43\113\137\x4f\106\106\x49\x43\105\137\114\117\x47\117\x55\x54\137\x55\122\x4c", "\163\151\172\145" => 20, "\x64\x69\163\141\x62\x6c\145\144" => true]], "\163\165\x62\155\151\164" => ["\151\144" => "\x73\141\155\x6c\x5f\x62\x61\143\153\x6f\x66\x66\x69\143\x65\137\x73\x65\x74\x74\x69\x6e\147\163", "\164\x69\x74\154\x65" => $this->l($lR::UPDATE), "\x69\143\157\156" => "\151\x63\157\156\x2d\x66\157\157"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\144\155\151\156\115\157\x64\165\x6c\145\x73");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\143\157\x6e\x66\x69\x67\x75\x72\145" => $this->name]);
$fA->submit_action = "\163\x61\155\x6c\137\x62\141\143\x6b\x6f\x66\146\151\x63\x65\x5f\x73\145\164\x74\x69\156\x67\163" . $this->name;
$fA->fields_value["\123\101\115\114\x5f\105\x4e\101\x42\114\105\x5f\102\101\103\113\137\x4f\106\x46\x49\103\x45\137\x53\x53\x4f"] = Tools::getValue("\x53\x41\115\114\137\x45\x4e\x41\102\x4c\105\137\102\101\103\x4b\x5f\x4f\106\106\111\103\105\137\123\x53\x4f", Configuration::get("\x53\101\115\x4c\137\x45\x4e\101\x42\x4c\x45\x5f\102\101\x43\113\137\x4f\106\x46\x49\x43\x45\137\123\123\x4f"));
$fA->fields_value["\x53\x41\115\x4c\x5f\x42\x41\103\x4b\x5f\x4f\106\x46\x49\x43\105\137\101\x44\x4d\x49\116\x5f\x55\122\114"] = Tools::getValue("\x53\x41\115\114\x5f\x42\x41\103\113\137\x4f\x46\106\x49\103\x45\x5f\x41\104\115\x49\116\x5f\125\122\x4c", Configuration::get("\123\101\x4d\x4c\137\x42\x41\x43\x4b\x5f\117\106\106\x49\103\105\x5f\x41\x44\115\111\x4e\x5f\125\122\x4c"));
$fA->fields_value["\x53\x41\x4d\114\137\x45\116\x41\x42\x4c\x45\x5f\102\101\103\x4b\x5f\117\106\x46\111\103\105\137\x41\125\x54\x4f\x5f\x52\105\104\111\122\105\x43\x54"] = Tools::getValue("\x53\x41\x4d\114\137\x45\x4e\x41\102\x4c\x45\137\x42\101\x43\113\x5f\x4f\x46\106\x49\x43\105\x5f\x41\x55\124\x4f\137\x52\x45\x44\111\x52\x45\103\x54", Configuration::get("\x53\101\x4d\114\137\105\116\x41\102\x4c\105\137\102\x41\x43\x4b\137\x4f\106\x46\111\103\x45\137\101\x55\124\117\x5f\122\105\104\x49\122\x45\x43\x54"));
$fA->fields_value["\123\x41\115\x4c\x5f\x45\116\x41\x42\x4c\x45\x5f\x42\101\103\x4b\137\x4f\x46\106\111\x43\x45\137\x42\101\103\113\104\117\117\x52"] = Tools::getValue("\x53\x41\x4d\x4c\x5f\105\x4e\x41\x42\114\105\x5f\x42\101\103\113\137\x4f\106\106\111\x43\x45\x5f\102\x41\103\113\x44\117\x4f\122", Configuration::get("\123\101\115\x4c\x5f\105\x4e\101\102\x4c\x45\137\102\101\x43\113\137\117\106\x46\x49\x43\105\137\102\101\x43\113\x44\117\x4f\x52"));
$fA->fields_value["\x53\x41\115\x4c\x5f\x42\101\x43\113\x5f\x4f\106\106\111\x43\105\x5f\x42\x41\x43\113\104\x4f\117\x52\137\125\x52\114"] = Tools::getValue("\x53\101\115\114\137\102\101\103\x4b\137\117\x46\106\111\103\105\137\101\x44\115\x49\116\137\x55\x52\114", Configuration::get("\123\101\x4d\114\137\102\101\x43\113\x5f\x4f\x46\x46\x49\103\105\x5f\x41\104\x4d\x49\116\x5f\x55\122\x4c")) . "\x2f\x69\156\144\x65\x78\x2e\160\150\x70\77\x63\x6f\x6e\164\162\x6f\154\154\x65\x72\75\101\x64\155\151\156\x4c\157\147\x69\x6e\46\x73\x61\155\154\137\163\x73\157\x3d\146\141\x6c\163\145";
$fA->fields_value["\x53\101\x4d\x4c\x5f\105\116\x41\102\114\105\x5f\102\x41\x43\x4b\137\x4f\106\x46\x49\x43\105\x5f\122\105\114\x41\x59\137\x53\124\x41\124\x45"] = Tools::getValue("\123\101\x4d\x4c\x5f\105\116\x41\x42\x4c\105\x5f\102\101\103\x4b\137\x4f\106\x46\x49\x43\x45\x5f\122\x45\x4c\101\131\x5f\x53\124\101\124\x45", Configuration::get("\123\101\115\x4c\137\x45\x4e\x41\102\114\x45\137\102\x41\103\x4b\x5f\117\106\106\x49\x43\x45\x5f\122\105\x4c\x41\x59\137\x53\124\x41\124\x45"));
$fA->fields_value["\x53\101\115\114\x5f\102\101\103\x4b\x5f\117\106\x46\x49\x43\x45\x5f\x52\105\x4c\101\131\x5f\x53\124\101\124\105\137\125\x52\114"] = Tools::getValue("\x53\101\x4d\114\x5f\102\x41\x43\x4b\x5f\x4f\106\106\x49\x43\105\137\122\105\x4c\101\131\x5f\x53\124\101\124\105\137\x55\122\x4c", Configuration::get("\123\x41\x4d\x4c\x5f\x42\x41\x43\113\137\117\106\x46\111\x43\105\137\122\105\x4c\x41\131\x5f\x53\x54\x41\124\x45\x5f\125\122\x4c"));
$fA->fields_value["\x53\101\115\x4c\137\x42\x41\103\x4b\137\117\x46\106\x49\103\105\137\114\117\x47\111\x4e\x5f\x55\x52\114"] = SPUrls::getBackOfficeLoginURL();
$fA->fields_value["\x53\x41\115\114\137\102\101\103\x4b\x5f\117\106\x46\x49\x43\x45\137\x4c\117\x47\x4f\125\x54\x5f\125\122\114"] = SPUrls::getBackOfficeLogoutURL();
return $fA->generateForm([$form]);
}
public function SAMLFrontOfficeSSOSettings($lR)
{
$form = ["\x66\157\x72\155" => ["\x6c\x65\147\x65\156\144" => ["\164\151\164\154\145" => $this->l($lR::FRONTOFFICE_REDIRECT_SETTING)], "\x69\156\x70\165\164" => [["\x74\171\x70\x65" => "\163\x77\151\x74\143\x68", "\x6c\141\142\x65\154" => $this->l($lR::ENABLE_FRONTOFFICE_SSO), "\156\x61\155\x65" => "\x53\101\115\x4c\x5f\x45\116\101\102\114\105\137\x46\x52\x4f\116\124\137\117\106\x46\111\103\105\137\x53\123\x4f", "\166\141\x6c\165\145\x73" => [["\x69\x64" => "\141\143\164\151\x76\145\x5f\157\x6e", "\x76\141\x6c\165\x65" => 1, "\x6c\141\142\x65\154" => $this->l($lR::YES)], ["\x69\x64" => "\141\x63\164\x69\166\145\x5f\x66\146", "\x76\141\154\x75\145" => 0, "\x6c\x61\142\x65\154" => $this->l($lR::NO)]]], ["\164\171\160\145" => "\163\x77\x69\x74\x63\x68", "\x6c\141\142\145\x6c" => $this->l($lR::AUTO_REDIRECT_FORM_FRONT_OFFICE_FROM_LOGIN), "\x6e\x61\x6d\145" => "\123\101\115\114\x5f\105\x4e\101\102\x4c\x45\137\106\122\x4f\x4e\x54\x5f\x4f\106\106\111\103\105\137\101\125\x54\x4f\x5f\122\x45\x44\111\x52\105\x43\124\137\106\x52\117\x4d\137\114\117\107\x49\x4e", "\166\141\x6c\x75\145\x73" => [["\151\x64" => "\141\x63\x74\x69\166\145\137\x6f\156", "\166\x61\154\x75\x65" => 1, "\154\x61\x62\x65\154" => $this->l($lR::YES)], ["\x69\144" => "\141\143\164\x69\166\145\x5f\x66\x66", "\166\141\154\165\x65" => 0, "\154\x61\142\x65\154" => $this->l($lR::NO)]]], ["\164\x79\160\145" => "\x73\167\x69\164\x63\150", "\154\x61\x62\145\154" => $this->l($lR::AUTO_REDIRECT_FORM_FRONT_OFFICE), "\x6e\141\x6d\x65" => "\x53\101\115\114\x5f\105\x4e\101\x42\x4c\105\x5f\x46\122\x4f\x4e\x54\x5f\117\106\x46\x49\103\x45\x5f\x41\x55\124\x4f\137\122\105\104\x49\122\x45\x43\x54", "\166\141\154\x75\145\x73" => [["\151\x64" => "\x61\143\164\x69\166\x65\137\157\156", "\x76\x61\x6c\165\145" => 1, "\x6c\x61\142\145\x6c" => $this->l($lR::YES)], ["\x69\x64" => "\x61\143\x74\151\x76\x65\x5f\146\x66", "\x76\141\154\x75\145" => 0, "\154\x61\142\x65\x6c" => $this->l($lR::NO)]]], ["\164\171\x70\x65" => "\x73\167\x69\x74\143\150", "\154\141\142\145\x6c" => $this->l($lR::SAML_ENABLE_FRONT_OFFICE_BACKDOOR), "\x6e\141\155\145" => "\x53\101\115\114\x5f\x45\116\101\x42\114\105\x5f\x46\x52\x4f\116\x54\137\117\x46\106\111\x43\105\137\x42\101\x43\x4b\104\x4f\x4f\122", "\x76\141\x6c\x75\145\163" => [["\151\144" => "\141\143\164\151\x76\x65\x5f\x6f\x6e", "\166\x61\x6c\165\145" => 1, "\154\x61\x62\145\154" => $this->l($lR::YES)], ["\151\144" => "\x61\143\164\x69\166\x65\x5f\x66\146", "\x76\141\154\x75\x65" => 0, "\x6c\141\x62\x65\x6c" => $this->l($lR::NO)]]], ["\x74\171\160\145" => "\x74\x65\x78\164", "\x6c\x61\x62\145\154" => $this->l($lR::FRONTOFFICE_BACKDOOR_URL), "\156\x61\155\145" => "\x53\x41\x4d\114\137\x46\x52\x4f\x4e\x54\137\x4f\106\106\111\103\x45\x5f\102\x41\103\x4b\104\117\117\x52\137\x55\x52\114", "\163\x69\172\x65" => 20, "\144\151\163\141\142\154\145\x64" => true], ["\x74\171\160\x65" => "\163\167\151\x74\x63\150", "\154\141\142\x65\x6c" => $this->l($lR::ENABLE_RELAYSTATE_FRONT_OFFICE), "\x6e\141\155\x65" => "\x53\101\115\114\137\105\116\x41\102\x4c\x45\137\x46\x52\117\116\124\x5f\117\x46\x46\x49\103\105\137\x52\x45\114\101\x59\137\123\x54\101\124\x45", "\166\141\x6c\165\x65\163" => [["\x69\x64" => "\x61\x63\x74\x69\x76\x65\137\x6f\x6e", "\x76\x61\154\x75\145" => 1, "\x6c\x61\142\145\154" => $this->l($lR::YES)], ["\151\144" => "\141\x63\164\151\166\145\137\146\146", "\x76\141\x6c\x75\x65" => 0, "\x6c\x61\x62\145\154" => $this->l($lR::NO)]]], ["\164\x79\160\x65" => "\x74\x65\x78\164", "\154\141\142\145\x6c" => $this->l($lR::FRONT_OFFICE_RELAY_STATE_URL), "\156\x61\x6d\145" => "\123\x41\115\x4c\x5f\106\x52\x4f\x4e\124\137\117\x46\106\111\103\x45\x5f\x52\105\114\x41\131\x5f\x53\124\101\124\105\137\x55\x52\x4c", "\163\x69\172\x65" => 20, "\x72\x65\x71\x75\151\x72\x65\x64" => true], ["\164\x79\x70\x65" => "\164\145\x78\164", "\x6c\141\x62\x65\154" => $this->l($lR::FRONTOFFICE_SSO_INIT_URL), "\x6e\x61\x6d\145" => "\123\x41\x4d\114\x5f\106\x52\117\116\124\x5f\x4f\x46\x46\x49\x43\105\137\114\117\x47\111\116\137\x55\122\x4c", "\163\x69\x7a\x65" => 20, "\x64\151\163\x61\x62\154\x65\x64" => true], ["\164\171\160\x65" => "\x74\x65\170\164", "\x6c\x61\x62\x65\x6c" => $this->l($lR::SAML_FRONT_OFFICE_LOGOUT_URL), "\156\141\155\x65" => "\123\101\115\114\x5f\x46\x52\x4f\x4e\x54\x5f\x4f\x46\106\x49\x43\x45\137\x4c\117\107\117\125\124\137\125\122\x4c", "\163\x69\172\x65" => 20, "\144\151\x73\141\x62\154\145\144" => true]], "\x73\x75\142\155\x69\164" => ["\151\x64" => "\163\x61\x6d\154\x5f\x66\x72\x6f\x6e\x74\157\x66\146\151\x63\x65\x5f\x73\x65\x74\x74\151\156\x67\x73", "\x74\x69\x74\154\145" => $this->l($lR::UPDATE), "\x69\143\157\x6e" => "\x69\143\157\x6e\x2d\x66\x6f\x6f"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\144\155\151\x6e\x4d\x6f\x64\165\x6c\145\x73");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\143\x6f\156\146\151\x67\165\x72\x65" => $this->name]);
$fA->submit_action = "\x73\x61\155\x6c\137\146\162\x6f\x6e\x74\157\x66\x66\151\x63\x65\x5f\x73\145\164\x74\151\156\x67\163" . $this->name;
$fA->fields_value["\x53\x41\115\x4c\x5f\x45\x4e\101\102\114\105\137\106\x52\x4f\x4e\x54\137\117\x46\x46\111\x43\x45\137\123\123\x4f"] = Tools::getValue("\x53\x41\x4d\114\x5f\x45\x4e\x41\x42\114\x45\137\x46\x52\x4f\116\124\x5f\117\x46\106\111\x43\105\x5f\123\x53\x4f", Configuration::get("\x53\x41\x4d\114\137\105\116\101\x42\x4c\105\x5f\x46\x52\x4f\x4e\x54\137\117\106\x46\x49\x43\x45\x5f\x53\x53\x4f"));
$fA->fields_value["\x53\x41\x4d\x4c\x5f\105\116\101\x42\114\x45\x5f\106\122\117\116\x54\137\x4f\x46\x46\x49\x43\x45\x5f\101\x55\x54\117\x5f\x52\x45\104\111\122\x45\x43\x54\x5f\x46\122\x4f\x4d\x5f\x4c\x4f\x47\111\116"] = Tools::getValue("\123\101\x4d\114\137\x45\116\101\x42\114\105\x5f\x46\122\x4f\116\124\137\117\106\106\x49\103\105\137\101\x55\x54\x4f\x5f\x52\x45\x44\111\122\105\x43\x54\137\106\122\117\115\137\x4c\117\107\x49\116", Configuration::get("\x53\101\x4d\x4c\137\x45\116\101\102\x4c\x45\x5f\x46\122\x4f\116\124\137\117\x46\106\111\x43\x45\137\x41\x55\x54\117\137\122\x45\x44\x49\122\105\x43\x54\137\x46\122\117\x4d\137\x4c\x4f\x47\111\116"));
$fA->fields_value["\123\101\115\114\137\105\116\101\102\x4c\105\137\106\122\117\116\x54\x5f\x4f\x46\x46\x49\x43\x45\137\x41\x55\124\117\x5f\122\105\x44\111\x52\105\x43\x54"] = Tools::getValue("\123\101\115\x4c\x5f\105\116\x41\x42\114\x45\137\x46\122\x4f\116\x54\x5f\117\106\x46\x49\x43\105\x5f\101\125\x54\x4f\137\x52\x45\x44\111\x52\x45\x43\124", Configuration::get("\123\101\x4d\x4c\x5f\x45\x4e\101\x42\114\105\x5f\106\x52\x4f\116\124\137\x4f\x46\106\111\103\105\x5f\101\125\124\117\137\x52\x45\x44\111\122\105\103\x54"));
$fA->fields_value["\x53\x41\115\114\137\105\116\x41\x42\114\105\137\106\x52\x4f\116\x54\137\117\x46\x46\111\103\x45\x5f\122\x45\114\x41\131\137\x53\124\101\124\x45"] = Tools::getValue("\123\101\x4d\114\137\105\116\101\102\x4c\105\137\106\x52\117\x4e\124\x5f\117\106\x46\x49\x43\x45\x5f\x52\x45\114\101\131\x5f\x53\x54\x41\x54\105", Configuration::get("\x53\101\x4d\114\x5f\105\x4e\x41\x42\x4c\x45\137\106\122\117\116\x54\137\x4f\x46\106\x49\x43\105\137\x52\105\x4c\101\x59\137\x53\124\101\x54\x45"));
$fA->fields_value["\x53\x41\115\x4c\137\x46\122\117\116\x54\x5f\117\x46\106\111\103\105\137\x52\x45\x4c\x41\131\x5f\123\124\x41\124\x45\x5f\x55\122\114"] = Tools::getValue("\x53\x41\115\114\x5f\106\x52\x4f\x4e\x54\137\117\x46\x46\x49\103\x45\x5f\x52\105\114\101\131\137\123\x54\x41\x54\x45\x5f\x55\x52\114", Configuration::get("\123\x41\x4d\114\x5f\106\122\x4f\x4e\x54\137\117\x46\106\111\x43\x45\x5f\122\x45\114\101\131\x5f\x53\x54\101\x54\x45\137\125\122\x4c"));
$fA->fields_value["\123\x41\x4d\114\x5f\x45\x4e\101\x42\x4c\105\x5f\106\x52\x4f\116\124\x5f\117\x46\x46\111\x43\x45\137\102\x41\x43\x4b\104\117\x4f\x52"] = Tools::getValue("\x53\101\115\x4c\x5f\x45\116\101\102\x4c\105\137\x46\x52\117\x4e\124\x5f\117\106\x46\x49\x43\105\137\x42\101\103\113\104\x4f\x4f\x52", Configuration::get("\x53\101\x4d\x4c\x5f\x45\116\x41\x42\x4c\105\x5f\x46\122\x4f\x4e\x54\x5f\117\106\x46\111\x43\x45\x5f\102\x41\103\x4b\x44\117\117\122"));
$fA->fields_value["\x53\x41\x4d\x4c\x5f\x46\x52\x4f\x4e\x54\x5f\x4f\x46\x46\111\103\x45\x5f\102\x41\103\x4b\104\117\117\122\137\x55\x52\114"] = SPUrls::getFrontOfficeBackDoorURL();
$fA->fields_value["\x53\x41\x4d\x4c\x5f\x46\x52\x4f\116\124\137\117\106\x46\x49\103\x45\x5f\x4c\117\x47\x49\116\137\125\122\x4c"] = SPUrls::getAcsUrl() . "\x3f\157\160\x74\151\x6f\x6e\75\x73\141\155\154\x5f\x6c\x6f\147\x69\x6e";
$fA->fields_value["\123\x41\x4d\114\137\106\122\x4f\x4e\124\137\x4f\x46\106\x49\103\x45\137\114\117\107\x4f\125\x54\x5f\x55\122\114"] = SPUrls::getFrontOfficeLogoutURL();
return $fA->generateForm([$form]);
}
public function testConfig($Gy)
{
foreach ($Gy as $sZ => $P9) {
$iG = $P9[0];
$Gy[$sZ] = $iG;
C3:
}
by:
$this->context->smarty->assign(["\x70\x72\x6f\x66\x69\x6c\145" => $Gy]);
return $this->context->smarty->fetch($this->local_path . "\x76\151\145\167\x73\57\164\x65\x6d\x70\x6c\141\164\x65\x73\57\146\x72\157\x6e\164\57\164\x65\x73\164\143\x6f\x6e\x66\151\147\56\164\x70\x6c");
}
public function SAMLAccountVerification($lR)
{
$form = ["\146\x6f\x72\155" => ["\154\145\147\145\x6e\x64" => ["\164\151\x74\154\x65" => $this->l($lR::LOGIN_MINIORANGE_ACC)], "\151\x6e\160\165\164" => [["\x74\x79\160\x65" => "\x74\145\170\x74", "\x6c\141\x62\145\154" => $this->l($lR::EMAIL), "\x6e\x61\x6d\145" => "\x6d\x6f\x5f\x73\141\155\x6c\x5f\141\144\155\x69\156\x5f\x63\165\163\x74\157\155\x65\162\137\x65\155\141\151\x6c", "\x73\x69\172\145" => 20, "\162\145\161\165\151\162\x65\144" => true], ["\164\171\x70\x65" => "\x70\141\x73\x73\167\157\x72\x64", "\154\141\x62\x65\154" => $this->l($lR::PASSWORD), "\x6e\x61\155\145" => "\x53\101\x4d\114\137\103\x55\x53\124\117\x4d\105\x52\x5f\x50\x41\123\x53\127\x4f\122\104", "\163\151\172\145" => 20, "\x72\x65\x71\165\151\162\x65\144" => true]], "\x73\x75\x62\x6d\x69\x74" => ["\151\x64" => "\x73\x61\155\154\x5f\155\157\137\141\x63\143\x6f\x75\156\x74\x5f\x64\x65\x74\x61\x69\154\x73", "\x74\x69\x74\154\x65" => $this->l($lR::SAVE), "\143\154\x61\x73\x73" => "\x62\164\x6e\40\142\x74\156\x2d\x64\145\x66\141\165\x6c\x74\40\160\165\154\154\55\x72\x69\x67\150\x74"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\144\x6d\x69\156\115\157\144\x75\x6c\x65\163");
$fA->currentIndex = AdminController::$currentIndex . "\46" . http_build_query(["\x63\x6f\156\x66\151\147\x75\x72\x65" => $this->name]);
$fA->submit_action = "\x73\x61\155\154\137\x6d\x6f\x5f\x61\143\x63\157\165\x6e\x74\137\x64\x65\x74\141\x69\x6c\163" . $this->name;
$fA->default_form_language = (int) Configuration::get("\120\123\x5f\114\101\116\x47\x5f\x44\x45\106\x41\125\x4c\124");
$fA->fields_value["\155\x6f\137\163\x61\x6d\x6c\x5f\141\144\155\151\x6e\137\143\x75\163\x74\x6f\155\x65\x72\137\145\x6d\141\x69\154"] = '';
$fA->fields_value["\123\101\x4d\114\x5f\103\x55\x53\x54\x4f\115\x45\122\137\x50\101\123\x53\127\x4f\x52\x44"] = '';
return $fA->generateForm([$form]);
}
public function SAMLLicenseVerification($lR)
{
$form = ["\146\157\162\x6d" => ["\x6c\x65\x67\x65\x6e\144" => ["\164\x69\x74\154\145" => $this->l($lR::ENTER_LICENSE_KEY)], "\151\156\x70\165\164" => [["\164\x79\x70\x65" => "\x74\x65\x78\164", "\x6c\141\142\145\154" => $this->l($lR::LICENSE_KEY), "\156\141\x6d\145" => "\x53\x41\x4d\x4c\x5f\114\111\x43\x45\116\x53\105\x5f\x4b\x45\x59", "\163\x69\x7a\145" => 20, "\162\145\161\x75\x69\x72\x65\144" => true]], "\163\165\142\155\x69\x74" => ["\151\144" => "\x73\x61\155\x6c\137\155\157\x5f\154\x69\x63\x65\156\x73\145\137\x6b\145\x79", "\x74\x69\x74\x6c\145" => $this->l($lR::SAVE), "\143\x6c\x61\x73\163" => "\142\164\156\x20\142\164\x6e\x2d\x64\x65\x66\141\x75\154\x74\40\x70\165\154\x6c\x2d\162\x69\x67\150\164"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\101\x64\155\151\x6e\x4d\x6f\x64\x75\154\145\x73");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\x63\157\x6e\x66\151\147\x75\x72\145" => $this->name]);
$fA->submit_action = "\x73\141\x6d\x6c\137\155\157\137\154\151\143\x65\156\x73\145\137\153\x65\171" . $this->name;
$fA->default_form_language = (int) Configuration::get("\120\123\x5f\x4c\101\x4e\x47\x5f\x44\x45\106\101\x55\114\x54");
$fA->fields_value["\x53\101\115\x4c\137\x4c\111\103\105\116\x53\x45\x5f\x4b\105\x59"] = '';
return $fA->generateForm([$form]);
}
public function SAMLAccountDetails($lR)
{
$form = ["\146\x6f\162\155" => ["\154\145\x67\x65\156\144" => ["\x74\151\164\154\145" => $this->l($lR::ACCOUNT_INFO)], "\151\x6e\160\165\x74" => [["\x74\x79\x70\x65" => "\164\x65\x78\x74", "\x6c\x61\142\145\154" => $this->l($lR::MINIORANGE_EMAIL), "\x6e\141\x6d\x65" => "\x6d\157\137\x73\141\x6d\x6c\137\x61\144\x6d\151\x6e\x5f\x63\x75\x73\x74\x6f\155\145\x72\x5f\145\155\141\x69\154", "\163\x69\172\145" => 20, "\144\151\163\x61\x62\x6c\145\x64" => true]], "\142\x75\x74\164\x6f\156\x73" => [["\164\171\x70\145" => "\163\165\x62\x6d\151\x74", "\151\144" => "\165\x70\144\x61\164\145\x5f\x6c\151\143\x65\x6e\x73\x65", "\156\141\155\145" => "\x75\160\x64\x61\164\x65\x5f\x6c\151\143\145\x6e\163\x65", "\x69\x63\157\156" => "\x69\x63\157\x6e\x2d\146\x6f\x6f", "\x74\x69\x74\x6c\145" => $lR::UPDATE_LICENSE], ["\164\x79\x70\x65" => "\163\165\x62\155\x69\x74", "\x69\144" => "\x72\145\x6d\x6f\x76\145\137\x61\x63\143\x6f\x75\156\164", "\156\141\x6d\145" => "\162\x65\x6d\x6f\x76\145\137\141\143\143\157\x75\x6e\164", "\x69\143\157\156" => "\151\143\157\x6e\55\x66\157\x6f", "\x74\151\164\154\x65" => $lR::REMOVE_ACC]]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\101\x64\155\x69\156\x4d\157\x64\165\x6c\145\163");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\143\157\x6e\x66\x69\147\165\x72\x65" => $this->name]);
$fA->default_form_language = (int) Configuration::get("\120\123\137\x4c\101\116\x47\137\x44\105\x46\101\125\x4c\x54");
$fA->fields_value["\155\x6f\x5f\163\x61\x6d\154\137\141\x64\x6d\x69\x6e\x5f\x63\165\x73\x74\x6f\x6d\145\162\137\145\x6d\x61\151\154"] = Tools::getValue("\x6d\x6f\137\x73\x61\155\154\137\141\144\x6d\151\x6e\x5f\x63\x75\163\164\x6f\x6d\x65\162\x5f\x65\155\x61\x69\154", Configuration::get("\x6d\x6f\137\163\141\x6d\x6c\x5f\x61\144\x6d\x69\156\x5f\x63\x75\163\x74\x6f\x6d\145\x72\x5f\x65\x6d\x61\151\154"));
return $fA->generateForm([$form]);
}
public function SAMLSupport($lR)
{
$form = ["\146\x6f\x72\x6d" => ["\x6c\145\147\145\156\144" => ["\164\151\164\x6c\145" => $this->l($lR::MINIORANGE_SUPPORT)], "\151\x6e\160\x75\164" => [["\x74\x79\160\145" => "\x74\x65\170\164", "\x6c\141\x62\145\154" => $this->l($lR::YOUR_EMAIL), "\x6e\x61\x6d\145" => "\x43\125\123\x54\x4f\115\x45\x52\137\x45\x4d\x41\111\x4c", "\163\151\172\145" => 20, "\x72\145\161\x75\151\162\145\144" => true], ["\164\x79\x70\x65" => "\x74\145\x78\x74\141\x72\145\x61", "\x6c\x61\142\145\154" => $this->l($lR::QUERY), "\156\x61\x6d\x65" => "\103\x55\123\124\x4f\x4d\105\x52\137\x51\125\105\x52\131", "\x73\151\x7a\145" => 40, "\x72\145\161\165\151\x72\145\144" => true]], "\163\165\142\x6d\151\x74" => ["\x69\x64" => "\x73\x61\155\154\137\x73\x75\x70\x70\157\x72\x74\x5f\x73\x75\142\x6d\151\x74", "\164\x69\x74\x6c\145" => $this->l($lR::SEND), "\x69\x63\x6f\x6e" => "\151\x63\157\156\x2d\x66\157\157"]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\101\144\155\x69\x6e\115\157\144\x75\x6c\x65\x73");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\x63\157\156\x66\x69\147\x75\x72\x65" => $this->name]);
$fA->submit_action = "\163\x61\155\154\137\163\x75\160\160\157\x72\164\x5f\163\x75\x62\x6d\151\x74" . $this->name;
$fA->default_form_language = (int) Configuration::get("\120\123\137\x4c\101\116\x47\137\104\105\106\x41\x55\114\x54");
$fA->fields_value["\103\x55\123\x54\117\x4d\x45\122\137\105\x4d\x41\x49\114"] = '';
$fA->fields_value["\103\x55\x53\124\x4f\x4d\105\122\x5f\121\125\x45\x52\131"] = '';
return $fA->generateForm([$form]);
}
public function SAMLLicenseExpired($lR)
{
$form = ["\x66\x6f\162\x6d" => ["\x6c\x65\147\145\156\144" => ["\x74\x69\164\154\145" => $this->l($lR::MODULE_NOT_ACTIVE)]]];
$fA = new HelperForm();
$fA->table = $this->table;
$fA->name_controller = $this->name;
$fA->token = Tools::getAdminTokenLite("\x41\144\x6d\151\156\115\x6f\x64\x75\x6c\145\x73");
$fA->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\x63\x6f\x6e\x66\151\x67\165\x72\145" => $this->name]);
$fA->submit_action = "\x73\x75\160\x70\x6f\162\x74\x5f\163\x75\x62\x6d\x69\x74" . $this->name;
$fA->default_form_language = (int) Configuration::get("\120\x53\137\114\x41\116\107\137\104\105\106\x41\125\x4c\124");
$fA->fields_value["\x43\x55\x53\124\x4f\115\105\x52\137\x45\115\101\111\x4c"] = '';
$fA->fields_value["\x43\125\x53\x54\x4f\x4d\105\x52\x5f\x51\125\x45\122\131"] = '';
return $fA->generateForm([$form]);
}
}
Function Calls
None |
Stats
MD5 | a5662f308bf3011106529915d9280730 |
Eval Count | 0 |
Decode Time | 94 ms |