Skip to content

Commit

Permalink
NamedNode for fragment in profile doc
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Nov 26, 2024
1 parent 38a84b0 commit c12c272
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ exports[`getStatementsToAdd should return all required statements to add the giv
"termType": "NamedNode",
"value": "https://profile.example",
},
"object": BlankNode {
"classOrder": 6,
"isBlank": 1,
"isVar": 1,
"termType": "BlankNode",
"value": "bn_mock_app_id",
"object": NamedNode {
"classOrder": 5,
"termType": "NamedNode",
"value": "https://profile.example#mock_app_id",
},
"predicate": NamedNode {
"classOrder": 5,
Expand Down Expand Up @@ -42,12 +40,10 @@ exports[`getStatementsToAdd should return all required statements to add the giv
"termType": "NamedNode",
"value": "http://www.w3.org/ns/auth/acl#origin",
},
"subject": BlankNode {
"classOrder": 6,
"isBlank": 1,
"isVar": 1,
"termType": "BlankNode",
"value": "bn_mock_app_id",
"subject": NamedNode {
"classOrder": 5,
"termType": "NamedNode",
"value": "https://profile.example#mock_app_id",
},
},
Statement {
Expand All @@ -66,12 +62,10 @@ exports[`getStatementsToAdd should return all required statements to add the giv
"termType": "NamedNode",
"value": "http://www.w3.org/ns/auth/acl#mode",
},
"subject": BlankNode {
"classOrder": 6,
"isBlank": 1,
"isVar": 1,
"termType": "BlankNode",
"value": "bn_mock_app_id",
"subject": NamedNode {
"classOrder": 5,
"termType": "NamedNode",
"value": "https://profile.example#mock_app_id",
},
},
Statement {
Expand All @@ -90,12 +84,10 @@ exports[`getStatementsToAdd should return all required statements to add the giv
"termType": "NamedNode",
"value": "http://www.w3.org/ns/auth/acl#mode",
},
"subject": BlankNode {
"classOrder": 6,
"isBlank": 1,
"isVar": 1,
"termType": "BlankNode",
"value": "bn_mock_app_id",
"subject": NamedNode {
"classOrder": 5,
"termType": "NamedNode",
"value": "https://profile.example#mock_app_id",
},
},
]
Expand Down
2 changes: 1 addition & 1 deletion src/trustedApplications/trustedApplications.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function getStatementsToAdd (
person: NamedNode,
ns: Namespaces
): any {
const application = new NamedNode(nodeName)
const application = new NamedNode(`${person.doc().uri}#${nodeName}`)
return [
st(person, ns.acl('trustedApp'), application, person.doc()),
st(application, ns.acl('origin'), origin, person.doc()),
Expand Down

0 comments on commit c12c272

Please sign in to comment.