eZ\Publish\Core\REST\Server\Controller\SessionController::getCsrfToken PHP Method

getCsrfToken() private method

Returns the csrf token for REST. The token is generated if it doesn't exist.
private getCsrfToken ( ) : string
return string The csrf token, or an empty string if csrf check is disabled.
    private function getCsrfToken()
    {
        if ($this->csrfTokenManager === null) {
            return '';
        }
        return $this->csrfTokenManager->getToken($this->csrfTokenIntention)->getValue();
    }