PasswordConfirmationRequired.php 694 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\AppFramework\Http\Attribute;
  8. use Attribute;
  9. /**
  10. * Attribute for controller methods that require the password to be confirmed with in the last 30 minutes
  11. *
  12. * @since 27.0.0
  13. */
  14. #[Attribute]
  15. class PasswordConfirmationRequired {
  16. /**
  17. * @param bool $strict - Whether password confirmation needs to happen in the request.
  18. *
  19. * @since 31.0.0
  20. */
  21. public function __construct(
  22. protected bool $strict = false,
  23. ) {
  24. }
  25. /**
  26. * @since 31.0.0
  27. */
  28. public function getStrict(): bool {
  29. return $this->strict;
  30. }
  31. }