for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PragmaRX\Google2FALaravel;
use Closure;
use PragmaRX\Google2FALaravel\Support\Authenticator;
class Middleware
{
public function handle($request, Closure $next)
$authenticator = app(Authenticator::class)->boot($request);
if ($authenticator->isAuthenticated()) {
return $next($request);
}
return $authenticator->makeRequestOneTimePasswordResponse();