The start of something beautiful

This commit is contained in:
2024-09-11 22:48:07 -06:00
parent 45acea47f3
commit f5997ee5ec
5614 changed files with 630696 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
namespace Lexik\Bundle\JWTAuthenticationBundle\Exception;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
/**
* Missing key in the token payload during authentication.
*
* @author Robin Chalas <robin.chalas@gmail.com>
*/
class InvalidPayloadException extends AuthenticationException
{
private string $invalidKey;
/**
* @param string $invalidKey The key that cannot be found in the payload
*/
public function __construct(string $invalidKey)
{
$this->invalidKey = $invalidKey;
}
/**
* {@inheritdoc}
*/
public function getMessageKey(): string
{
return sprintf('Unable to find key "%s" in the token payload.', $this->invalidKey);
}
}