Slug: xrds-simple-for-movable-type Date: 2008-05-28 Title: XRDS Simple for Movable Type layout: post

DiSo is built on the idea of implementing social networking concepts on existing standards where possible. One of those standards is XRDS Simple, a service description and discovery format that is a part of several recent and upcoming standards including OpenID and OAuth. This weekend I decided to build a generalized service for Movable Type that implements XRDS.

XRDS Simple for Movable Type (version 0.1)

XRDS Simple for Movable Type implements XRDS Simple service discovery. New web services like OpenID and OAuth are encouraging the use of XRDS (eXtensible Resource Descriptor Sequence) (and specifically the new, simplified version) for service discovery.

XRDS Simple for Movable Type is a faceless application that gives plugins a way to register services to be advertised in the discovery document, similar to how plugins can register new streams with Mark’s Action Streams plugin.

Registering A Plugin’s Services

Sample configuration YAML:

xrds_services: openid2: type: # media_type: uri: namespace_id: openid namespace_uri: priority: 10 # local_id: local_id_handler: sub { “” }

A plugin registers its services with XRDS Simple by including an xrds_services section in config.yaml. In that section are any number of service definitions, each listed under a unique identifier.

Within the service definition are a number of items which generally follow the XRDS Simple spec[1]. Of note are the namespace\_id, namespace\_uri, and local\_id\_handler.

Each service can register a namespace to be included in the xml declaration of the discovery document. The namespace\_id and namespace\_uri parameters are used to construct an xsmlns: attribute, like:


XRDS also supports the concept of a local id - an identifier for this site or user on the service the discovery document points to. The local\_id parameter will be added to the generated document in the service definition. Sometimes the local\_id will need to be set programatically. In that case, pass in a coderef as local\_id\_handler.

local_id_handler: sub { “” }

What’s it good for?

XRDS is developing as the discovery mechanism for a new generation of social applications. Eventually, Movable Type’s OpenID server and delegation could be changed to use this simpler yaml-based configuration, and let the plugin generate the appropriate XRDS document, instead of generating the document itself. As Movable Type begins to offer OAuth-based services, those too can be listed - per the OAuth Discovery spec.

Check it out

As this is a faceless application, and there are currently no services in MT using this code, this is really developer-preview code. Download and peruse the plugin - it’s very simple. I’d be interested in feedback on the code and the YAML format as well. Upcoming features include support for multiple Type and MediaType elements (per the spec), as well as support for passing a coderef for parameters instead of static values.


Download XRDS Simple for Movable Type or check it out from the DiSo repository.