Developing an API for MSG

Had some discussions yesterday with the FlashMeeting guys as to how we could integrate MSG and FlashMeeting in some way, the upshot was that we’re going to look at developing an API for MSG so that presence info can be embedded in other web applications – simply stick a few references to JavaScript files in your application, add the tags for who and where you’d like presence info displayed and then the page will automatically display presences for those users (and keep them up to date).

In fact this morning I’ve been working on a little demo of how this could work, so I’ve got a plain html page running on my desktop PC which is calling the relevant JavaScript files on my development Moodle server – and all seems to be working well, it automatically logs you in to MSG (if you aren’t already). Next step is some more generalisation of the code and getting it moved over to the actual MSG server.

The main issue that we’ll have is with authentication, but I think we’ve got a method for coping with this. Essentially the MSG server needs to know how to authenticate the user, before the user can be logged in (and their contacts presences displayed). So, suppose I have Website X where I would like to display presences and I needed to have logged in to this website (so I’ve got a cookie). When I call the JavaScript initialisation function for MSG, I pass it the authentication type (in this case ‘WebsiteX’) and an array of authentication parameters (which would include my cookie). JavaScript calls the connect service in BuddyXML (on MSG server) providing these authentication details. BuddyXML then knows how to authenticate the cookie that’s passed (i.e. in this case to call a validate service running on Website X) and can automatically log the user in to MSG, on the basis that we trust Website X.

Leave a Reply

*