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/.

@megoth
Copy link

megoth commented May 21, 2019

Just so I'm clear about how to understand this:

  1. Your WebID is https://michiel-at-heroku.inrupt.net/profile/card#me,
  2. the profile document is https://michiel-at-heroku.inrupt.net/profile/card,
  3. the identity provider (IDP) is https://inrupt.net, and
  4. the pod provider is https://pod-server.herokuapp.com/

Are any of these statements wrong?

@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