Sunday, August 27

Authenticating to Google Accounts from the Command Line

The beta version of Blogger uses GData for its API and Google Accounts for logins, which means that it requires the GoogleLogin authorization scheme on API requests. This is more secure, but slightly tougher to work with than HTTP Basic authorization.

Sure, there are libraries (Java and C#) for handling this, but where’s the fun in that? Here’s how to do the API using just curl and sed, in a delightful one-liner:

curl -H "`curl -s -d Email=e-mail address -d Passwd=password -d source=your app name -d service=blogger | sed -n -e \"s/Auth=\(.*\)/Authorization: GoogleLogin auth=\1/p\"`" id/posts/full

Note that for the e-mail address, you’ll need to replace “@” with “%40” as per URL encoding.

Goldman's Gone

Goldman Bores Biz
Originally uploaded by OldMainstream.
Not to get sappy or anything, but I love this photo of Jason Goldman. It is a rare photo of him that he's not mugging it up, and I think a lamer, more emotional me would go on about how this is the true Goldman, and it's special, and precious just like he is, and no one knows him like I do.

Really, though, I like this photo because I know that, consistently, if Goldman's talking like that, I'm laughing one or more asses off because dude is hilarious.

So it's not so much that I'll miss him now that he's left Blogger, it's more like I welcome the gentle kiss of death so that we can be united again for eternity.

Wait. I think that came out wrong.