- Added support for Craft CMS 5.0.0-beta.2 or newer.
Warning
The key
argument on the protect method is now mandatory, craft.templateGuard.protect('password', 'secret-page-key')
. Previously, if the key argument was omitted, the system would default to the current URL. This resulted in the potential bypassing of the maxLoginAttempts
rule.
- Make the
key
argument required. - Improve documentation.
- Add log out support.
- Added more settings:
cookieLifetimeInSeconds
,maxLoginAttempts
andmaxLoginAttemptsPeriodInSeconds
.
- Template Guard now requires Craft CMS 4.0.0-beta.3 or newer.
- Added PHPStan.
- Added
X-Robots-Tag: noindex
header to login route.
Tip
You can now provide an array of passwords {% do craft.templateGuard.protect(['passwords1', 'passwords2']) %}
. Any of the passwords provided in the array can be used to log in.
- Added support for multiple passwords on one page.
- Added tests.
- Initial release.