FrontendUserAuthenticator implements MiddlewareInterface
Read onlyYes
This middleware authenticates a Frontend User (fe_users).
Table of Contents
Interfaces
- MiddlewareInterface
Properties
- $context : Context
- $eventDispatcher : EventDispatcherInterface
- $logger : LoggerInterface
- $rateLimiterFactory : RateLimiterFactoryInterface
Methods
- __construct() : mixed
- process() : ResponseInterface
- Creates a frontend user authentication object, tries to authenticate a user and stores it in the current request as attribute.
- ensureLoginRateLimit() : LimiterInterface|null
- sessionGarbageCollection() : void
- Garbage collection for fe_sessions (with a probability)
Properties
$context
protected
Context
$context
$eventDispatcher
protected
EventDispatcherInterface
$eventDispatcher
$logger
protected
LoggerInterface
$logger
$rateLimiterFactory
protected
RateLimiterFactoryInterface
$rateLimiterFactory
Methods
__construct()
public
__construct(Context $context, RateLimiterFactoryInterface $rateLimiterFactory, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger) : mixed
Parameters
- $context : Context
- $rateLimiterFactory : RateLimiterFactoryInterface
- $eventDispatcher : EventDispatcherInterface
- $logger : LoggerInterface
process()
Creates a frontend user authentication object, tries to authenticate a user and stores it in the current request as attribute.
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface
Return values
ResponseInterfaceensureLoginRateLimit()
protected
ensureLoginRateLimit(FrontendUserAuthentication $user, ServerRequestInterface $request) : LimiterInterface|null
Parameters
- $user : FrontendUserAuthentication
- $request : ServerRequestInterface
Return values
LimiterInterface|nullsessionGarbageCollection()
Garbage collection for fe_sessions (with a probability)
protected
sessionGarbageCollection() : void