mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-24 22:12:06 +02:00
Code cleaning
This commit is contained in:
parent
96ea9f4588
commit
9b96c5fd70
@ -3,7 +3,6 @@
|
|||||||
namespace App\Api\v1\Controllers;
|
namespace App\Api\v1\Controllers;
|
||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Api\v1\Requests\UserUpdateRequest;
|
|
||||||
use App\Api\v1\Resources\UserResource;
|
use App\Api\v1\Resources\UserResource;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace App\Api\v1\Resources;
|
namespace App\Api\v1\Resources;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
|
|
||||||
class UserResource extends JsonResource
|
class UserResource extends JsonResource
|
||||||
{
|
{
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Exceptions;
|
namespace App\Exceptions;
|
||||||
|
|
||||||
use Throwable;
|
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
@ -35,10 +33,6 @@ class Handler extends ExceptionHandler
|
|||||||
*/
|
*/
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
// $this->reportable(function (Throwable $e) {
|
|
||||||
//
|
|
||||||
// });
|
|
||||||
|
|
||||||
$this->renderable(function (\Symfony\Component\HttpKernel\Exception\NotFoundHttpException $exception, $request) {
|
$this->renderable(function (\Symfony\Component\HttpKernel\Exception\NotFoundHttpException $exception, $request) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => 'not found'], 404);
|
'message' => 'not found'], 404);
|
||||||
|
@ -8,7 +8,6 @@ use App\Http\Controllers\Controller;
|
|||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Lang;
|
use Illuminate\Support\Facades\Lang;
|
||||||
use App\Http\Requests\LoginRequest;
|
use App\Http\Requests\LoginRequest;
|
||||||
use Illuminate\Validation\ValidationException;
|
|
||||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use App\Exceptions\UnsupportedWithReverseProxyException;
|
use App\Exceptions\UnsupportedWithReverseProxyException;
|
||||||
|
@ -6,7 +6,6 @@ use App\Models\User;
|
|||||||
use App\Http\Requests\UserStoreRequest;
|
use App\Http\Requests\UserStoreRequest;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
// use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Auth\Events\Registered;
|
use Illuminate\Auth\Events\Registered;
|
||||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||||
use App\Exceptions\UnsupportedWithReverseProxyException;
|
use App\Exceptions\UnsupportedWithReverseProxyException;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Auth;
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||||
use App\Exceptions\UnsupportedWithReverseProxyException;
|
use App\Exceptions\UnsupportedWithReverseProxyException;
|
||||||
|
@ -5,7 +5,6 @@ namespace App\Http\Controllers\Auth;
|
|||||||
use App\Http\Requests\UserUpdateRequest;
|
use App\Http\Requests\UserUpdateRequest;
|
||||||
use App\Api\v1\Resources\UserResource;
|
use App\Api\v1\Resources\UserResource;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use App\Exceptions\UnsupportedWithReverseProxyException;
|
use App\Exceptions\UnsupportedWithReverseProxyException;
|
||||||
|
@ -22,13 +22,11 @@ class WebAuthnManageController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List all WebAuthn registered credentials
|
* List all WebAuthn registered credentials
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use App\Models\User;
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Gate;
|
|
||||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use App\Services\Auth\ReverseProxyGuard;
|
use App\Services\Auth\ReverseProxyGuard;
|
||||||
|
@ -72,9 +72,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
// const { data } = await this.form.get('/api/v1/settings/useWebauthnAsDefault')
|
|
||||||
|
|
||||||
// this.form.useWebauthnAsDefault = data.value
|
|
||||||
const { data } = await this.form.get('/api/v1/settings')
|
const { data } = await this.form.get('/api/v1/settings')
|
||||||
|
|
||||||
this.form.fillWithKeyValueObject(data)
|
this.form.fillWithKeyValueObject(data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user