I'm not familiar with curl. But if you need an logon to DokuWiki, you may be able to do it with the "--load-cookies" option of wget. Look at the man page for details. Theoretically this should work...
man wget wrote
--load-cookies file
Load cookies from file before the first HTTP retrieval. file is a textual file in the
format originally used by Netscape's cookies.txt file.
You will typically use this option when mirroring sites that require that you be
logged in to access some or all of their content. The login process typically works
by the web server issuing an HTTP cookie upon receiving and verifying your credenÂ
tials. The cookie is then resent by the browser when accessing that part of the site,
and so proves your identity.
[...]
Greeting
BlackFog