mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-01 16:36:45 +01:00
API - Se è in corso un brute-force, aggiunge il timeout
This commit is contained in:
parent
82c117d94b
commit
c365d94081
@ -64,10 +64,13 @@ try {
|
||||
} catch (InvalidArgumentException $e) {
|
||||
|
||||
if (Auth::getInstance()->attempt(post('username'), post('password'))) {
|
||||
$token = Auth::getInstance()->getToken();
|
||||
$result = $token;
|
||||
$result = Auth::getInstance()->getToken();
|
||||
}else{
|
||||
$result = API::error('unauthorized');
|
||||
// Se è in corso un brute-force, aggiunge il timeout
|
||||
if (Auth::isBrute()) {
|
||||
$result = Auth::getBruteTimeout();
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user