Spec-Zone.ru › Symfony 3.1

GuardAuthenticatorHandler

класс GuardAuthenticatorHandler

Утилитарный класс, выполняющий большую часть работы во время процесса аутентификации сторожа.

Переместив логику сюда вместо слушателя, больше процессов можно вызывать непосредственно (например, для ручной аутентификации) или переопределять.

Методы

__construct(TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher = null)
authenticateWithToken(TokenInterface $token, Request $request)

Производит аутентификацию данного токена в системе.

null|Response handleAuthenticationSuccess(TokenInterface $token, Request $request, GuardAuthenticatorInterface $guardAuthenticator, string $providerKey)

Возвращает ответ «при успехе» для данного GuardAuthenticator.

Response|null authenticateUserAndHandleSuccess(UserInterface $user, Request $request, GuardAuthenticatorInterface $authenticator, string $providerKey)

Удобный метод для аутентификации пользователя и возвращения ответа «при успехе» (если таковой имеется).

null|Response handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, GuardAuthenticatorInterface $guardAuthenticator, string $providerKey)

Обрабатывает неудачную аутентификацию и возвращает ответ для GuardAuthenticator.

Подробное описание

__construct(TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher = null)

Параметры

TokenStorageInterface $tokenStorage
EventDispatcherInterface $eventDispatcher

authenticateWithToken(TokenInterface $token, Request $request)

Производит аутентификацию данного токена в системе.

Параметры

TokenInterface $token
Request $request

null|Response handleAuthenticationSuccess(TokenInterface $token, Request $request, GuardAuthenticatorInterface $guardAuthenticator, string $providerKey)

Возвращает ответ «при успехе» для данного GuardAuthenticator.

Параметры

TokenInterface $token
Request $request
GuardAuthenticatorInterface $guardAuthenticator
string $providerKey Ключ поставщика (т.е. брандмауэра)

Возвращаемое значение

null|Response

Response|null authenticateUserAndHandleSuccess(UserInterface $user, Request $request, GuardAuthenticatorInterface $authenticator, string $providerKey)

Удобный метод для аутентификации пользователя и возвращения ответа «при успехе» (если таковой имеется).

Параметры

UserInterface $user
Request $request
GuardAuthenticatorInterface $authenticator
string $providerKey Ключ поставщика (т.е. брандмауэра)

Возвращаемое значение

Response|null

null|Response handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, GuardAuthenticatorInterface $guardAuthenticator, string $providerKey)

Обрабатывает неудачную аутентификацию и возвращает ответ для GuardAuthenticator.

Параметры

AuthenticationException $authenticationException
Request $request
GuardAuthenticatorInterface $guardAuthenticator
string $providerKey Ключ брандмауэра

Возвращаемое значение

null|Response

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API