attempt_login()

Verify credentials subject to failed-attempt lockout.

Usage

attempt_login(
    username,
    password,
)

Returns (success, outcome), where outcome is the string recorded in the audit trail. After MAX_FAILED_LOGINS consecutive failures the account is refused for LOCKOUT_SECONDS even when given the right password; a successful login clears the counter.