Documentation

CustomUserMessageAuthenticationException extends AuthenticationException
in package

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.

Tags
author

Ryan Weaver ryan@knpuniversity.com

Table of Contents

Properties

$messageData  : array<string|int, mixed>
$messageKey  : string
$token  : mixed

Methods

__construct()  : mixed
__serialize()  : array<string|int, mixed>
Returns all the necessary state of the object for serialization purposes.
__unserialize()  : void
Restores the object state from an array given by __serialize().
getMessageData()  : array<string|int, mixed>
Message data to be used by the translation component.
getMessageKey()  : string
Message key to be used by the translation component.
getToken()  : TokenInterface|null
setSafeMessage()  : mixed
Set a message that will be shown to the user.
setToken()  : mixed

Properties

Methods

__construct()

public __construct([string $message = '' ][, array<string|int, mixed> $messageData = [] ][, int $code = 0 ][, Throwable $previous = null ]) : mixed
Parameters
$message : string = ''
$messageData : array<string|int, mixed> = []
$code : int = 0
$previous : Throwable = null

__serialize()

Returns all the necessary state of the object for serialization purposes.

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

Restores the object state from an array given by __serialize().

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

setSafeMessage()

Set a message that will be shown to the user.

public setSafeMessage(string $messageKey[, array<string|int, mixed> $messageData = [] ]) : mixed
Parameters
$messageKey : string

The message or message key

$messageData : array<string|int, mixed> = []

Data to be passed into the translator


        
On this page

Search results