Skip to content

Commit 1c8e963

Browse files
authored
JCL-372: Use correct value for revocation status (#502)
1 parent 24c61a3 commit 1c8e963

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
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
@@ -490,7 +490,7 @@ public CompletionStage<Void> revoke(final AccessCredential credential) {
490490

491491
final Map<String, Object> credentialStatus = new HashMap<>();
492492
credentialStatus.put(TYPE, status.getType());
493-
credentialStatus.put("status", Integer.toString(status.getIndex()));
493+
credentialStatus.put("status", "1");
494494

495495
final Map<String, Object> data = new HashMap<>();
496496
data.put("credentialId", credential.getIdentifier());

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ private void setupMocks() {
256256
wireMockServer.stubFor(post(urlEqualTo("/status"))
257257
.atPriority(1)
258258
.withHeader("Authorization", containing("Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9."))
259+
.withRequestBody(containing("\"status\":\"1\""))
259260
.withRequestBody(containing("\"" + wireMockServer.baseUrl() + "/access-grant-1\""))
260261
.willReturn(aResponse()
261262
.withStatus(204)));

0 commit comments

Comments
 (0)