Browse Source

restore login to current org and logout

Olivier Massot 4 years ago
parent
commit
32ab334fe3

+ 2 - 2
ot_connect/Classes/Service/OtAuthenticationService.php

@@ -23,7 +23,7 @@ class OtAuthenticationService extends AbstractAuthenticationService
     CONST LOGIN_URI = 'api/login_check';
     CONST LOGIN_URI = 'api/login_check';
     CONST GET_USER_DATA_URI = 'api/user/datafortypo3';
     CONST GET_USER_DATA_URI = 'api/user/datafortypo3';
     CONST ISAUTH_URI = 'api/user/isauthenticated';
     CONST ISAUTH_URI = 'api/user/isauthenticated';
-    CONST LOGOUT_URI = 'api/logout';
+    CONST LOGOUT_URI = 'logout';
     CONST GROUP_FE_ALL_UID = 18076;
     CONST GROUP_FE_ALL_UID = 18076;
 
 
     // Cookies' domain needs to be the same that the api's cookies, or guzzle will ignore them.
     // Cookies' domain needs to be the same that the api's cookies, or guzzle will ignore them.
@@ -189,7 +189,7 @@ class OtAuthenticationService extends AbstractAuthenticationService
      * Update the guzzle cookie jar with the current session's ones
      * Update the guzzle cookie jar with the current session's ones
      */
      */
     private function fillCookieJar() {
     private function fillCookieJar() {
-        foreach (['BEARER', 'SFSESSID'] as $cookieName) {
+        foreach (['BEARER', 'SFSESSID', 'AccessId'] as $cookieName) {
             if (array_key_exists($cookieName, $_COOKIE)) {
             if (array_key_exists($cookieName, $_COOKIE)) {
                 $cookie = new SetCookie();
                 $cookie = new SetCookie();
                 $cookie->setName($cookieName);
                 $cookie->setName($cookieName);

+ 1 - 1
ot_templating/Configuration/TypoScript/constants.txt

@@ -15,7 +15,7 @@ plugin.tx_ottemplating {
             logoPath = EXT:ot_templating/Resources/Public/media/logo-opentalent.png
             logoPath = EXT:ot_templating/Resources/Public/media/logo-opentalent.png
             fileStorageUrl = https://api.opentalent.fr/app.php/_internal/secure/files/
             fileStorageUrl = https://api.opentalent.fr/app.php/_internal/secure/files/
             dashboardUrl = https://admin.opentalent.fr/#/dashboard
             dashboardUrl = https://admin.opentalent.fr/#/dashboard
-            loginPageUrl = https://admin.opentalent.fr/#/login/
+            loginPageUrl = https://admin.opentalent.fr/#/login
             logoutUrl = .
             logoutUrl = .
         }
         }
 
 

+ 1 - 1
ot_templating/Configuration/TypoScript/setup.txt

@@ -80,7 +80,7 @@ plugin.tx_ottemplating {
         opentalentLogoPath = {$plugin.tx_ottemplating.settings.opentalent.logoPath}
         opentalentLogoPath = {$plugin.tx_ottemplating.settings.opentalent.logoPath}
         opentalentFileStorageUrl = {$plugin.tx_ottemplating.settings.opentalent.fileStorageUrl}
         opentalentFileStorageUrl = {$plugin.tx_ottemplating.settings.opentalent.fileStorageUrl}
         opentalentDashboardUrl = {$plugin.tx_ottemplating.settings.opentalent.dashboardUrl}
         opentalentDashboardUrl = {$plugin.tx_ottemplating.settings.opentalent.dashboardUrl}
-        opentalentLoginPageUrl = {$plugin.tx_ottemplating.settings.opentalent.loginPageUrl}
+        opentalentLoginPageUrl = {$plugin.tx_ottemplating.settings.opentalent.loginPageUrl}/{$plugin.tx_ottemplating.settings.organization.id}
         opentalentLogoutUrl = {$plugin.tx_ottemplating.settings.opentalent.logoutUrl}
         opentalentLogoutUrl = {$plugin.tx_ottemplating.settings.opentalent.logoutUrl}
         structureId = {$plugin.tx_ottemplating.settings.organization.id}
         structureId = {$plugin.tx_ottemplating.settings.organization.id}
         structureLogoId = {$plugin.tx_ottemplating.settings.organization.logoid}
         structureLogoId = {$plugin.tx_ottemplating.settings.organization.logoid}