public function useAnonymousRole()
{
switch ($this->authType) {
case self::AUTHTYPE_BASICHTTP:
$this->restDriver->setAuthentication('anonymous', '');
break;
case self::AUTHTYPE_SESSION:
$this->cleanupSession();
break;
default:
throw new \Exception("Unknown auth type: '{$this->authType}'.");
}
}