?

Log in

No account? Create an account
Getting an Atom Feed from the feed URL (not the data URL) - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

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

Getting an Atom Feed from the feed URL (not the data URL) [Nov. 8th, 2004|11:50 am]
LiveJournal Client Discussions
lj_clients
[trevmex]
Hello again,

I am working on accessing an LJ feed through the AtomAPI. I hope someone out there can help me out. I am sending the following request after discovering http://www.livejournal.com/interface/atomapi/username/feed from http://www.livejournal.com/users/username/data/atom from http://www.livejournal.com/users/username/. What this request should do is return the feed (after which I will retreive the service.post URL for posting).

GET http://www.livejournal.com/interface/atomapi/username/feed
Connection: close
Authorization: WSSE profile="UsernameToken"
User-Agent: Daily Blog Formatter (http://trevreport.org/blogForm.shtml)
Content-Length: 0
Content-Type: application/x.atom+xml
X-WSSE: UsernameToken Username="username", PasswordDigest="W9dSHn5BwJwQFHrD6tWr+JdBv4M=", Nonce="hhIbet0cbBsw9SQB1E/PG42U37s=", Created="2004-11-08T02:50:57Z"

There is nothing wrong with the Nonce, and the WSSE entry is well-formatted. In fact this request works perfectly in Blogger, but when I send the requst to LJ I get:

401 Authentication Failed

Digest authentication failed for this AtomAPI request.



You can try it out yourself at http://trevreport.org/blogForm.shtml. On the bottom of the page there is a little form for entering in your blog info, the output will be the HTTP requests and the resulting response.

If anyone can help I would be grateful.
linkReply

Comments:
[User Picture]From: jproulx
2004-11-08 06:36 pm (UTC)
We don't support WSSE authentication at this time, just HTTP Digest Authentication.
(Reply) (Thread)
From: trevmex
2004-11-08 10:42 pm (UTC)
Ah, now it makes sense. Thanks for clearing that up for me.

Is there any plans to add WSSE authentication in the future?
(Reply) (Parent) (Thread)
From: (Anonymous)
2005-08-22 11:14 pm (UTC)

Does HTTP digest Authentication HttpClient

I'm using HttpClient (commons-HttpClient-2.0.2) and Digest does not seem to work (keeps getting 401).

Here's the trace of the exchange:

header - >> "GET /interface/atomapi/username/feed HTTP/1.1[\r][\n]"
header - >> "User-Agent: Jakarta Commons-HttpClient/2.0.2[\r][\n]"
header - >> "Host: www.livejournal.com[\r][\n]"
header - >> "[\r][\n]"
header - << "HTTP/1.1 401 Authentication Failed[\r][\n]"
header - << "Date: Mon, 22 Aug 2005 23:08:18 GMT[\r][\n]"
header - << "Server: Apache[\r][\n]"
header - << "Set-Cookie: ljuniq=E3TsjSOEl5BYFzB:1124752098; expires=Friday, 21-Oct-2005 23:08:18 GMT; domain=.livejournal.com; path=/[\r][\n]"
header - << "WWW-Authenticate: Digest realm="lj", nonce="c0:1124751600:498:180:n0Bw1lwg6tiRCUW1FUD2:7fcf495812eb4fb97516fa505880179e", algorithm=MD5, qop="auth"[\r][\n]"
header - << "Transfer-Encoding: chunked[\r][\n]"
header - << "Content-Type: text/html[\r][\n]"
content - << "a"
content - << "c"
content - << " "
content - << "[\r]"
content - << "[\n]"
content - << "[\n]"
content - << "

Authentication Failed


Authentication failed for this AtomAPI request.

[\n]"
content - << "[\n]"
content - << "[\r]"
content - << "[\n]"
content - << "0"
content - << "[\r]"
content - << "[\n]"
content - << "[\r]"
content - << "[\n]"
header - >> "GET /interface/atomapi/username/feed HTTP/1.1[\r][\n]"
header - >> "User-Agent: Jakarta Commons-HttpClient/2.0.2[\r][\n]"
header - >> "Host: www.livejournal.com[\r][\n]"
header - >> "Authorization: Digest username="username", realm="lj", nonce="c0:1124751600:498:180:n0Bw1lwg6tiRCUW1FUD2:7fcf495812eb4fb97516fa505880179e", uri="/interface/atomapi/username/feed", qop="auth", algorithm="MD5", nc=00000001, cnonce="e86b7a29d8350e0c066040e9a6fc3943", response="98a41329e5b6364b91bd639adbc60bde"[\r][\n]"
header - >> "Cookie: $Version=0; ljuniq=E3TsjSOEl5BYFzB:1124752098; $Domain=.livejournal.com; $Path=/[\r][\n]"
(Reply) (Parent) (Thread)