ari_linn: (warrior - normal)
Ари Линн ([personal profile] ari_linn) wrote in [site community profile] dw_dev2016-12-24 02:51 pm
Entry tags:

DW authentication

Hello,

Sorry if my question is offtopic in this community, but it doesn't seem like your dev question thread is very active, so I'll take my chances and ask here. I'm trying to programmatically download DW posts from my journal and have troubles accessing friends-only and private posts. Suppose I have the following request:

GET https://ari-linn.dreamwidth.org/545896.html?format=light&expand_all=1 HTTP/1.1
Host: ari-linn.dreamwidth.org


It results in an error page: "You need to be logged in to see this content."

I thought about logging in programmatically to DW and grabbing cookies to pass with the request, but my attempts are getting me nowhere. I can successfully get challenge and compute response from this:

POST http://www.dreamwidth.org/interface/flat HTTP/1.1
Host: www.dreamwidth.org

mode=getchallenge&ver=1


But I can't login using the challenge-response pair. The following request is invariably giving me an error page: "There was an error processing your request: This account name was not found." Why it can't recognize the user=ari_linn parameter is honestly beyond me.

POST https://www.dreamwidth.org/login?ret=1 HTTP/1.1
Host: www.dreamwidth.org

chal=c0:some:very:complicated:challenge:here&response=md5(challenge_plus_md5(password))&user=ari_linn


Is there any way I can programmatically login to DW to access private posts?

Post a comment in response:

From:
Anonymous
OpenID
Identity URL: 
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org


 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.