Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Support JSON-LD ACL docs #45

Closed
michielbdejong opened this issue Apr 30, 2019 · 4 comments
Closed

Support JSON-LD ACL docs #45

michielbdejong opened this issue Apr 30, 2019 · 4 comments
Labels
bug Something isn't working WAC Related to the WAC parts

Comments

@michielbdejong
Copy link
Contributor

No description provided.

@michielbdejong michielbdejong added bug Something isn't working LDP Related to the LDP parts WAC Related to the WAC parts and removed LDP Related to the LDP parts labels Apr 30, 2019
@michielbdejong michielbdejong mentioned this issue May 7, 2019
4 tasks
michielbdejong added a commit that referenced this issue May 9, 2019
@michielbdejong
Copy link
Contributor Author

Blocked by solid/web-access-control-spec#45 but it may work if i use rdflib.js instead of rdf-ext.

@elf-pavlik
Copy link

Most applications don't have to fetch the vocab, could you please share example of you ACL in JSON-LD? I would like to take a look at your @context if you use compacted JSON-LD.

@michielbdejong
Copy link
Contributor Author

This is what I was testing with:

{
  "@context": "http://www.w3.org/ns/auth/acl#",
  "@type": "http://www.w3.org/ns/auth/acl#Authorization",
  "agent": [
    "https://michielbdejong.inrupt.net/profile/card#me",
    "mailto:michiel@unhosted.org"
  ],
  "accessTo": "/",
  "default": "/",
  "mode": [
    "http://www.w3.org/ns/auth/acl#Read",
    "http://www.w3.org/ns/auth/acl#Write",
    "http://www.w3.org/ns/auth/acl#Control"
  ]
}

@elf-pavlik
Copy link

elf-pavlik commented May 10, 2019

Please try

{
  "@context": {
    "wac": "http://www.w3.org/ns/auth/acl#",
    "agent": {"@id": "wac:agent", "@type": "@id"},
    "accessTo": {"@id": "wac:accessTo"},
    "default": {"@id": "wac:default"},
    "mode": {"@id": "wac:mode", "@type": "@vocab"},
    "Read": {"@id": "wac:Read"},
    "Write": {"@id": "wac:Write"},
    "Control": {"@id": "wac:Control"}
  },
  "@type": "http://www.w3.org/ns/auth/acl#Authorization",
  "agent": [
    "https://michielbdejong.inrupt.net/profile/card#me",
    "mailto:michiel@unhosted.org"
  ],
  "accessTo": "/",
  "default": "/",
  "mode": [
    "Read",
    "Write",
    "Control"
  ]
}

see N-Triples in JSON-LD playground

One can't just use vocab namespace as JSON-LD @context, first one is general namespace for ontology which can have many serializations, second is something specific for JSON-LD compacted form.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working WAC Related to the WAC parts
Projects
None yet
Development

No branches or pull requests

2 participants