mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-25 14:32:09 +02:00
Apply Laravel Pint fixes
This commit is contained in:
parent
05a39b6501
commit
65c4bbc496
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
// namespace App\Http\Controllers\Auth;
|
||||
|
||||
// use App\Http\Controllers\Controller;
|
||||
// use App\Providers\RouteServiceProvider;
|
||||
// // use DarkGhostHunter\Larapass\Http\ConfirmsWebAuthn;
|
||||
|
||||
// class WebAuthnConfirmController extends Controller
|
||||
// {
|
||||
// // use ConfirmsWebAuthn;
|
||||
|
||||
// /*
|
||||
// |--------------------------------------------------------------------------
|
||||
// | Confirm Device Controller
|
||||
// |--------------------------------------------------------------------------
|
||||
// |
|
||||
// | This controller is responsible for handling WebAuthn confirmations and
|
||||
// | uses a simple trait to include the behavior. You're free to explore
|
||||
// | this trait and override any functions that require customization.
|
||||
// |
|
||||
// */
|
||||
|
||||
// /**
|
||||
// * Where to redirect users when the intended url fails.
|
||||
// *
|
||||
// * @var string
|
||||
// */
|
||||
// protected $redirectTo = RouteServiceProvider::HOME;
|
||||
// }
|
@ -39,27 +39,21 @@ class WebAuthnDeviceLostController extends Controller
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param string $response
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
protected function sendRecoveryLinkFailedResponse(Request $request, string $response)
|
||||
{
|
||||
if ($request->wantsJson()) {
|
||||
throw ValidationException::withMessages(['email' => [trans($response)]]);
|
||||
}
|
||||
|
||||
return back()
|
||||
->withInput($request->only('email'))
|
||||
->withErrors(['email' => trans($response)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the response for a successful account recovery link.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param string $response
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
protected function sendRecoveryLinkResponse(Request $request, string $response)
|
||||
{
|
||||
|
@ -98,7 +98,8 @@ class LogoService
|
||||
try {
|
||||
$response = Http::retry(3, 100)->get(self::TFA_URL);
|
||||
|
||||
$coll = collect(json_decode(htmlspecialchars_decode($response->body()), true)) /** @phpstan-ignore-line */
|
||||
$coll = collect(json_decode(htmlspecialchars_decode($response->body()), true))
|
||||
/** @phpstan-ignore-line */
|
||||
->mapWithKeys(function ($item, $key) {
|
||||
return [
|
||||
strtolower(head($item)) => $item[1]['domain'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user