Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions controller/src/classes/utils/OdrlAccessRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ODRLAccessRequestService {
`${this.authorizationServerURL}/requests`, {
method: 'POST',
headers: {
'authorization': requestingParty,
'authorization': `WebID ${encodeURIComponent(requestingParty)}`,
'content-type': 'text/turtle'
}, body: await this.accessRequestToTtl({
uid: uuid(),
Expand Down Expand Up @@ -68,7 +68,7 @@ export class ODRLAccessRequestService {
`${this.authorizationServerURL}/requests/${encodeURIComponent(accessRequestID)}`, {
method: 'PATCH',
headers: {
'authorization': resourceOwner,
'authorization': `WebID ${encodeURIComponent(resourceOwner)}`,
'content-type': 'application/json'
}, body: JSON.stringify({ status: status })
}
Expand All @@ -87,7 +87,7 @@ export class ODRLAccessRequestService {
`${this.authorizationServerURL}${endpoint}`, {
method: 'GET',
headers: {
'authorization': resourceOwnerOrRequestingPartyID
'authorization': `WebID ${encodeURIComponent(resourceOwnerOrRequestingPartyID)}`
}
}
))
Expand Down
12 changes: 6 additions & 6 deletions controller/src/classes/utils/OdrlPolicyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ODRLPolicyService {
// Get all our policies
const response = await fetch(UMA_URL(this.authorizationServerURL), {
headers: {
"Authorization": webId,
"Authorization": `WebID ${encodeURIComponent(webId)}`,
"Accept": "text/turtle"
}
});
Expand All @@ -46,7 +46,7 @@ export class ODRLPolicyService {
// Get all our policies
const response = await fetch(UMA_URL(this.authorizationServerURL,`/${encodeURIComponent(policyId)}`), {
headers: {
"Authorization": webId,
"Authorization": `WebID ${encodeURIComponent(webId)}`,
"Accept": "text/turtle"
}
});
Expand All @@ -62,7 +62,7 @@ export class ODRLPolicyService {
await fetch(UMA_URL(this.authorizationServerURL), {
method: 'POST',
headers: {
'Authorization': webId,
'Authorization': `WebID ${encodeURIComponent(webId)}`,
'Content-type': 'text/turtle'
// 'Content-type': 'application/sparql-update'
},
Expand All @@ -74,7 +74,7 @@ export class ODRLPolicyService {
await fetch(UMA_URL(this.authorizationServerURL,`/${encodeURIComponent(policyId)}`), {
method: 'PATCH',
headers: {
'Authorization': webId,
'Authorization': `WebID ${encodeURIComponent(webId)}`,
'Content-type': 'application/sparql-update'
},
body: body
Expand Down Expand Up @@ -158,7 +158,7 @@ WHERE {}`)
// 1: Fetch the policy contents
const response = await fetch(UMA_URL(this.authorizationServerURL), {
headers: {
Authorization: webId,
Authorization: `WebID ${encodeURIComponent(webId)}`,
Accept: "text/turtle"
}
});
Expand Down Expand Up @@ -219,7 +219,7 @@ WHERE {}`)
UMA_URL(this.authorizationServerURL, `/${encodeURIComponent(policyId)}`), {
method: "PATCH",
headers: {
"Authorization": webId,
"Authorization": `WebID ${encodeURIComponent(webId)}`,
"Content-type": "application/sparql-update",
},
body: `
Expand Down