PHP 클래스 Neos\Flow\Security\Authentication\Controller\AbstractAuthenticationController

상속: extends Neos\Flow\Mvc\Controller\ActionController
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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