forked from laravel/fortify
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (laravel#162)
* added events * dispatch events * added tests for events * Style CI fixes * rename events * fix usages
- Loading branch information
1 parent
55c625c
commit 8105a1a
Showing
9 changed files
with
99 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
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 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