BackendUserAuthenticator extends BackendUserAuthenticator
This middleware authenticates a Backend User (be_user) (pre)-viewing a frontend page.
This middleware also ensures that $GLOBALS['LANG'] is available, however it is possible that a different middleware later-on might unset the BE_USER as he/she is not allowed to preview a certain page due to rights management. As this can only happen once the page ID is resolved, this will happen after the routing middleware.
Table of Contents
Properties
Methods
- __construct() : mixed
 - process() : ResponseInterface
 - Creates a backend user authentication object, tries to authenticate a user
 - applyHeadersToResponse() : ResponseInterface
 - Adding headers to the response to avoid caching on the client side.
 - initializeBackendUser() : FrontendBackendUserAuthentication|null
 - Creates the backend user object and returns it if a valid backend user is found.
 - isAuthenticated() : bool
 - Implementing the access checks that the TYPO3 CMS bootstrap script does before a user is ever logged in.
 - setBackendUserAspect() : void
 - Register the backend user as aspect
 
Properties
$context
        protected
            Context
    $context
    
    
    
    
    
    
$languageServiceFactory read-only
        protected
            LanguageServiceFactory
    $languageServiceFactory
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct(Context $context, LanguageServiceFactory $languageServiceFactory) : mixed
    Parameters
- $context : Context
 - $languageServiceFactory : LanguageServiceFactory
 
process()
Creates a backend user authentication object, tries to authenticate a user
    public
                    process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - $handler : RequestHandlerInterface
 
Return values
ResponseInterfaceapplyHeadersToResponse()
Adding headers to the response to avoid caching on the client side.
    protected
                    applyHeadersToResponse(ResponseInterface $response) : ResponseInterface
    These headers will override any previous headers of these names sent. Get the http headers to be sent if an authenticated user is available, in order to disallow browsers to store the response on the client side.
Parameters
- $response : ResponseInterface
 
Return values
ResponseInterface —the modified response object.
initializeBackendUser()
Creates the backend user object and returns it if a valid backend user is found.
    protected
                    initializeBackendUser(ServerRequestInterface $request) : FrontendBackendUserAuthentication|null
    Parameters
- $request : ServerRequestInterface
 
Return values
FrontendBackendUserAuthentication|nullisAuthenticated()
Implementing the access checks that the TYPO3 CMS bootstrap script does before a user is ever logged in.
    protected
                    isAuthenticated(FrontendBackendUserAuthentication $user, ServerRequestInterface $request, NormalizedParams $normalizedParams) : bool
    Returns TRUE if access is OK
Parameters
- $user : FrontendBackendUserAuthentication
 - $request : ServerRequestInterface
 - $normalizedParams : NormalizedParams
 
Return values
boolsetBackendUserAspect()
Register the backend user as aspect
    protected
                    setBackendUserAspect(BackendUserAuthentication|null $user[, int|null $alternativeWorkspaceId = null ]) : void
    Parameters
- $user : BackendUserAuthentication|null
 - $alternativeWorkspaceId : int|null = null