aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework/Http/Attribute/PasswordConfirmationRequired.php
blob: c41e5aa244515c957e835308d23265818c2afdb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

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 {
	/**
	 * @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;
	}

}