Curse you intarweb!

Aug 02, 2005 16:10

I've been fiddling about with making an RSS-feed reader. Mainly because all the ones for the Palm are dogs. I simply want to pull all the news, stuff it in a Plucker doc and read it there. Which is besides the point.

I've finally got around to adding some of the LiveJournal feeds to it and decided I really needed Digest authentication so I could pull the friends-only entries. Well the problem is that LWP::UserAgent retrieves the passwords you store by the net-location, which I can reproduce correctly, and the realm, which I have no hope in hell of reproducing ahead of time.

Choices:

1) When I have a entry that needs authentication - make a call to pull the URL, grab the response, pull out the realm, store that in the credentials. Go about my business. This is almost certainly the right way, but it's kind of sucky and painful in my opinion.
2) Override get_basic_credentials and force resolution without realm. This sucks and will break on servers with multiple realms - which I'm positive exist.
3) Override get_basic_credentials in a different way - since my application is a single threaded list, I can safely just populate it with the current feeds username/password and just update for each entry that needs it.

For now, I've just hardcoded "lj" as the realm, since LiveJournal is the only authenticated feed I have at the moment. That's pathetic though.

:-P

geek, perl, lj, programming, rss

Previous post Next post
Up