Log in

No account? Create an account
January 24th, 2006 - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

January 24th, 2006

invalid password? [Jan. 24th, 2006|11:38 am]
LiveJournal Client Discussions
My client just today starting getting an "Invalid password" response using cookie authentication over XML-RPC. My code hasn't changed in months, and the call to sessiongenerate is successful, but calling getfriends with the cookie I get back is giving me the invalid password error. Has something changed in the protocol?
link3 comments|post comment

Using cookies for auth [Jan. 24th, 2006|02:53 pm]
LiveJournal Client Discussions


Now that LJ has completely changed its cookie handling procedure, does anybody have a clue how to use them to communicate with the server?

My old code, in C# .NET did the following to communicate with the server:

HttpWebRequest Create(string url, string ljsession, string uagent)
Uri uri = new Uri(url);
HttpWebRequest wr = (HttpWebRequest) WebRequest.Create(uri.AbsoluteUri);
wr.Method = "POST";
wr.ContentType = "application/x-www-form-urlencoded";
wr.ProtocolVersion = new Version(1, 0);
wr.UserAgent = uagent;
if (ljsession != null && ljsession.Length > 0)
wr.CookieContainer = new CookieContainer();
wr.CookieContainer.Add(new Cookie("ljsession", ljsession, "/", uri.Host));
wr.Headers.Add("X-LJ-Auth", "cookie");
return wr;

In a nutshell, I'm creating an C# object that handles all the HTTP layer communications, and passing it the value of the ljsession cookie obtained by the challenge/response protocol. This still works. I get a valid ljsession cookie, but any time I try and use it for something else, like posting or logging in, I get an "invalid password" error message from the server. Anybody have any ideas?
link1 comment|post comment

[ viewing | January 24th, 2006 ]
[ go | Previous Day|Next Day ]