Anonymous user [OpenID enabled] [XRI enabled] [LID enabled]

LID Profile Exchange Howto

From LID Wiki

Jump to: navigation, search

Introduction

LID offers a general-purpose "profile" exchange mechanism that can be used to securely publish any kind of information. This HOWTO document attempts to outline what a LID implementor needs to do in order to take advantage of these LID capabilities. This is work in progress.

Example

Let's first look at an example. Note that this example uses LID 2.0.

Let's assume we have a user whose LID is

http://lid.netmesh.org/liddemoser

This user uses his LID to log on at a LID Relying Party called

http://firstsso.netmesh.org/

Let's assume the LID Relying Party wishes to print out the user's name on each page that the user visits, in a simple form of personalization.

Here is some Perl-like pseudocode that would accomplish this:

my $clientLid = ...;         # the LID with which the user has authenticated, such as
                             # $clientLid = "http://lid.netmesh.org/liddemoser"
my $clientFirstName = http_get( $clientLid . "?xpath=/VCARD/N/GIVEN&lid-format=mime:text/plain" );
print ...;                   # web page first part
print "Hi " . $clientFirstName . "!\n";
print ...;                   # remainder of web page

So in order to obtain the user's first name, the LID Relying Party only needs to use the user's LID URL, and append a query string to the URL. In our example, that query string has two components:

xpath=/VCARD/N/GIVEN

This asks for the GIVEN child node of the N node in the VCARD namespace according to the XML VCard specification.

lid-format=mime:text/plain

This asks for the return to be in plain text.

Note: now that LID supports Yadis, a LID URL may specify in its Yadis file that a LID Client is supposed to access a different service endpoint to perform the query.

Capabilities

Not all LID URLs support "profile exchange". In order to determine whether a LID URL supports it, the Yadis file associated with the LID URL must be consulted. Note that typically, the Yadis file will contain at least two relevant entries: whether or not the LID URL supports the LID 2.0 Traversal Service, and whether or not the LID URL supports the vocabulary that the LID Client wishes to use for the query. Both must be present for the query to be understood by the LID Server.

To enable the above example, the LID 2.0 Traversal Service (i.e. the xpath query), the LID 2.0 vCard Service (for the VCARD vocabulary) and the LID 2.0 Format Negotiation Service (to specify we want the result in plain text) must be supported.

Personal tools