src/Security/AuthenticationMiddleware.php
public function process(HTTPRequest $request, callable $delegate)
    {
        try {
            $this
                ->getAuthenticationHandler()
                ->authenticateRequest($request);
        } catch (ValidationException $e) {
            return new HTTPResponse(
                "Bad log-in details: " . $e->getMessage(),
                400
            );
        } catch (DatabaseException $e) {
            // Database isn't ready, carry on.
        }

        return $delegate($request);
    }
public function process(HTTPRequest $request, callable $delegate)
    {
        try {
            $this
                ->getAuthenticationHandler()
                ->authenticateRequest($request);
        } catch (ValidationException $e) {
            return new HTTPResponse(
                "Bad log-in details: " . $e->getMessage(),
                400
            );
        } catch (DatabaseException $e) {
            // Database isn't ready, carry on.
        }

        return $delegate($request);
    }
public function process ( HTTPRequest $ request , callable $ delegate ) { try { $ this -> getAuthenticationHandler ( ) -> authenticateRequest ( $ request ) ; } catch ( ValidationException $ e ) { return new HTTPResponse ( "Bad log-in details: " . $ e -> getMessage ( ) , 400 ) ; } catch ( DatabaseException $ e ) { // Database isn't ready, carry on. } return $ delegate ( $ request ) ; }
Identify the current user from the request

@param HTTPRequest $request
@param callable $delegate
@return HTTPResponse
Identify the current user from the request