Introduction
The following Use Case scenarios are designed to provide a set of best practices for end-to-end service discovery, authentication and data access/retrieval.
Getting involved
Use Case 1 - Logging in and Getting Data
Overview
Data Portability begins right from when a user logs into the system. The best possible user experience will involve applications being able to automatically discover as much information as possible.
Event Sequence
- User establishes their identity using OpenID (TODO: Link to recommendation for OpenID).
- A Service Catalogue for the user is discovered by attempting XRDS-S discovery as a first choice, then failing that asking the user for the information directly. (Detailed in DP-IMPL-001 - Service Catalogue Discovery).
- The service catalogue is queried for the locations of required data. TODO: Link to details of Service Catalogue)
Use Case 2 - Signing up to a new Social Network
Overview
Joining a new Social Network often requires the entry of either user credentials for other services, or masses of contact data. Using Data Portability, services will be able to share this information without requiring user passwords, or the re-entry of data.
Event Sequence
- User logs in and application discovers service catalogue, as detailed in Use Case 1.
- The new service retrieves the user's profile by:
- Querying the service catalogue for any elements of media type "application/xml+xhtml+hcard" (Service Catalogue entry details are defined in DP-REC-006 Profile Definitions)
- Attempting to retrieve each of these resources in turn. The request for the resource may be denied with an Authorization Required error. The resource provider will specify OAuth authorisation details, which the new service may choose to utilise to gain authorisation for the resource. (Authorisation mechanism defined in DP-REC-003 - Portable Data Authorisation)
- Profile data is available to the application as hCard data (Defined in DP-REC-006 Profile Definitions).
- The new service retrieves the user's contact information by:
- Querying the service catalogue for any elements of media type "application/xml+foaf" or "application/xml+xhtml+xfn" (Service Catalogue entry details are defined in DP-REC-007 Contact List Definitions)
- Attempting to retrieve each of these resources in turn. The request for the resource may be denied with an Authorization Required error. The resource provider will specify OAuth authorisation details, which the new service may choose to utilise to gain authorisation for the resource. (Authorisation mechanism defined in DP-REC-003 - Portable Data Authorisation)
- Contact data is available in either FOAF or XFN format (as indicated by the media type in the service catalogue). (Defined in DP-REC-007 Contact List Definitions)
While I thought it was clear what the BP doc #1 is about (logging in and obtaining a service list) I am not so sure anymore (hence my idea of first writing detailed use cases which I will begin tomorrow)
So my questions:
- Is this about logging in to a website you are already a member of or is it about registering for one?
- If it's for one where I am a member of why do I need to retrieve my profile again, I'd think that it's sitting on the SN now (once copied maybe and maybe edited) and might receive updates via some sort of mechansim we have to discuss
- Is this document about just logging in and obtaining a service catalog (= a list of URLs to some services in the end) or is it also about doing something with those services? What is the meaning of getting the contacts list e.g. via XFN then? I might then have a list of links to twitter friends but on some different service this might not make too much sense? (I acually would move this whole contact thing to some other BP doc while this here serves as the root of everything)
- Use Case #2 should maybe splitted into 2 separate ones: profile and contact list
- I personally like separate pages for use cases and technical docs better. Then you can nicely link to them also from other documents (e.g. I imagine we have some sort of story of one user using all this and we can link from within this story to use cases and maybe in the end to BPs). We can then also version use cases, technical docs and BPs separately. When we publish something as finished we can still copy everything into one page (or PDF) and "freeze" it that way.
- thinking about it a bit more maybe what's on here is more the technical sequence and not so much a use case, so this should probably stay on this page for linking all the technologies together.
- should we put the authorization bit extra? like it should be clear that for every endpoint discovered we might find a protected one.
Here is an example sequence for this in a simple use case style:
Roles
System - a website the user wants to register for
User - the user who wants to join a website
Main Success Scenario
Exceptions
4a. A service endpoint is protected by OAuth
4a1. The system authorizes the access to a service endpoint as described in DP-REC-003
2a. The user cannot be authenticated
2a1. The process stops here unless the system implements other means of authentication such as providing the user with an OpenID of the system.
Remarks
The list of available service endpoints defined for Data Portability can be found here. The best practice for using them can be found in the accompanying Best Practices document.
(or something like that)