Refactor routes rejection using middlewares

This commit is contained in:
Bubka
2022-03-29 15:02:43 +02:00
parent 30331998d2
commit 5eee3de134
21 changed files with 67 additions and 225 deletions

View File

@ -9,7 +9,6 @@ use DarkGhostHunter\Larapass\Facades\WebAuthn;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use App\Exceptions\UnsupportedWithReverseProxyException;
class WebAuthnRecoveryController extends Controller
{
@ -32,19 +31,7 @@ class WebAuthnRecoveryController extends Controller
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
/**
* Create a new controller instance.
*/
public function __construct()
{
$authGuard = config('auth.defaults.guard');
if ($authGuard === 'reverse-proxy-guard') {
throw new UnsupportedWithReverseProxyException();
}
}
/**
* Returns the credential creation options to the user.