2023-04-24 11:13:18 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-04-24 11:13:18 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace OCP\AppFramework\Http\Attribute;
|
|
|
|
|
|
|
|
|
|
use Attribute;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Attribute for controller methods that require the password to be confirmed with in the last 30 minutes
|
|
|
|
|
*
|
|
|
|
|
* @since 27.0.0
|
|
|
|
|
*/
|
|
|
|
|
#[Attribute]
|
|
|
|
|
class PasswordConfirmationRequired {
|
2024-11-27 11:01:25 -05:00
|
|
|
/**
|
|
|
|
|
* @param bool $strict - Whether password confirmation needs to happen in the request.
|
|
|
|
|
*
|
|
|
|
|
* @since 31.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
|
|
|
|
protected bool $strict = false,
|
|
|
|
|
) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 31.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getStrict(): bool {
|
|
|
|
|
return $this->strict;
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-24 11:13:18 -04:00
|
|
|
}
|