Week 10

As I started modyfing Jabberzilla I noticed that I cannot write much unless I know how the “HTTP-Client” part will be done. So I had to think about that.

First I have to mention, that there is still no decision from JSF regarding possible changes to the JEP… So there were two possible ways:

  1. extend existing schemes by using magical “xmpp” realm name (as in the current JEP)
  2. create new XMPP auth scheme (as proposed by some people)

New scheme is attractive from implementor’s point of view: it can be easily done as Firefox extension. Modyfing existing schemes would require more hacking. On the other hand, I wouldn’t like to re-implement all Digest auth logic already present in Firefox.
The first idea was: create new scheme, but reuse the code.
Second idea: actually call methods of existing auth components in my new component.
And the best idea came at the end: Firefox selects auth component by authentication scheme. So now… why not trick it that - for example - Basic with realm="xmpp" is actually a different scheme, let’s say XMPP-Basic?

So, I wrote a handler for new scheme(s), and then added a small rewrite tool that changes WWW-Authenticate headers on the fly :)

Maybe sounds easy, but it took me much time to invent, and required to read really much…

BTW: I really recommend XUL Planet if you’re planning to code something for Mozilla.

Plans for next week

  • Make my Great Solution work (yes, I have some code already, but it’s rather a prototype)
  • Make it work together with Jabberzilla

Leave a Reply