Conditions | 5 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function handle($request, Closure $next) |
||
22 | { |
||
23 | if($this->exceptAccount()){ |
||
24 | return $next($request); |
||
25 | } |
||
26 | |||
27 | if ($request->method() == "POST") { |
||
28 | if (in_array($request->path(), config('irfa.lockout.protected_action_path'))) { |
||
29 | if ($this->lockLogin()) { |
||
30 | $this->eventFailedLogin(); |
||
31 | $this->logging("API"); |
||
32 | $message['code'] = 403; |
||
|
|||
33 | $message[config('irfa.lockout.message_name')] = Lang::get('lockoutMessage.locked'); |
||
34 | return response()->json($message); |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 | return $next($request); |
||
39 | } |
||
41 |