mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-05-02 05:14:38 +02:00
35 lines
1005 B
PHP
35 lines
1005 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Auth;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use DarkGhostHunter\Larapass\Http\RegistersWebAuthn;
|
|
use App\Exceptions\UnsupportedWithReverseProxyException;
|
|
|
|
class WebAuthnRegisterController extends Controller
|
|
{
|
|
use RegistersWebAuthn;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| WebAuthn Registration Controller
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This controller receives an user request to register a device and also
|
|
| verifies the registration. If everything goes ok, the credential is
|
|
| persisted into the application, otherwise it will signal failure.
|
|
|
|
|
*/
|
|
|
|
/**
|
|
* Create a new controller instance.
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$authGuard = config('auth.defaults.guard');
|
|
|
|
if ($authGuard === 'reverse-proxy-guard') {
|
|
throw new UnsupportedWithReverseProxyException();
|
|
}
|
|
}
|
|
} |