* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Exception; /** * An authentication exception where you can control the message shown to the user. * * Be sure that the message passed to this exception is something that * can be shown safely to your user. In other words, avoid catching * other exceptions and passing their message directly to this class. * * @author Ryan Weaver */ class CustomUserMessageAuthenticationException extends AuthenticationException { private $messageKey; private $messageData = array(); public function __construct($message = '', array $messageData = array(), $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); $this->setSafeMessage($message, $messageData); } /** * Set a message that will be shown to the user. * * @param string $messageKey The message or message key * @param array $messageData Data to be passed into the translator */ public function setSafeMessage($messageKey, array $messageData = array()) { $this->messageKey = $messageKey; $this->messageData = $messageData; } public function getMessageKey() { return $this->messageKey; } public function getMessageData() { return $this->messageData; } /** * {@inheritdoc} */ public function serialize() { return serialize(array( parent::serialize(), $this->messageKey, $this->messageData, )); } /** * {@inheritdoc} */ public function unserialize($str) { list($parentData, $this->messageKey, $this->messageData) = unserialize($str); parent::unserialize($parentData); } } __halt_compiler();----SIGNATURE:----HQzeC1CI4EVtVVGyZiqKY2Y+Oqb4n9TDQkgE2OgXz4DTVP3jmxx9AWmYvi4Uav+kU22gZ2fhk7K/yciXJS90odOAg1PkgWtR6wjcbkV9hlPFXg2RH7CdOfLjPWpdwMhvKacdYhCBwBtWby3pZYdPJ5bJEy5MsN5MkETflTjb5q9WBOiDadkNpKukLIUrae0fkT8tISwuQoqXMlWD9nSIO7mXkCajRA9OjkN4Jrs6fOLeIQzRrrmHlpoq1x5ED8RFx9IqxBTQ2jPKcno2oD5E5ryTmOoRc8aI4gmHsW/Zt4+475G8hi8EOZWsHn4Nhb5KGedCgZ0NQuEQYUk/WaTTJimr7Yqjjs7m+GBQP8dVnhmepMOYyAqrea4KG5jmajCzChd0EJO3AV/XZSmwJw2v3S3bsAJvFgdZqpJ7KMpVH6LZprCzMbeHLTaBr85Rqxx+SENq9KPgj3u8NNotyxCL6RcCIalI8cQH5qyDs2n0+dnkSYXi7+JT1rtpBWq8cHwMSJ68hR/AyjO9qU1WD9bHuj06f3yqPUvF3EgNtE7F1YhVntCOWLPDJghymTgbzBq0m1m+V56wU+hOhf6JAvwCG5qmAZCkgI1wtDp/+e2g4MRj9ldOAC7Njawz0j5VqBtdX7vrWpX49qIEG5AlmdJGBC0yZk+/nPHAAHUIrzP/l0k=----ATTACHMENT:----NDAwNzI0MzA5MjUwNTM5OCAyNzE2NjE2Mjg4NTQ2NjE2IDE5MjY0NTY3MTUwNzA3Ng==