Skip to content

Commit 755dee5

Browse files
committed
Merge branch '3.x' of github.com:vormkracht10/filament-two-factor-auth into 3.x
2 parents f3bef81 + 7fc4ecd commit 755dee5

9 files changed

Lines changed: 19 additions & 19 deletions

File tree

src/Enums/TwoFactorType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Backstage\TwoFactorAuth\Enums;
44

5-
use Filament\Support\Contracts\HasLabel;
65
use Backstage\TwoFactorAuth\Traits\EnumArraySerializableTrait;
6+
use Filament\Support\Contracts\HasLabel;
77

88
enum TwoFactorType: string implements HasLabel
99
{

src/Http/Livewire/Auth/Login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Backstage\TwoFactorAuth\Http\Livewire\Auth;
44

5+
use Backstage\TwoFactorAuth\Http\Middleware\RedirectIfTwoFactorAuthenticatable;
6+
use Backstage\TwoFactorAuth\Http\Responses\LoginResponse;
57
use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
68
use Filament\Actions\Action;
79
use Filament\Facades\Filament;
@@ -23,8 +25,6 @@
2325
use Laravel\Fortify\Features;
2426
use Laravel\Fortify\Fortify;
2527
use Livewire\Features\SupportRedirects\Redirector;
26-
use Backstage\TwoFactorAuth\Http\Middleware\RedirectIfTwoFactorAuthenticatable;
27-
use Backstage\TwoFactorAuth\Http\Responses\LoginResponse;
2828

2929
class Login extends BaseLogin
3030
{

src/Http/Livewire/Auth/LoginTwoFactor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Backstage\TwoFactorAuth\Http\Livewire\Auth;
44

5+
use Backstage\TwoFactorAuth\Enums\TwoFactorType;
6+
use Backstage\TwoFactorAuth\Notifications\SendOTP;
57
use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
68
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
79
use Filament\Actions\Action;
@@ -16,8 +18,6 @@
1618
use Laravel\Fortify\Http\Requests\TwoFactorLoginRequest;
1719
use Livewire\Attributes\Computed;
1820
use Livewire\Attributes\Reactive;
19-
use Backstage\TwoFactorAuth\Enums\TwoFactorType;
20-
use Backstage\TwoFactorAuth\Notifications\SendOTP;
2121

2222
class LoginTwoFactor extends Page implements HasActions, HasForms
2323
{

src/Http/Livewire/Auth/Register.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Backstage\TwoFactorAuth\Http\Livewire\Auth;
44

5-
use Filament\Pages\Auth\Register as BaseRegister;
65
use Backstage\TwoFactorAuth\Http\Responses\RegistrationResponse;
6+
use Filament\Pages\Auth\Register as BaseRegister;
77

88
class Register extends BaseRegister
99
{

src/Listeners/SendTwoFactorCodeListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace Backstage\TwoFactorAuth\Listeners;
44

5+
use Backstage\TwoFactorAuth\Notifications\SendOTP;
56
use Laravel\Fortify\Events\TwoFactorAuthenticationChallenged;
67
use Laravel\Fortify\Events\TwoFactorAuthenticationEnabled;
7-
use Backstage\TwoFactorAuth\Notifications\SendOTP;
88

99
class SendTwoFactorCodeListener
1010
{

src/Notifications/SendOTP.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
namespace Backstage\TwoFactorAuth\Notifications;
44

5+
use Backstage\TwoFactorAuth\Actions\GenerateOTP;
6+
use Backstage\TwoFactorAuth\Enums\TwoFactorType;
7+
use Backstage\TwoFactorAuth\Mail\TwoFactorCodeMail;
58
use Illuminate\Bus\Queueable;
69
use Illuminate\Contracts\Queue\ShouldQueue;
710
use Illuminate\Mail\Mailable;
811
use Illuminate\Notifications\Notification;
912
use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException;
1013
use PragmaRX\Google2FA\Exceptions\InvalidCharactersException;
1114
use PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException;
12-
use Backstage\TwoFactorAuth\Actions\GenerateOTP;
13-
use Backstage\TwoFactorAuth\Enums\TwoFactorType;
14-
use Backstage\TwoFactorAuth\Mail\TwoFactorCodeMail;
1515

1616
class SendOTP extends Notification implements ShouldQueue
1717
{

src/TwoFactorAuthPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace Backstage\TwoFactorAuth;
44

5+
use Backstage\TwoFactorAuth\Http\Middleware\ForceTwoFactor;
6+
use Backstage\TwoFactorAuth\Pages\TwoFactor;
57
use Closure;
68
use Filament\Contracts\Plugin;
79
use Filament\Navigation\MenuItem;
810
use Filament\Panel;
911
use Filament\Support\Concerns\EvaluatesClosures;
10-
use Backstage\TwoFactorAuth\Http\Middleware\ForceTwoFactor;
11-
use Backstage\TwoFactorAuth\Pages\TwoFactor;
1212

1313
class TwoFactorAuthPlugin implements Plugin
1414
{

src/TwoFactorAuthServiceProvider.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
namespace Backstage\TwoFactorAuth;
44

5+
use Backstage\TwoFactorAuth\Commands\TwoFactorAuthCommand;
6+
use Backstage\TwoFactorAuth\Enums\TwoFactorType;
7+
use Backstage\TwoFactorAuth\Http\Responses\LoginResponse;
8+
use Backstage\TwoFactorAuth\Http\Responses\TwoFactorChallengeViewResponse;
9+
use Backstage\TwoFactorAuth\Http\Responses\TwoFactorLoginResponse;
10+
use Backstage\TwoFactorAuth\Testing\TestsTwoFactorAuth;
511
use Filament\Facades\Filament;
612
use Filament\Support\Assets\AlpineComponent;
713
use Filament\Support\Assets\Asset;
@@ -29,12 +35,6 @@
2935
use Spatie\LaravelPackageTools\Commands\InstallCommand;
3036
use Spatie\LaravelPackageTools\Package;
3137
use Spatie\LaravelPackageTools\PackageServiceProvider;
32-
use Backstage\TwoFactorAuth\Commands\TwoFactorAuthCommand;
33-
use Backstage\TwoFactorAuth\Enums\TwoFactorType;
34-
use Backstage\TwoFactorAuth\Http\Responses\LoginResponse;
35-
use Backstage\TwoFactorAuth\Http\Responses\TwoFactorChallengeViewResponse;
36-
use Backstage\TwoFactorAuth\Http\Responses\TwoFactorLoginResponse;
37-
use Backstage\TwoFactorAuth\Testing\TestsTwoFactorAuth;
3838

3939
class TwoFactorAuthServiceProvider extends PackageServiceProvider
4040
{

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Backstage\TwoFactorAuth\Tests;
44

5+
use Backstage\TwoFactorAuth\TwoFactorAuthServiceProvider;
56
use BladeUI\Heroicons\BladeHeroiconsServiceProvider;
67
use BladeUI\Icons\BladeIconsServiceProvider;
78
use Filament\Actions\ActionsServiceProvider;
@@ -16,7 +17,6 @@
1617
use Livewire\LivewireServiceProvider;
1718
use Orchestra\Testbench\TestCase as Orchestra;
1819
use RyanChandler\BladeCaptureDirective\BladeCaptureDirectiveServiceProvider;
19-
use Backstage\TwoFactorAuth\TwoFactorAuthServiceProvider;
2020

2121
class TestCase extends Orchestra
2222
{

0 commit comments

Comments
 (0)