PHP Класс Neos\Flow\Security\Authentication\Controller\AbstractAuthenticationController

Наследование: extends Neos\Flow\Mvc\Controller\ActionController
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$authenticationManager Neos\Flow\Security\Authentication\AuthenticationManagerInterface
$securityContext Neos\Flow\Security\Context

Открытые методы

Метод Описание
authenticateAction ( ) : string Calls the authentication manager to authenticate all active tokens and redirects to the original intercepted request on success if there is one stored in the security context. If no intercepted request is found, the function simply returns.
loginAction ( ) : void This action is used to show the login form. To make this work in your package simply create a template for this action, which could look like this in the simplest case:
logoutAction ( ) : void Logs all active tokens out. Override this, if you want to have some custom action here. You can always call the parent method to do the actual logout.

Защищенные методы

Метод Описание
getErrorFlashMessage ( ) : Neos\Error\Messages\Error A template method for displaying custom error flash messages, or to display no flash message at all on errors. Override this to customize the flash message in your action controller.
onAuthenticationFailure ( AuthenticationRequiredException $exception = null ) : void Is called if authentication failed.
onAuthenticationSuccess ( ActionRequest $originalRequest = null ) : string Is called if authentication was successful. If there has been an intercepted request due to security restrictions, you might want to use something like the following code to restart the originally intercepted request:

Описание методов

authenticateAction() публичный Метод

If authentication fails, the result of calling the defined $errorMethodName is returned. Note: Usually there is no need to override this action. You should use the according callback methods instead (onAuthenticationSuccess() and onAuthenticationFailure()).
public authenticateAction ( ) : string
Результат string

getErrorFlashMessage() защищенный Метод

Note: If you implement a nice redirect in the onAuthenticationFailure() method of you login controller, this message should never be displayed.
protected getErrorFlashMessage ( ) : Neos\Error\Messages\Error
Результат Neos\Error\Messages\Error The flash message

loginAction() публичный Метод

Note: This example is designed to serve the "UsernamePassword" token.
public loginAction ( ) : void
Результат void

logoutAction() публичный Метод

Logs all active tokens out. Override this, if you want to have some custom action here. You can always call the parent method to do the actual logout.
public logoutAction ( ) : void
Результат void

onAuthenticationFailure() защищенный Метод

Override this method in your login controller to take any custom action for this event. Most likely you would want to redirect to some action showing the login form again.
protected onAuthenticationFailure ( AuthenticationRequiredException $exception = null ) : void
$exception Neos\Flow\Security\Exception\AuthenticationRequiredException The exception thrown while the authentication process
Результат void

onAuthenticationSuccess() абстрактный защищенный Метод

if ($originalRequest !== NULL) { $this->redirectToRequest($originalRequest); } $this->redirect('someDefaultActionAfterLogin');
abstract protected onAuthenticationSuccess ( ActionRequest $originalRequest = null ) : string
$originalRequest Neos\Flow\Mvc\ActionRequest The request that was intercepted by the security framework, NULL if there was none
Результат string

Описание свойств

$authenticationManager защищенное свойство

protected AuthenticationManagerInterface,Neos\Flow\Security\Authentication $authenticationManager
Результат Neos\Flow\Security\Authentication\AuthenticationManagerInterface

$securityContext защищенное свойство

protected Context,Neos\Flow\Security $securityContext
Результат Neos\Flow\Security\Context