aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/CSRFTokenController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller/CSRFTokenController.php')
-rw-r--r--core/Controller/CSRFTokenController.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/Controller/CSRFTokenController.php b/core/Controller/CSRFTokenController.php
index 9a87fe51c47..c4e7b81279f 100644
--- a/core/Controller/CSRFTokenController.php
+++ b/core/Controller/CSRFTokenController.php
@@ -12,11 +12,9 @@ use OC\Security\CSRF\CsrfTokenManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
-use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
-#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
class CSRFTokenController extends Controller {
public function __construct(
string $appName,
@@ -27,9 +25,16 @@ class CSRFTokenController extends Controller {
}
/**
+ * Returns a new CSRF token.
+ *
* @NoAdminRequired
* @NoCSRFRequired
* @PublicPage
+ *
+ * @return JSONResponse<Http::STATUS_OK, array{token: string}, array{}>|JSONResponse<Http::STATUS_FORBIDDEN, array<empty>, array{}>
+ *
+ * 200: CSRF token returned
+ * 403: Strict cookie check failed
*/
#[FrontpageRoute(verb: 'GET', url: '/csrftoken')]
public function index(): JSONResponse {