Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (RequestLogReader $requestLogReader, RequestLogWriter $requestLogWriter, RequestLogConfig $requestLogConfig) | |
throttle ($userName, $userType) | |
resetAuthenticationFailuresCount ($userName, $userType) | |
logAuthenticationFailure ($userName, $userType) | |
Data Fields | |
const | USER_TYPE_CUSTOMER = 2 |
const | USER_TYPE_ADMIN = 3 |
Model for OAuth admin/customer token requests throttling.
Definition at line 17 of file RequestThrottler.php.
__construct | ( | RequestLogReader | $requestLogReader, |
RequestLogWriter | $requestLogWriter, | ||
RequestLogConfig | $requestLogConfig | ||
) |
Initialize dependencies.
RequestLogReader | $requestLogReader | |
RequestLogWriter | $requestLogWriter | |
RequestLogConfig | $requestLogConfig |
Definition at line 46 of file RequestThrottler.php.
logAuthenticationFailure | ( | $userName, | |
$userType | |||
) |
Increment authentication failures count and lock user account if the limit is reached.
Account will be locked until lock expires.
string | $userName | |
int | $userType |
Definition at line 100 of file RequestThrottler.php.
resetAuthenticationFailuresCount | ( | $userName, | |
$userType | |||
) |
Reset count of failed authentication attempts.
Unlock user account and make generation of OAuth tokens possible for this account again.
string | $userName | |
int | $userType |
Definition at line 86 of file RequestThrottler.php.
throttle | ( | $userName, | |
$userType | |||
) |
Throw exception if user account is currently locked because of too many failed authentication attempts.
string | $userName | |
int | $userType |
AuthenticationException |
Definition at line 64 of file RequestThrottler.php.
const USER_TYPE_ADMIN = 3 |
Definition at line 23 of file RequestThrottler.php.
const USER_TYPE_CUSTOMER = 2 |
#+ Web API user type
Definition at line 22 of file RequestThrottler.php.