WebAuthnConfirmController.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Http\Controllers\Auth;
  3. use App\Http\Controllers\Controller;
  4. use App\Providers\RouteServiceProvider;
  5. use DarkGhostHunter\Larapass\Http\ConfirmsWebAuthn;
  6. class WebAuthnConfirmController extends Controller
  7. {
  8. use ConfirmsWebAuthn;
  9. /*
  10. |--------------------------------------------------------------------------
  11. | Confirm Device Controller
  12. |--------------------------------------------------------------------------
  13. |
  14. | This controller is responsible for handling WebAuthn confirmations and
  15. | uses a simple trait to include the behavior. You're free to explore
  16. | this trait and override any functions that require customization.
  17. |
  18. */
  19. /**
  20. * Where to redirect users when the intended url fails.
  21. *
  22. * @var string
  23. */
  24. protected $redirectTo = RouteServiceProvider::HOME;
  25. /**
  26. * Create a new controller instance.
  27. *
  28. * @return void
  29. */
  30. public function __construct()
  31. {
  32. $this->middleware('auth');
  33. $this->middleware('throttle:10,1')->only('options', 'confirm');
  34. }
  35. }