Skip to content

Instantly share code, notes, and snippets.

@michielbdejong
Created May 20, 2019 12:18
Show Gist options
  • Save michielbdejong/116f5da86f3bb578dafedf6f92403e6f to your computer and use it in GitHub Desktop.
Save michielbdejong/116f5da86f3bb578dafedf6f92403e6f to your computer and use it in GitHub Desktop.

To split your identity from your pod:

Set up a pod

It doesn't have to support IDP functionality. I used https://github.com/inrupt/pod-server and deployed it to https://pod-server.herokuapp.com

Set up a WebID

I registered the user 'michiel-at-heroku' on https://inrupt.net, then used a private browsing tab to log in as that user (so that it wouldn't log me in as my main https://michielbdejong.inrupt.net identity) and edited https://michiel-at-heroku.inrupt.net/profile/card by adding three prefixes (pod:, inbox: and settings:) and linking to those:

@prefix solid: <http://www.w3.org/ns/solid/terms#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix pim: <http://www.w3.org/ns/pim/space#>.
@prefix schema: <http://schema.org/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.

@prefix pod: <https://pod-server.herokuapp.com/>.
@prefix inbox: <https://pod-server.herokuapp.com/inbox/>.
@prefix settings: <https://pod-server.herokuapp.com/settings/>.

<>
    a foaf:PersonalProfileDocument ;
    foaf:maker <https://michiel-at-heroku.inrupt.net/profile/card#me> ;
    foaf:primaryTopic <https://michiel-at-heroku.inrupt.net/profile/card#me> .

<https://michiel-at-heroku.inrupt.net/profile/card#me>
    a foaf:Person ;
    a schema:Person ;

    foaf:name "Michiel at Heroku" ;

    solid:account pod: ;  # link to the account uri
    pim:storage pod: ;    # root storage

    ldp:inbox inbox: ;

    pim:preferencesFile settings:prefs.ttl ;  # private settings/preferences
    solid:publicTypeIndex settings:publicTypeIndex.ttl ;
    solid:privateTypeIndex settings:privateTypeIndex.ttl .

Now I can log in to e.g. https://vincenttunru.gitlab.io/poddit/ with my identity https://michiel-at-heroku.inrupt.net/profile/card#me and then my data will be stored at https://pod-server.herokuapp.com/ instead of at https://michiel-at-heroku.inrupt.net/.

@michielbdejong
Copy link
Author

all 4 statements are correct!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment