public function getIdentity(): ?IdentityInterface
    {
        if (!$this->identity) {
            // check user agent
            if (Session::get('auth:agent') === Request::getServer('HTTP_USER_AGENT')) {
                $this->identity = Session::get('auth:identity');
            } else {
                $this->clearIdentity();
            }
        }
        return $this->identity;
    }