aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/Controller/WebAuthnController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/lib/Controller/WebAuthnController.php')
-rw-r--r--apps/settings/lib/Controller/WebAuthnController.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/settings/lib/Controller/WebAuthnController.php b/apps/settings/lib/Controller/WebAuthnController.php
index 56bc0aa4a05..495b58e6a4b 100644
--- a/apps/settings/lib/Controller/WebAuthnController.php
+++ b/apps/settings/lib/Controller/WebAuthnController.php
@@ -12,7 +12,11 @@ use OC\Authentication\WebAuthn\Manager;
use OCA\Settings\AppInfo\Application;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\NoAdminRequired;
+use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\OpenAPI;
+use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
+use OCP\AppFramework\Http\Attribute\UseSession;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\ISession;
@@ -35,12 +39,12 @@ class WebAuthnController extends Controller {
}
/**
- * @NoAdminRequired
* @NoSubAdminRequired
- * @PasswordConfirmationRequired
- * @UseSession
- * @NoCSRFRequired
*/
+ #[NoAdminRequired]
+ #[PasswordConfirmationRequired]
+ #[UseSession]
+ #[NoCSRFRequired]
public function startRegistration(): JSONResponse {
$this->logger->debug('Starting WebAuthn registration');
@@ -53,11 +57,11 @@ class WebAuthnController extends Controller {
}
/**
- * @NoAdminRequired
* @NoSubAdminRequired
- * @PasswordConfirmationRequired
- * @UseSession
*/
+ #[NoAdminRequired]
+ #[PasswordConfirmationRequired]
+ #[UseSession]
public function finishRegistration(string $name, string $data): JSONResponse {
$this->logger->debug('Finishing WebAuthn registration');
@@ -75,10 +79,10 @@ class WebAuthnController extends Controller {
}
/**
- * @NoAdminRequired
* @NoSubAdminRequired
- * @PasswordConfirmationRequired
*/
+ #[NoAdminRequired]
+ #[PasswordConfirmationRequired]
public function deleteRegistration(int $id): JSONResponse {
$this->logger->debug('Finishing WebAuthn registration');