eZ\Bundle\EzPublishRestBundle\Features\Context\SubContext\Authentication::useAnonymousRole PHP Method

useAnonymousRole() public method

public useAnonymousRole ( )
    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}'.");
        }
    }