Rewrites controller registration to something more understandable.
This commit is contained in:
@@ -31,20 +31,14 @@ class WebAuthn
|
|||||||
*/
|
*/
|
||||||
public static function routes(): void
|
public static function routes(): void
|
||||||
{
|
{
|
||||||
Route::middleware('web')->group(static function (): void {
|
Route::middleware('web')
|
||||||
Route::post(
|
->controller(\App\Http\Controllers\WebAuthn\WebAuthnRegisterController::class)
|
||||||
'webauthn/register/options', [\App\Http\Controllers\WebAuthn\WebAuthnRegisterController::class, 'options'
|
->group(static function (): void {
|
||||||
])->name('webauthn.register.options');
|
Route::post('webauthn/register/options', 'options')->name('webauthn.register.options');
|
||||||
Route::post(
|
Route::post('webauthn/register', 'register')->name('webauthn.register');
|
||||||
'webauthn/register', [\App\Http\Controllers\WebAuthn\WebAuthnRegisterController::class, 'register'
|
|
||||||
])->name('webauthn.register');
|
|
||||||
|
|
||||||
Route::post(
|
Route::post('webauthn/login/options', 'options')->name('webauthn.login.options');
|
||||||
'webauthn/login/options', [\App\Http\Controllers\WebAuthn\WebAuthnLoginController::class, 'options'
|
Route::post('webauthn/login', 'login')->name('webauthn.login');
|
||||||
])->name('webauthn.login.options');
|
|
||||||
Route::post(
|
|
||||||
'webauthn/login', [\App\Http\Controllers\WebAuthn\WebAuthnLoginController::class, 'login'
|
|
||||||
])->name('webauthn.login');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user