private function protectWithRedirect(Authentication $authentication, string $location): void
    {
        if (($this->authentication = $authentication->isLogged()) === false) {
            \header('Location: '.$location);
            throw new AuthenticationException('');
        }
    }