diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2023-08-15 18:58:52 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2024-08-14 15:41:27 +0200 |
commit | 6e176840c882cfe11152de6350788d74374a54ae (patch) | |
tree | 36c324e1d646051ba36988094fdeb28371e39f1d /lib/public/Security/CSRF | |
parent | 0f10cabf2a7ff6652f7b29e81f3682fac941e647 (diff) | |
download | nextcloud-server-dept-remove-csrf-dependency-from-request.tar.gz nextcloud-server-dept-remove-csrf-dependency-from-request.zip |
feat: move csrf validation out of requestdept-remove-csrf-dependency-from-request
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/public/Security/CSRF')
-rw-r--r-- | lib/public/Security/CSRF/ICsrfValidator.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/public/Security/CSRF/ICsrfValidator.php b/lib/public/Security/CSRF/ICsrfValidator.php new file mode 100644 index 00000000000..2c64c825f04 --- /dev/null +++ b/lib/public/Security/CSRF/ICsrfValidator.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace OCP\Security\CSRF; + +use OCP\IRequest; + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +/** + * @since 31.0.0 + */ +interface ICsrfValidator { + /** + * Check if a request uses a valid csrf token. + * + * @since 31.0.0 + */ + public function validate(IRequest $request): bool; +} |