forked from symfony/symfony
-
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.
[SecurityBundle] fix(security): user login programmatically with dedi…
…cated user checker on a firewall
- Loading branch information
Showing
4 changed files
with
47 additions
and
2 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
37 changes: 37 additions & 0 deletions
37
src/Symfony/Component/Security/Core/Event/ProgrammaticLoginEvent.php
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,37 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Security\Core\Event; | ||
|
||
use Symfony\Component\Security\Core\User\UserInterface; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
/** | ||
* This event is dispatch when login programmatically. | ||
* | ||
* @internal | ||
* | ||
* @author Antoine Makdessi <[email protected]> | ||
*/ | ||
class ProgrammaticLoginEvent extends Event | ||
{ | ||
private UserInterface $user; | ||
|
||
public function __construct(UserInterface $user) | ||
{ | ||
$this->user = $user; | ||
} | ||
|
||
public function getUser(): UserInterface | ||
{ | ||
return $this->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