diff --git a/docs/administration.md b/docs/administration.md index 52f5deca7a..7fc9b481ae 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -485,7 +485,7 @@ Follow these steps to create an App Registration in Microsoft Azure: 1. In the "Name" field, provide a name for your App Registration, e.g. "phpMyFAQ". 2. Choose the supported account types that your application will authenticate: "Accounts in this organizational directory only" -3. In the "Redirect URI" section, specify the redirect URI where Entra ID will send authentication responses: `http://www.example.com/faq/services/entra-id/callback.php` +3. In the "Redirect URI" section, specify the redirect URI where Entra ID will send authentication responses: `http://www.example.com/faq/services/azure/callback.php` 4. Click the "Register" button to create the App Registration. **Step 5: Configure Authentication** diff --git a/phpmyfaq/assets/templates/admin/login.twig b/phpmyfaq/assets/templates/admin/login.twig index 411754c4c2..0b9829e309 100644 --- a/phpmyfaq/assets/templates/admin/login.twig +++ b/phpmyfaq/assets/templates/admin/login.twig @@ -65,7 +65,7 @@ {% endif %} {% if hasSignInWithMicrosoftActive %} - + {{ msgSignInWithMicrosoft }} diff --git a/phpmyfaq/assets/templates/default/login.twig b/phpmyfaq/assets/templates/default/login.twig index 3f5f0eb104..dddb3fc874 100644 --- a/phpmyfaq/assets/templates/default/login.twig +++ b/phpmyfaq/assets/templates/default/login.twig @@ -68,7 +68,7 @@ {% endif %} {% if useSignInWithMicrosoft %} - + {{ 'msgSignInWithMicrosoft' | translate }} diff --git a/phpmyfaq/index.php b/phpmyfaq/index.php index e5158b8803..cfc54f8f26 100755 --- a/phpmyfaq/index.php +++ b/phpmyfaq/index.php @@ -232,7 +232,7 @@ } if ($faqConfig->isSignInWithMicrosoftActive() && $user->getUserAuthSource() === 'azure') { - $redirect = new RedirectResponse($faqConfig->getDefaultUrl() . 'services/entra-id/logout.php'); + $redirect = new RedirectResponse($faqConfig->getDefaultUrl() . 'services/azure/logout.php'); $redirect->send(); } @@ -279,11 +279,11 @@ if ($faqSession->getCurrentSessionId() > 0) { $faqSession->setCookie(UserSession::COOKIE_NAME_SESSION_ID, $faqSession->getCurrentSessionId()); if (is_null($sidCookie)) { - $sids = sprintf('sid=%d&lang=%s&', $faqSession->getCurrentSessionId(), $faqLangCode); + $sids = sprintf('sid=%d&lang=%s&', $faqSession->getCurrentSessionId(), $faqLangCode); } } elseif (is_null($sidGet) || is_null($sidCookie)) { if (is_null($sidCookie) && !is_null($sidGet)) { - $sids = sprintf('sid=%d&lang=%s&', $sidGet, $faqLangCode); + $sids = sprintf('sid=%d&lang=%s&', $sidGet, $faqLangCode); } } } else { diff --git a/phpmyfaq/src/phpMyFAQ/Auth/AuthEntraId.php b/phpmyfaq/src/phpMyFAQ/Auth/AuthEntraId.php index bac969cd66..30ffe4bc63 100644 --- a/phpmyfaq/src/phpMyFAQ/Auth/AuthEntraId.php +++ b/phpmyfaq/src/phpMyFAQ/Auth/AuthEntraId.php @@ -136,7 +136,7 @@ public function authorize(): void '?response_type=code&client_id=%s&redirect_uri=%s&scope=%s&code_challenge=%s&code_challenge_method=%s', AAD_OAUTH_TENANTID, AAD_OAUTH_CLIENTID, - urlencode($this->configuration->getDefaultUrl() . 'services/entra-id/callback.php'), + urlencode($this->configuration->getDefaultUrl() . 'services/azure/callback.php'), AAD_OAUTH_SCOPE, $this->oAuthChallenge, self::ENTRAID_CHALLENGE_METHOD diff --git a/phpmyfaq/src/phpMyFAQ/Auth/EntraId/OAuth.php b/phpmyfaq/src/phpMyFAQ/Auth/EntraId/OAuth.php index f67b851a67..e6a5412f17 100644 --- a/phpmyfaq/src/phpMyFAQ/Auth/EntraId/OAuth.php +++ b/phpmyfaq/src/phpMyFAQ/Auth/EntraId/OAuth.php @@ -75,7 +75,7 @@ public function getOAuthToken(string $code): stdClass 'body' => [ 'grant_type' => 'authorization_code', 'client_id' => AAD_OAUTH_CLIENTID, - 'redirect_uri' => $this->configuration->getDefaultUrl() . 'services/entra-id/callback.php', + 'redirect_uri' => $this->configuration->getDefaultUrl() . 'services/azure/callback.php', 'code' => $code, 'code_verifier' => $codeVerifier, 'client_secret' => AAD_OAUTH_SECRET