-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [2.x] Events for Two Factor Authentication (#162) * added events * dispatch events * added tests for events * Style CI fixes * rename events * fix usages (cherry picked from commit 8105a1a) * [2.x] Dispatch Event when Two Factor Challenged (#239) * dispatch event when two factor challenged and test * use statements styleci (cherry picked from commit b490728) Co-authored-by: danclaytondev <daniel@cl8on.co.uk>
- Loading branch information
1 parent
fb2b788
commit a717da4
Showing
12 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class RecoveryCodesGenerated | ||
{ | ||
use Dispatchable; | ||
|
||
/** | ||
* The user instance. | ||
* | ||
* @var \App\Models\User | ||
*/ | ||
public $user; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param \App\Models\User $user | ||
* @return void | ||
*/ | ||
public function __construct($user) | ||
{ | ||
$this->user = $user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Events; | ||
|
||
class TwoFactorAuthenticationChallenged extends TwoFactorAuthenticationEvent | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Events; | ||
|
||
class TwoFactorAuthenticationDisabled extends TwoFactorAuthenticationEvent | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Events; | ||
|
||
class TwoFactorAuthenticationEnabled extends TwoFactorAuthenticationEvent | ||
{ | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
abstract class TwoFactorAuthenticationEvent | ||
{ | ||
use Dispatchable; | ||
|
||
/** | ||
* The user instance. | ||
* | ||
* @var \App\Models\User | ||
*/ | ||
public $user; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param \App\Models\User $user | ||
* @return void | ||
*/ | ||
public function __construct($user) | ||
{ | ||
$this->user = $user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters