Skip to content

Commit 55edf7e

Browse files
committed
Use correct identifier for access grant revocation
1 parent fc0ec90 commit 55edf7e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

access-grant/src/main/java/com/inrupt/client/accessgrant/AccessGrantClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public CompletionStage<Void> revoke(final AccessGrant accessGrant) {
298298
credentialStatus.put("status", Integer.toString(status.getIndex()));
299299

300300
final Map<String, Object> data = new HashMap<>();
301-
data.put("credentialId", status.getIdentifier());
301+
data.put("credentialId", accessGrant.getIdentifier());
302302
data.put("credentialStatus", Arrays.asList(credentialStatus));
303303

304304
final Request req = Request.newBuilder(metadata.statusEndpoint)

access-grant/src/test/java/com/inrupt/client/accessgrant/MockAccessGrantServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ private void setupMocks() {
180180
wireMockServer.stubFor(post(urlEqualTo("/status"))
181181
.atPriority(1)
182182
.withHeader("Authorization", containing("Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9."))
183-
.withRequestBody(containing("\"https://accessgrant.example/status/CVAM#2832\""))
183+
.withRequestBody(containing("\"" + wireMockServer.baseUrl() + "/access-grant-1\""))
184184
.willReturn(aResponse()
185185
.withStatus(204)));
186186

187187
wireMockServer.stubFor(post(urlEqualTo("/status"))
188188
.atPriority(1)
189189
.withHeader("Authorization", containing("Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9."))
190-
.withRequestBody(containing("\"https://accessgrant.example/status/CVAM#2833\""))
190+
.withRequestBody(containing("\"" + wireMockServer.baseUrl() + "/access-grant-2\""))
191191
.willReturn(aResponse()
192192
.withStatus(403)));
193193

0 commit comments

Comments
 (0)