The start of something beautiful
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Lexik\Bundle\JWTAuthenticationBundle\Services\PayloadEnrichment;
|
||||
|
||||
use Lexik\Bundle\JWTAuthenticationBundle\Services\PayloadEnrichmentInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
class RandomJtiEnrichment implements PayloadEnrichmentInterface
|
||||
{
|
||||
public function enrich(UserInterface $user, array &$payload): void
|
||||
{
|
||||
$payload['jti'] = bin2hex(random_bytes(16));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user