aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/ClientFlowLoginV2Controller.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-01-25 19:26:21 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-01-27 09:40:35 +0100
commit20e00cdf17f45f811135fe5fb61c133ce9021144 (patch)
treeb9bb2d0c10ede9f4532bddeebcbdb3c1d5febc98 /core/Controller/ClientFlowLoginV2Controller.php
parentbe1de30a4f6b37da7c710ac55489e4938c4ded91 (diff)
downloadnextcloud-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/ClientFlowLoginV2Controller.php')
-rw-r--r--core/Controller/ClientFlowLoginV2Controller.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index 4df94a28d6a..d476b0cdc03 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -33,6 +33,7 @@ use OC\Core\Exception\LoginFlowV2NotFoundException;
use OC\Core\Service\LoginFlowV2Service;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\UseSession;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\RedirectResponse;
use OCP\AppFramework\Http\Response;
@@ -97,8 +98,8 @@ class ClientFlowLoginV2Controller extends Controller {
/**
* @NoCSRFRequired
* @PublicPage
- * @UseSession
*/
+ #[UseSession]
public function landing(string $token, $user = ''): Response {
if (!$this->loginFlowV2Service->startLoginFlow($token)) {
return $this->loginTokenForbiddenResponse();
@@ -114,8 +115,8 @@ class ClientFlowLoginV2Controller extends Controller {
/**
* @NoCSRFRequired
* @PublicPage
- * @UseSession
*/
+ #[UseSession]
public function showAuthPickerPage($user = ''): StandaloneTemplateResponse {
try {
$flow = $this->getFlowByLoginToken();
@@ -145,10 +146,10 @@ class ClientFlowLoginV2Controller extends Controller {
/**
* @NoAdminRequired
- * @UseSession
* @NoCSRFRequired
* @NoSameSiteCookieRequired
*/
+ #[UseSession]
public function grantPage(string $stateToken): StandaloneTemplateResponse {
if (!$this->isValidStateToken($stateToken)) {
return $this->stateTokenForbiddenResponse();
@@ -222,8 +223,8 @@ class ClientFlowLoginV2Controller extends Controller {
/**
* @NoAdminRequired
- * @UseSession
*/
+ #[UseSession]
public function generateAppPassword(string $stateToken): Response {
if (!$this->isValidStateToken($stateToken)) {
return $this->stateTokenForbiddenResponse();