Skip to content

Doc: fix #1183

Description

@alain-guidon

Hi,

Here is a fix for the documentation on section https://github.com/CakeDC/users/blob/16.next-cake5/Docs/Documentation/Authentication.md#account-lockout-policy.

The key Authentication.Password must be out of the dotted chain:

'Auth.Authenticators.Form.identifier' => [
    'Authentication.Password' => [
        'className' => 'CakeDC/Users.PasswordLockout'
    ]
],
'Auth.PasswordRehash' => [
    'identifiers' => ['PasswordLockout'],
],
'Auth.Authenticators.Form.identifier' => [
    'Authentication.Password' => [
        'className' => 'CakeDC/Users.PasswordLockout',
        'lockoutHandler' => [
            'timeWindowInSeconds' => 30 * 60, // 30 minutes (default is 15 minutes)
            'lockoutTimeInSeconds' => 100 * 60, // 100 minutes (default is 30 minutes)
            'numberOfAttemptsFail' => 4, // default is 6 attempts
            'failedPasswordAttemptsModel' => 'CakeDC/Users.FailedPasswordAttempts',
            'userLockoutField' => 'lockout_time', // Field in user entity used to lock the user.
            'usersModel' => 'Users',
            'userForeignKeyField' => 'user_id', // Field defined in the 'failed_password_attempts' table as foreignKey of the model Users.
        ],
    ],
],
'Auth.PasswordRehash' => [
    'identifiers' => ['PasswordLockout'],
],

Many thanks for those usefull plugins! 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions