The start of something beautiful
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Lexik\Bundle\JWTAuthenticationBundle\Event;
|
||||
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* JWTAuthenticatedEvent.
|
||||
*/
|
||||
class JWTAuthenticatedEvent extends Event
|
||||
{
|
||||
protected array $payload;
|
||||
protected TokenInterface $token;
|
||||
|
||||
public function __construct(array $payload, TokenInterface $token)
|
||||
{
|
||||
$this->payload = $payload;
|
||||
$this->token = $token;
|
||||
}
|
||||
|
||||
public function getPayload(): array
|
||||
{
|
||||
return $this->payload;
|
||||
}
|
||||
|
||||
public function setPayload(array $payload)
|
||||
{
|
||||
$this->payload = $payload;
|
||||
}
|
||||
|
||||
public function getToken(): TokenInterface
|
||||
{
|
||||
return $this->token;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user