diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-01-25 19:26:21 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-01-27 09:40:35 +0100 |
commit | 20e00cdf17f45f811135fe5fb61c133ce9021144 (patch) | |
tree | b9bb2d0c10ede9f4532bddeebcbdb3c1d5febc98 /core/Controller/ClientFlowLoginController.php | |
parent | be1de30a4f6b37da7c710ac55489e4938c4ded91 (diff) | |
download | nextcloud-server-20e00cdf17f45f811135fe5fb61c133ce9021144.tar.gz nextcloud-server-20e00cdf17f45f811135fe5fb61c133ce9021144.zip |
feat(app-framework): Add UseSession attribute to replace annotation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/Controller/ClientFlowLoginController.php')
-rw-r--r-- | core/Controller/ClientFlowLoginController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php index 4c262714fe6..85a793bd92b 100644 --- a/core/Controller/ClientFlowLoginController.php +++ b/core/Controller/ClientFlowLoginController.php @@ -41,6 +41,7 @@ use OCA\OAuth2\Db\AccessTokenMapper; use OCA\OAuth2\Db\ClientMapper; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\UseSession; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\StandaloneTemplateResponse; use OCP\Defaults; @@ -126,8 +127,8 @@ class ClientFlowLoginController extends Controller { /** * @PublicPage * @NoCSRFRequired - * @UseSession */ + #[UseSession] public function showAuthPickerPage(string $clientIdentifier = '', string $user = '', int $direct = 0): StandaloneTemplateResponse { $clientName = $this->getClientName(); $client = null; @@ -193,8 +194,8 @@ class ClientFlowLoginController extends Controller { * @NoAdminRequired * @NoCSRFRequired * @NoSameSiteCookieRequired - * @UseSession */ + #[UseSession] public function grantPage(string $stateToken = '', string $clientIdentifier = '', int $direct = 0): StandaloneTemplateResponse { @@ -243,10 +244,10 @@ class ClientFlowLoginController extends Controller { /** * @NoAdminRequired - * @UseSession * * @return Http\RedirectResponse|Response */ + #[UseSession] public function generateAppPassword(string $stateToken, string $clientIdentifier = '') { if (!$this->isValidToken($stateToken)) { |