Software Development Kit for Data Reuse


This specification describes an SDK to facilitate development of software applications concerned with data reuse, in particular the with the legal aspect of consent. It consists of two parts.

First, a set of interfaces that model the different parts and actors in the process, and which are used by the multiple components provided as another deliverable of this project. These models are designed with broad use cases in mind, and therefore contain a number of optional fields that may or may not be useful depending on the use case. Furthermore, all of these models are compatible with other Digita products and research projects.

Second, the SDK bundles an interface modeling the interaction between client applications, identity providers and Solid pod servers. This interface is inspired by the popular Inrupt SDK, and we provide a version of this package, repackaged for browser use, as an initial implementation of the interface.



Create the following interfaces.

  • LDNode, containing any value, a termType being either literal or uri, and an optional dataType being XMLSchema’s dateTime, string or decimal.

  • LDTriple, containing a string predicate and two LDNodes subject and object.

  • Session, containing a string webId.

  • Profile, containing two strings, uri and name.

  • Holder, containing three strings, uri, exchange (optional) and shape (optional), and an optional array triples of LDTriples.

  • Purpose, containing three mandatory strings, icon, description and uri, three optional strings label, shape and exchange, a mandatory array of strings named predicates and an optional array triples of LDTriples.

  • Source, containing four mandatory strings, icon, description, type and uri, two optional strings shape and exchange, an unknown mandatory configuration, an optional state being either prepared or not prepared, and an optional array `triples of LDTriples.

  • Invite, containing five mandatory strings, holder, purpose, created, expires and uri, four optional strings connection, accepted, shape and exchange, a mandatory state being either not linked, linking or linked, and an optional array triples of LDTriples.

Solid service

Create an interface with the following asynchronous functions.

  • getIssuer, returning a string from a webId string;

  • getProfile, returning a Profile from a webId string;

  • getSession, returning a Session;

  • login, taking a webId string;

  • logout.

Inrupt implementation of the Solid service

Create a class importing the Inrupt SDK and implementing the Solid service interface as follows.

  • getIssuer: if the webId is a valid URL, retrieve the profile with Inrupt’s getSolidDataset and getThing, lookup the issuer with Inrupt’s getUrl, check the issuer’s OpenID Configuration, and return the issuer if valid.

  • getProfile: if the webId is a valid URL, retrieve the profile with Inrupt’s getSolidDataset and getThing, lookup the profile’s FOAF name with Inrupt’s getStringNoLocale, and return a Profile with the webId and the name.

  • getSession: call Inrupt’s handleIncomingRedirect, then check if the returned session is logged in; if so, return the session, else reject.

  • login: call the getIssuer function, and then Inrupt’s login function with the returned value as oidcIssuer`and the current browser url as `redirectUrl.

  • logout: simply call the Inrupt logout function.