Skip to content

Commit

Permalink
AccessFactory: Switch from RMLP to IDSA external vocabulary
Browse files Browse the repository at this point in the history
Use external vocabularies to describe authentication data
  • Loading branch information
DylanVanAssche committed May 5, 2021
1 parent 437ef96 commit a88b6a4
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added
- Added support for named graphs in RDFJStore.
- Support for Logical Target and exporting to a local file with various
serializations and compression, or a SPARQL endpoint using
SPARQL UPDATE queries.
- W3C Web of Things Web API access support to retrieve data from Web API
with token authentication.

### Changed
- Use RDF4JStore by default (see [issue 108](https://github.com/RMLio/rmlmapper-java/issues/108)).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/be/ugent/rml/NAMESPACES.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class NAMESPACES {
public static final String HCTL = "https://www.w3.org/2019/wot/hypermedia#";
public static final String HTV = "http://www.w3.org/2011/http#";
public static final String WOTSEC = "https://www.w3.org/2019/wot/security#";
public static final String RMLP = "http://semweb.mmlab.be/ns/rmlp#";
public static final String IDSA = "https://w3id.org/idsa/core/";
public static final String RMLT = "http://semweb.mmlab.be/ns/rml-target#";
public static final String FORMATS = "https://www.w3.org/ns/formats/";
public static final String COMP = "http://semweb.mmlab.be/ns/rml-compression#";
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/be/ugent/rml/access/AccessFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public Access getAccess(Term logicalSource, QuadStore rmlStore) {
// TODO: support more security configurations
List<Term> securityIn = Utils.getObjectsFromQuads(rmlStore.getQuads(sc, new NamedNode(NAMESPACES.WOTSEC + "in"), null));
List<Term> securityName = Utils.getObjectsFromQuads(rmlStore.getQuads(sc, new NamedNode(NAMESPACES.WOTSEC + "name"), null));
List<Term> securityValue = Utils.getObjectsFromQuads(rmlStore.getQuads(sc, new NamedNode(NAMESPACES.RMLP + "token"), null));
List<Term> securityValue = Utils.getObjectsFromQuads(rmlStore.getQuads(sc, new NamedNode(NAMESPACES.IDSA + "tokenValue"), null));
try {
switch (securityIn.get(0).getValue()) {
case "header": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@prefix rmlp: <http://semweb.mmlab.be/ns/rmlp#> .
@prefix idsa: <https://w3id.org/idsa/core/> .
@base <http://example.com/rules/> .

# API key in HTTP header
<#WotWebAPISecurity> a rmlp:APISecuritydata;
rmlp:token "123456789";
.
<#WotWebAPISecurity> a idsa:Token;
idsa:tokenValue "123456789";
.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@prefix rmlp: <http://semweb.mmlab.be/ns/rmlp#> .
@prefix idsa: <https://w3id.org/idsa/core/> .
@base <http://example.com/rules/> .

# API key in HTTP header
<#WotWebAPISecurity> a rmlp:APISecuritydata;
rmlp:token "123456789";
.
<#WotWebAPISecurity> a idsa:Token;
idsa:tokenValue "123456789";
.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@prefix rmlp: <http://semweb.mmlab.be/ns/rmlp#> .
@prefix idsa: <https://w3id.org/idsa/core/> .
@base <http://example.com/rules/> .

# API key in HTTP header
<#WotWebAPISecurity> a rmlp:APISecuritydata;
rmlp:token "123456789";
.
<#WotWebAPISecurity> a idsa:Token;
idsa:tokenValue "123456789";
.

0 comments on commit a88b6a4

Please sign in to comment.