Reputation: 607
The company I work at has a wiki based on Trac.
I have created this program that allows the user to generate an updated version of a wiki page.
The program works and the page is updated, but in the history - the user is anonymous.
I did all my test on a different server with the same trac installed on it and in the history, there is information about the user(Not anonymous)
I used the following code to write to the wiki
wiki.putPage(getPageName(), newResult.toString(), h);
Here is my authentication code:
Wiki wiki = null;
XmlRpcClientConfigImpl conf = new XmlRpcClientConfigImpl();
setAuthentication(conf, login, password);
XmlRpcClient client = new XmlRpcClient();
client.setConfig(conf);
Do you know why it write the page as user Anonymous?
Thank you for your replies
Upvotes: 0
Views: 286
Reputation: 183
Your question did not include information about the URL used, but most likely you are not using a URL that challenges for authentication. A Trac instance is typically configured to just challenge for authentication at the /login
URL, so your RPC call needs to use the <tracproject>/login/rpc
URL (and not just <tracproject>/rpc
).
Upvotes: 1