Archive for the 'mozilla' Category

Page 2 of 2

my Saturday of OAuth

Since I’m home alone, thought I’d work today on some more OAuth.  I’ve been working on an addon for Thunderbird that handles OAuth, primarily for use with Contacts but I’m sure it will come in handy elsewhere.  The authorizer addon is meant to help other addons transparently use OAuth, and it does so by requiring only a couple lines of code:

let provider = 'google'
let [key, secret, params] = [myKey, mySecret,
                             {'extra':'params', 'scope':'something'}];
function testCallback(svc) {
dump("*********FINISHED**********\naccess token: "+svc.token+
     "\n  secret: "+svc.tokenSecret+"\n");
}
OAuthConsumer.authorize(provider, key, secret,
                        testCallback, params);

That’s all folks!

Given your keys for any OAuth provider, all the user interaction is handled for you. After your app or addon is authorized, the access tokens are stored in prefs and the user doesn’t need to authorize again. I have not worked out expiration of that yet, some work is still necessary.

If they haven’t already logged into the service, they will get a login form:

Once they have logged in, they have to authorize the application:

Now after agreeing, for most desktop apps, the user would have to copy a code and paste it into the app.  For this addon, I’ve worked around that step by catching a redirect in the browser.

You’ll notice lots of white space.  I’ve tried to get a size for the dialog that fits most OAuth providers (or at least the few I’ve implemented).  Unfortunately there is no standard in what the providers display.  But it works, looks decent.  You may also notice in the status bar that the user gets some indication of SSL security.

all ur address r belong to u

First a forewarning:

humorous pictures

I’ve uploaded a first cut of a multi-item addon that contains my modified Weave addon for Thunderbird, and Weaver, an extension to Weave that adds address book syncing (local and collected books).  You should only download Weaver if you’re comfortable using experimental development builds of early release addons that may cause your computers to burst into flames.   I’m putting this out there to get a little feedback and make it easy for a few others to try out.  When I’m more ready to consider a release, it will end up on AMO.

Actually, it works quite well I think.

OAuth where art thou?

Last week I was working on the Contacts addon, getting it into Thunderbird.   A couple of its importers use OAuth, which in TB was a bit clumsy.  It had to open a browser tab, let you authenticate, then you had to copy a key and paste it back into the Contacts tab.  Not the best UX (an OAuth issue, not a Contacts issue).  I decided to put together an addon that could be used by other addons to perform OAuth, at the same time getting rid of that copy/paste process.  The UX is certainly not finished, and every OAuth provider has a different layout for OAuth, but at least it provides a consistent experience that we can build on.  If you’re interested in playing with it, you can find oauthorizer in my bitbucket repositories.  It is not integrated with anything else yet so as no end-user usefulness at this time.  If I can find time soon, I’ll get a patch together for Contacts.

get the dirt on your communications!

I’ve been hacking on a few things lately, one is the Contacts addon for Firefox and getting it to work in Thunderbird.  A quick demo of a little feature I added to Contacts in Thunderbird…

Here I’ve received an email from some random person, and I need to know who they are and why I should care that they’ve emailed me…Give me the dirt!

And here is a Contact tab in thunderbird as the result:

I’m not sure about this email, that guy looks a little sketchy.

You can find out more about Contacts at Mozilla Labs, and follow the Thunderbird patch I’m working on in bugzilla.

It’s not the wine that’s making me Weave

At least not today.

I’m working on various addons for Thunderbird, and one topic that came up a couple times was getting Weave to work with Thunderbird.  So far, I have a patch against a recent pull of the weave repo, and a new addon called Weaver (yes, original) that implements some Thunderbird specific code, and a sync engine for the address book.  Right now it will sync the two standard books, the “Personal Address Book” and the “Collected Addresses” book.  There are still a few issues to iron out, primarily in the Weave preferences panel, and we’ll look at syncing a few more things that are easy and interesting.  Have any data you want synced?

Also, this patch may well be useful for other xul apps that might want to take advantage of using a weave server to sync data.

making email lists a little less painful

If you’re anything like me, you’re subscribed to a dozen or so email lists, all related to something you deemed important at the moment.  If you’re like some of the guys at Mozilla Messaging, you’re subscribed to several dozen email lists, most of which you forgot about.  They all pile up somewhere, possibly right in your Inbox.  This little addon (sorry, for Thunderbird 3.1 only, you’ll have to use nightly builds) identifies those email lists and creates a set of search folders automatically for you.  It also provides some basic UI for getting at things like email list archives, unsubscribing, etc.    Want to get those email list emails out of your Inbox?  The options dialog (available from any message that was sent from an email list) will help you get started with that.  Give it a spin, let me know what you think.

Make sure you download version 0.2.0, if it shows 0.1 the addon servers have not yet updated.

Bulk Filter addon available

I’ve released the Bulk Filter addon for Thunderbird.  The idea behind this addon is to setup a bunch of predefined search filters for common services.  This is an experimental release to get feedback, so if you’re interested in providing any, drop me a note.  You’ll notice the folder layout is similar to the earlier teaser I posted, but not nearly as cool.  That’s due to the need to patch some code in Thunderbird itself, I’ll be trying to get that ready for review this week, maybe it can make it into 3.1.

addon developers and folder pain…pane

I’m working on addons right now that need additional features out of the folder pane in Thunderbird. You can see one example in my previous post, and another in bugzilla. I’m curious if addon developers have wanted to do something in the folder pane that was/is not possible.

managable email?

I remember the day when every email was to me, written by an individual, and more than often about something I cared about.  These days my inbox is a jumble of junk I could live without, except of course, for emails from you.  I think landing at Mozilla Messaging for a while may be the universe telling me to clean up my inbox.  My first projects are all about experimenting with some ways to help people have a better interaction with their email.  I’ll be posting more on that in the days to come, for the super curious, you can check out my bitbucket repositories.  I have a teaser for you though….