public function logout(): bool
    {
        if ($this->values->offsetExists('principal')) {
            $principal = $this->getPrincipal();
            $this->principal = Principal::getAnonymous();

            $this->session->destroy();

            $this->logger->info(
                "Authentication logout: {user}",
                ['user' => $principal]
            );
            return $this->publishLogout($principal);
        }
        return false;
    }