Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,26 @@
use Attribute;

/**
* Attribute for controller methods that require the password to be confirmed with in the last 30 minutes
* Attribute for controller methods that require password confirmation, if
* supported by the active authentication backend.
*
* The exact enforcement behavior depends on the password confirmation
* middleware.
*
* In non-strict mode, this normally relies on a recent prior confirmation,
* currently defined by the middleware as within the last 30 minutes.
*
* In strict mode, confirmation is attempted as part of the current request.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should mention that the credentials need to be sent via basic auth.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* Credentials must be provided via Basic HTTP authentication.
*
* @since 27.0.0
*/
#[Attribute]
class PasswordConfirmationRequired {
/**
* @param bool $strict - Whether password confirmation needs to happen in the request.
* @param bool $strict Whether password confirmation must happen as part of
* the current request instead of relying on a recent
* prior confirmation.
*
* @since 31.0.0
*/
Expand All @@ -29,10 +41,11 @@ public function __construct(
}

/**
* Returns whether password confirmation must happen during the current request.
*
* @since 31.0.0
*/
public function getStrict(): bool {
return $this->strict;
}

}
Loading