Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Service_Yadis Component Proposal

Proposed Component Name Zend_Service_Yadis
Developer Notes
Proposers Pádraic Brady
Revision 1.0.6 - 02 March 2007 (wiki revision: 11)

Table of Contents

1. Overview

Zend_Service_Yadis will provide a method of Service Discovery implemented in accordance with the Yadis Specification 1.0. This describes a protocol for locating an XRDS document which details Services available. The XRDS is typically specific to a single user, identified by their Yadis ID. Zend_Service_Yadis_Xrds_Service will be a wrapper which is responsible for parsing and presenting an iterable list of Zend_Service_Yadis_Service objects holding the data for each specific Service discovered.

The simplest use case is decentralised authentication via OpenID. The Yadis ID is a user's OpenID URL, or a personal URL alias. It may also be an XRI (e.g. i-name). The available Services are the Signon and Simple Registration versions supported. The XRDS document will also contain the Service URL to which requests should be made, and the OpenID Delegate URL by which the OpenID Server knows this user. Yadis is a fundamental requirement for the current OpenID specification, and also for several other authentication schemes such as Light-Weight Identity and mIDm.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • Zend_Service_Yadis must implement the Yadis Specification 1.0 including the Yadis protocol for discovering the XRDS document for an identity.
  • Zend_Service_Yadis must implement discovery where the Yadis ID is a valid URI
  • Zend_Service_Yadis may implement discovery where the Yadis ID is an i-name (XRI), this however is not a requirement.
  • Zend_Service_Yadis must be able to parse an XRDS document into a set of Zend_Service_Yadis_Service objects each holding URL/Type and other data capable of lookup via an XPath query on the object.
  • Zend_Service_Yadis will use SimpleXML for parsing XRDS documents.
  • Zend_Service_Yadis will support IRIs (Internationalised Resource Identifiers) once they are supported by the core Zend_Uri component of the framework.

4. Dependencies on Other Framework Components

  • Zend_Service_Abstract
  • Zend_Service_Exception
  • Zend_Http_Client
  • Zend_Uri
  • Zend_Exception

5. Theory of Operation

The purpose of Zend_Service_Yadis is to support a higher level depending service such as OpenID. Upon receipt of a suitable Yadis ID, it will attempt to normalise the Yadis ID to a valid URI. It will then employ Zend_Http_Client to request this URI. The valid responses are outlined in the Yadis Specification 1.0 and include an XRDS document (the end goal), a response header which contains the XRDS' URI, or an XHTML body meta tag containing the XRDS' URI.

If the first response is not of the "application/xrds+xml" MIME type, then it must be either a valid response-header, or HTML with a meta tag (as described in the specification) otherwise the Yadis protocol will return a failure exception. The second two options will result in a second request to fetch the XRDS document, or will fail if none is received.

Once an XRDS document is received, it is parsed by SimpleXML and using XPath queries a set of Service data is retrieved. Each Service is encapsulated in a Zend_Service_Yadis_Service object (a mere wrapper across some standard data and the Service's representative SimpleXMLElement object). Services are then returned to the client code as a collection object which is iterable.

The actual format and ordering of Services, and their constituent data, must follow a strict "priority" standard which (as stated by the Yadis Specification 1.0) is the OASIS XRI Resolution 2.0 specification. This rules the order in which Service objects are iterated across in the collection object.

6. Milestones / Tasks

  • Milestone 1: Implement basic service using Zend dependencies
  • Milestone 2: Unit Tests and class refactoring
  • Milestone 3: Debugging and Use Case testing
  • Milestone 4: Documentation

7. Class Index

  • Zend_Service_Yadis
  • Zend_Service_Yadis_Xrds_Namespace
  • Zend_Service_Yadis_Xrds
  • Zend_Service_Yadis_Xrds_Service
  • Zend_Service_Yadis_Xrds_Iname
  • Zend_Service_Yadis_Service
  • Zend_Service_Yadis_Xri
  • Zend_Service_Yadis_Exception

8. Use Cases


Retrieve an OpenID service description based on URL


Retrieve an OpenID service description based on XRI i-name

9. Class Skeletons


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.