From fa042fc223ba6e01e5128255434dc9d1d2394be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Ko=C5=82buc?= Date: Mon, 26 Oct 2020 11:03:14 +0100 Subject: [PATCH 1/3] Update php and typo3 requirements --- composer.json | 4 ++-- ext_emconf.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index f1cf629..c9c9c0a 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,8 @@ ], "license": "GPL-2.0-or-later", "require": { - "php": ">= 7.0.0, <= 7.3.99", - "typo3/cms-core": "^8.7 || ^9.5", + "php": ">= 7.0.0, <= 7.4.99", + "typo3/cms-core": "^9.5 || ^10.0", "league/oauth2-client": "^2.0" }, "autoload": { diff --git a/ext_emconf.php b/ext_emconf.php index 5970a2d..edcf084 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -21,8 +21,8 @@ 'version' => '0.5.0', 'constraints' => [ 'depends' => [ - 'php' => '7.0.0-7.3.99', - 'typo3' => '8.7.0-9.5.99', + 'php' => '7.0.0-7.4.99', + 'typo3' => '9.5.0-10.4.99', ], 'conflicts' => [], 'suggests' => [], From bf103bcf8551fc532454d5486bc9cb297dc6ce10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Ko=C5=82buc?= Date: Tue, 27 Oct 2020 08:42:59 +0100 Subject: [PATCH 2/3] Apply required changes in AuthenticationService --- Classes/Service/AuthenticationService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Classes/Service/AuthenticationService.php b/Classes/Service/AuthenticationService.php index 8f77f45..0096b1d 100644 --- a/Classes/Service/AuthenticationService.php +++ b/Classes/Service/AuthenticationService.php @@ -28,7 +28,7 @@ /** * OpenID Connect authentication service. */ -class AuthenticationService extends \TYPO3\CMS\Sv\AuthenticationService +class AuthenticationService extends \TYPO3\CMS\Core\Authentication\AuthenticationService { /** @@ -648,7 +648,6 @@ protected function getTypoScriptSetup() /** @var \TYPO3\CMS\Frontend\Page\PageRepository $pageRepository */ $pageRepository = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\PageRepository::class); - $pageRepository->init(false); /** @var \TYPO3\CMS\Core\TypoScript\TemplateService $templateService */ $templateService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\TemplateService::class); From da5af0e01e2e71126cab60ce96d363ce7a1c92c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Ko=C5=82buc?= Date: Wed, 23 Dec 2020 14:18:28 +0100 Subject: [PATCH 3/3] [WIP] redirect uri config --- Classes/Service/OAuthService.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Classes/Service/OAuthService.php b/Classes/Service/OAuthService.php index e00f6d1..96c910b 100644 --- a/Classes/Service/OAuthService.php +++ b/Classes/Service/OAuthService.php @@ -56,7 +56,7 @@ public function setSettings(array $settings) */ public function getAuthorizationUrl(array $options = []) { - if (! empty($this->settings['oidcAuthorizeLanguageParameter'])) { + if (!empty($this->settings['oidcAuthorizeLanguageParameter'])) { $languageOption = $this->settings['oidcAuthorizeLanguageParameter']; if (isset($GLOBALS['TSFE']->lang)) { @@ -119,12 +119,12 @@ public function getAccessToken($codeOrUsername, $password = null) public function getAccessTokenWithRequestPathAuthentication($username, $password) { $redirectUri = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . '/typo3conf/ext/oidc/Resources/Public/callback.php'; - $url = $this->settings['oidcEndpointAuthorize'] . '?'. http_build_query([ - 'response_type' => 'code', - 'client_id' => $this->settings['oidcClientKey'], - 'scope' => $this->settings['oidcClientScopes'], - 'redirect_uri' => $redirectUri, - ]); + $url = $this->settings['oidcEndpointAuthorize'] . '?' . http_build_query([ + 'response_type' => 'code', + 'client_id' => $this->settings['oidcClientKey'], + 'scope' => $this->settings['oidcClientScopes'], + 'redirect_uri' => $redirectUri, + ]); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, [