From efd3d7c6cf30476f2bddd36f367b69b41083f47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Fri, 12 Dec 2025 16:03:21 +0100 Subject: [PATCH] feat: integrate with oauth2 login via myep --- composer.json | 1 + composer.lock | 185 +++++++++++++----- config/sites/ep-reisen/config.yaml | 3 + .../TypoScript/Extensions/OAuth2.typoscript | 1 + .../TypoScript/constants.typoscript | 1 + 5 files changed, 142 insertions(+), 49 deletions(-) create mode 100644 public/typo3conf/ext/ep_theme/Configuration/TypoScript/Extensions/OAuth2.typoscript diff --git a/composer.json b/composer.json index caa73eca..5e3a16f6 100644 --- a/composer.json +++ b/composer.json @@ -63,6 +63,7 @@ "typo3/cms-t3editor": "^10.4", "typo3/cms-tstemplate": "^10.4", "typo3/cms-viewpage": "^10.4", + "waldhacker/typo3-oauth2-client": "^2.1", "wazum/pagetree-resizable": "^1.2", "yoast-seo-for-typo3/yoast_seo": "^7.2", "yohang/calendr": "^2.1" diff --git a/composer.lock b/composer.lock index 3b76e225..1e7e2f84 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "621e163177df6e19408e66534c7d924d", + "content-hash": "54089e7f1000272b33a6d8fe38693ac7", "packages": [ { "name": "b13/container", @@ -259,6 +259,7 @@ "issues": "https://github.com/doctrine/annotations/issues", "source": "https://github.com/doctrine/annotations/tree/1.14.4" }, + "abandoned": true, "time": "2024-09-05T10:15:52+00:00" }, { @@ -352,6 +353,7 @@ "type": "tidelift" } ], + "abandoned": true, "time": "2022-05-20T20:07:39+00:00" }, { @@ -1749,22 +1751,22 @@ }, { "name": "league/oauth2-client", - "version": "2.8.1", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-client.git", - "reference": "9df2924ca644736c835fc60466a3a60390d334f9" + "reference": "26e8c5da4f3d78cede7021e09b1330a0fc093d5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/9df2924ca644736c835fc60466a3a60390d334f9", - "reference": "9df2924ca644736c835fc60466a3a60390d334f9", + "url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/26e8c5da4f3d78cede7021e09b1330a0fc093d5e", + "reference": "26e8c5da4f3d78cede7021e09b1330a0fc093d5e", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", - "php": "^7.1 || >=8.0.0 <8.5.0" + "php": "^7.1 || >=8.0.0 <8.6.0" }, "require-dev": { "mockery/mockery": "^1.3.5", @@ -1808,9 +1810,9 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth2-client/issues", - "source": "https://github.com/thephpleague/oauth2-client/tree/2.8.1" + "source": "https://github.com/thephpleague/oauth2-client/tree/2.9.0" }, - "time": "2025-02-26T04:37:30+00:00" + "time": "2025-11-25T22:17:17+00:00" }, { "name": "league/period", @@ -2120,16 +2122,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.19.4", + "version": "v4.19.5", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2" + "reference": "51bd93cc741b7fc3d63d20b6bdcd99fdaa359837" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/715f4d25e225bc47b293a8b997fe6ce99bf987d2", - "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/51bd93cc741b7fc3d63d20b6bdcd99fdaa359837", + "reference": "51bd93cc741b7fc3d63d20b6bdcd99fdaa359837", "shasum": "" }, "require": { @@ -2144,11 +2146,6 @@ "bin/php-parse" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, "autoload": { "psr-4": { "PhpParser\\": "lib/PhpParser" @@ -2170,9 +2167,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.5" }, - "time": "2024-09-29T15:01:53+00:00" + "time": "2025-12-06T11:45:25+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -2229,16 +2226,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.3", + "version": "5.6.5", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94f8051919d1b0369a6bcc7931d679a511c03fe9" + "reference": "90614c73d3800e187615e2dd236ad0e2a01bf761" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94f8051919d1b0369a6bcc7931d679a511c03fe9", - "reference": "94f8051919d1b0369a6bcc7931d679a511c03fe9", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/90614c73d3800e187615e2dd236ad0e2a01bf761", + "reference": "90614c73d3800e187615e2dd236ad0e2a01bf761", "shasum": "" }, "require": { @@ -2287,22 +2284,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.3" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.5" }, - "time": "2025-08-01T19:43:32+00:00" + "time": "2025-11-27T19:50:05+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.10.0", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" + "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", - "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195", + "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195", "shasum": "" }, "require": { @@ -2345,9 +2342,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.12.0" }, - "time": "2024-11-09T15:12:26+00:00" + "time": "2025-11-21T15:09:14+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -4180,16 +4177,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.48", + "version": "v5.4.50", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3f38b8af283b830e1363acd79e5bc3412d055341" + "reference": "1a0706e8b8041046052ea2695eb8aeee04f97609" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3f38b8af283b830e1363acd79e5bc3412d055341", - "reference": "3f38b8af283b830e1363acd79e5bc3412d055341", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1a0706e8b8041046052ea2695eb8aeee04f97609", + "reference": "1a0706e8b8041046052ea2695eb8aeee04f97609", "shasum": "" }, "require": { @@ -4236,7 +4233,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.48" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.50" }, "funding": [ { @@ -4247,12 +4244,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-11-13T18:58:02+00:00" + "time": "2025-11-03T12:58:48+00:00" }, { "name": "symfony/inflector", @@ -8452,6 +8453,92 @@ }, "time": "2023-03-23T12:04:09+00:00" }, + { + "name": "waldhacker/typo3-oauth2-client", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/waldhacker/ext-oauth2-client.git", + "reference": "dfc581f39e64bd11fd821e1b35202fa8d2f2508b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/waldhacker/ext-oauth2-client/zipball/dfc581f39e64bd11fd821e1b35202fa8d2f2508b", + "reference": "dfc581f39e64bd11fd821e1b35202fa8d2f2508b", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "league/oauth2-client": "^2.6.0", + "psr/log": "*", + "typo3/cms-backend": "^10.4@dev || ^11.5@dev", + "typo3/cms-core": "^10.4@dev || ^11.5@dev", + "typo3/cms-fluid": "^10.4@dev || ^11.5@dev", + "typo3/cms-setup": "^10.4@dev || ^11.5@dev" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.23", + "friendsofphp/php-cs-fixer": "^3.0", + "overtrue/phplint": "^2.0", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.50", + "roave/security-advisories": "dev-latest", + "saschaegerer/phpstan-typo3": "@dev", + "symfony/yaml": "^5.1", + "typo3/cms-extensionmanager": "^10.4@dev || ^11.5@dev", + "typo3/cms-felogin": "^10.4@dev || ^11.5@dev", + "typo3/cms-fluid-styled-content": "^10.4@dev || ^11.5@dev", + "typo3/cms-frontend": "^10.4@dev || ^11.5@dev", + "typo3/cms-install": "^10.4@dev || ^11.5@dev", + "typo3/cms-recordlist": "^10.4@dev || ^11.5@dev", + "typo3/coding-standards": "^0.4.0", + "typo3/json-response": "*@dev", + "typo3/testing-framework": "^6.15", + "vimeo/psalm": "^3.0 || ^4.0", + "waldhacker/typo3-oauth2-client-test": "*@dev" + }, + "suggest": { + "league/oauth2-github": "Github Authentication" + }, + "type": "typo3-cms-extension", + "extra": { + "composer-normalize": { + "indent-size": 4, + "indent-style": "space" + }, + "typo3/cms": { + "cms-package-dir": "{$vendor-dir}/typo3/cms", + "extension-key": "oauth2_client", + "web-dir": ".build/web" + } + }, + "autoload": { + "psr-4": { + "Waldhacker\\Oauth2Client\\": "Classes/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "waldhacker", + "email": "hello@waldhacker.dev", + "homepage": "https://waldhacker.dev", + "role": "Developer" + } + ], + "description": "TYPO3 OAuth2 Login Client (backend and frontend)", + "homepage": "https://github.com/waldhacker/ext-oauth2-client", + "support": { + "issues": "https://github.com/waldhacker/ext-oauth2-client/issues", + "source": "https://github.com/waldhacker/ext-oauth2-client/tree/2.1.1" + }, + "abandoned": "co-stack/typo3-oauth2-client", + "time": "2023-08-16T07:55:12+00:00" + }, { "name": "wazum/pagetree-resizable", "version": "1.3.1", @@ -8495,28 +8582,28 @@ }, { "name": "webmozart/assert", - "version": "1.11.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", "shasum": "" }, "require": { "ext-ctype": "*", + "ext-date": "*", + "ext-filter": "*", "php": "^7.2 || ^8.0" }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" + "suggest": { + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" }, "type": "library", "extra": { @@ -8547,9 +8634,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" + "source": "https://github.com/webmozarts/assert/tree/1.12.1" }, - "time": "2022-06-03T18:03:27+00:00" + "time": "2025-10-29T15:56:20+00:00" }, { "name": "yoast-seo-for-typo3/yoast_seo", diff --git a/config/sites/ep-reisen/config.yaml b/config/sites/ep-reisen/config.yaml index d4dae274..56546efc 100644 --- a/config/sites/ep-reisen/config.yaml +++ b/config/sites/ep-reisen/config.yaml @@ -7,6 +7,7 @@ baseVariants: base: 'https://staging.ep-reisen.de' condition: 'applicationContext == "Production/Staging"' disableStaticFileCache: false +enabled_oauth2_providers: '' errorHandling: - errorCode: 404 @@ -39,6 +40,8 @@ languages: fallbackType: strict fallbacks: '' flag: gb +oauth2_callback_slug: '' +oauth2_storage_pid: '' rootPageId: 9 routeEnhancers: NewsDetailPlugin: diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Extensions/OAuth2.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Extensions/OAuth2.typoscript new file mode 100644 index 00000000..86a2f386 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Extensions/OAuth2.typoscript @@ -0,0 +1 @@ +@import 'EXT:oauth2_client/Configuration/TypoScript/setup.typoscript' diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript index 1ecec3a7..a02797c2 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript @@ -198,3 +198,4 @@ plugin.tx_eptheme { @import 'EXT:typo3_encore/Configuration/TypoScript/constants.typoscript' @import 'EXT:news/Configuration/TypoScript/constants.txt' @import 'EXT:bw_captcha/Configuration/TypoScript/constants.typoscript' +@import 'EXT:oauth2_client/Configuration/TypoScript/constants.typoscript'