public function requireAuthentication(HTTPRequest $request)
    {
        $authenticator = $this->getAuthenticator($request);
        if (!$authenticator) {
            return false;
        }

        $member = $authenticator->authenticate($request);
        if ($member instanceof Member) {
            return $member;
        }
        // Note: The authenticator class itself may also throw an exception when called
        throw new ValidationException('Authentication failed.', 401);
    }
public function requireAuthentication(HTTPRequest $request)
    {
        $authenticator = $this->getAuthenticator($request);
        if (!$authenticator) {
            return false;
        }

        $member = $authenticator->authenticate($request);
        if ($member instanceof Member) {
            return $member;
        }
        // Note: The authenticator class itself may also throw an exception when called
        throw new ValidationException('Authentication failed.', 401);
    }
public function requireAuthentication ( HTTPRequest $ request ) { $ authenticator = $ this -> getAuthenticator ( $ request ) ; if ( ! $ authenticator ) { return false ; } $ member = $ authenticator -> authenticate ( $ request ) ; if ( $ member instanceof Member ) { return $ member ; } // Note: The authenticator class itself may also throw an exception when called throw new ValidationException ( 'Authentication failed.' , 401 ) ; }
If required, enforce authentication for non-session authenticated requests. The Member returned from the
authentication method will returned for use in the OperationResolver context.

Authenticators are defined in configuration. @see AuthenticatorInterface::authenticate.

@param  HTTPRequest $request
@return Member|false         If authentication was successful the Member is returned. False if no
authenticators are configured.
@throws ValidationException  If authentication is attempted and fails
If required enforce authentication for non - session authenticated requests . The Member returned from the authentication method will returned for use in the OperationResolver context .