Skip to content

Commit 46a8117

Browse files
authored
Merge pull request #60783 from nextcloud/jtr/docs-PwConfirmationRequired
docs(appframework): clarify PasswordConfirmationRequired behavior in docblocks
2 parents 86c2b91 + 5d3c91a commit 46a8117

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

lib/public/AppFramework/Http/Attribute/PasswordConfirmationRequired.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,26 @@
1212
use Attribute;
1313

1414
/**
15-
* Attribute for controller methods that require the password to be confirmed with in the last 30 minutes
15+
* Attribute for controller methods that require password confirmation, if
16+
* supported by the active authentication backend.
17+
*
18+
* The exact enforcement behavior depends on the password confirmation
19+
* middleware.
20+
*
21+
* In non-strict mode, this normally relies on a recent prior confirmation,
22+
* currently defined by the middleware as within the last 30 minutes.
23+
*
24+
* In strict mode, confirmation is attempted as part of the current request.
25+
* Credentials must be provided via Basic HTTP authentication.
1626
*
1727
* @since 27.0.0
1828
*/
1929
#[Attribute]
2030
class PasswordConfirmationRequired {
2131
/**
22-
* @param bool $strict - Whether password confirmation needs to happen in the request.
32+
* @param bool $strict Whether password confirmation must happen as part of
33+
* the current request instead of relying on a recent
34+
* prior confirmation.
2335
*
2436
* @since 31.0.0
2537
*/
@@ -29,10 +41,11 @@ public function __construct(
2941
}
3042

3143
/**
44+
* Returns whether password confirmation must happen during the current request.
45+
*
3246
* @since 31.0.0
3347
*/
3448
public function getStrict(): bool {
3549
return $this->strict;
3650
}
37-
3851
}

0 commit comments

Comments
 (0)