Updates to 03-2025
This commit is contained in:
parent
881fc84207
commit
4eb83def39
142 changed files with 21396 additions and 11243 deletions
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Auth;
|
||||
use Closure;
|
||||
use App\Services\AuthGoogle2FA;
|
||||
|
||||
class AuthGoogle2FA
|
||||
{
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$AuthGoogle2FA = app(AuthGoogle2FA::class)->init($request);
|
||||
|
||||
if(!Auth::user()->isGoogle2Fa()){
|
||||
return $AuthGoogle2FA->makeActiveOneTimePasswordResponse();
|
||||
}
|
||||
if ($AuthGoogle2FA->isAuthenticated()) {
|
||||
return $next($request);
|
||||
}
|
||||
return $AuthGoogle2FA->makeRequestOneTimePasswordResponse();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Auth;
|
||||
use Closure;
|
||||
use App\Services\AuthGoogle2FA;
|
||||
|
||||
class Google2FA
|
||||
{
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$AuthGoogle2FA = app(AuthGoogle2FA::class)->init($request);
|
||||
|
||||
if(!Auth::user()->isGoogle2Fa()){
|
||||
return $AuthGoogle2FA->makeActiveOneTimePasswordResponse();
|
||||
}
|
||||
if ($AuthGoogle2FA->isAuthenticated()) {
|
||||
return $next($request);
|
||||
}
|
||||
return $AuthGoogle2FA->makeRequestOneTimePasswordResponse();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use PragmaRX\Google2FALaravel\Support\Authenticator;
|
||||
use Auth;
|
||||
|
||||
class Google2FA
|
||||
{
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$authenticator = app(Authenticator::class)->boot($request);
|
||||
dd(Auth::user()->isGoogle2Fa());
|
||||
if(Auth::user()->isGoogle2Fa()){
|
||||
|
||||
}
|
||||
if ($authenticator->isAuthenticated()) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
return $authenticator->makeRequestOneTimePasswordResponse();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue