Explorar o código

#3753 Azure AD B2C Connect

Alex Trofimov %!s(int64=4) %!d(string=hai) anos
pai
achega
7de82bbfa4

+ 3 - 3
modules/boonex/azure_b2c_con/classes/BxAzrB2CModule.php

@@ -61,7 +61,7 @@ class BxAzrB2CModule extends BxBaseModConnectModule
 
             $sBaseUrl = "https://" . $this->_oConfig->sDomain . "/" . $this->_oConfig->sTenant . "/" . $this->_oConfig->sPolicy;//B2C_1_login_una";
             $sUrl = bx_append_url_params($sBaseUrl . "/oauth2/v2.0/authorize", [
-                'state' => $this->_genToken(), // This at least semi-random string is likely good enough as state identifier
+                // 'state' => $this->_genToken(), // This at least semi-random string is likely good enough as state identifier
                 'scope' => $this->_oConfig->sScope, 
                 'response_type' => 'code',
                 'response_mode' => 'query',
@@ -79,13 +79,13 @@ class BxAzrB2CModule extends BxBaseModConnectModule
     function actionHandle()
     {
         require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
-
+/*
         // check CSRF token
         if ($this->_getToken() != bx_get('state')) {
             $this->_oTemplate->getPage(_t('_Error'), MsgBox(_t('_sys_connect_state_invalid')));
             return;
         }
-
+*/
         // check code
         $sCode = bx_get('code');
         if (!$sCode || bx_get('error')) {

+ 3 - 3
modules/boonex/azure_b2c_con/install/langs/en.xml

@@ -17,9 +17,9 @@
         
         </p>]]></string>
 	<string name="_bx_azrb2c_profile_error_api_keys"><![CDATA[Please configure the module in admin panel (can't define Client ID & Secret)]]></string>
-	<string name="_bx_azrb2c_auth_title"><![CDATA[Login with Azure AD]]></string>
+	<string name="_bx_azrb2c_auth_title"><![CDATA[Login with Azure AD B2C]]></string>
 
-    <string name="_bx_azrb2c_adm_stg_cpt_type"><![CDATA[Azure AD Connect]]></string>
+    <string name="_bx_azrb2c_adm_stg_cpt_type"><![CDATA[Azure AD B2C Connect]]></string>
     <string name="_bx_azrb2c_option_domain"><![CDATA[Domain]]></string>
     <string name="_bx_azrb2c_option_tenant"><![CDATA[Tenant Name]]></string>
     <string name="_bx_azrb2c_option_policy"><![CDATA[Policy (User Flow)]]></string>
@@ -27,7 +27,7 @@
     <string name="_bx_azrb2c_option_client_id"><![CDATA[Application (Client) ID]]></string>
     <string name="_bx_azrb2c_option_secret"><![CDATA[Client Secret Value]]></string>
 
-	<string name="_bx_azrb2c_et_password_generated"><![CDATA[Azure AD connect temporary password]]></string>
+	<string name="_bx_azrb2c_et_password_generated"><![CDATA[Azure AD B2C connect temporary password]]></string>
 	<string name="_bx_azrb2c_et_password_generated_subject"><![CDATA[Temporary password]]></string>
 	<string name="_bx_azrb2c_et_password_generated_body"><![CDATA[{email_header}
 <p>Temporary password - <b>{password}</b></p>