Skip to content

Commit 18ff7fa

Browse files
committed
Case sensitive '/v2/users' renamed to '/v2/Users'
And also /groups to /Groups
1 parent 8766f5e commit 18ff7fa

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

server/src/main/java/access/provision/ProvisioningServiceDefault.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
@SuppressWarnings("unchecked")
4141
public class ProvisioningServiceDefault implements ProvisioningService {
4242

43-
public final static String USER_API = "users";
44-
public final static String GROUP_API = "groups";
43+
public final static String USER_API = "Users";
44+
public final static String GROUP_API = "Groups";
4545

4646
private static final Log LOG = LogFactory.getLog(ProvisioningServiceDefault.class);
4747

server/src/test/java/access/AbstractTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ protected void stubForManageProviderByEntityID(EntityType entityType, String ent
433433
}
434434

435435
protected void stubForDeleteScimUser() {
436-
stubFor(delete(urlPathMatching("/api/scim/v2/users/(.*)"))
436+
stubFor(delete(urlPathMatching("/api/scim/v2/Users/(.*)"))
437437
.willReturn(aResponse()
438438
.withStatus(201)));
439439
}
@@ -451,15 +451,15 @@ protected void stubForDeleteGraphUser() {
451451
}
452452

453453
protected void stubForDeleteScimRole() {
454-
stubFor(delete(urlPathMatching("/api/scim/v2/groups/(.*)"))
454+
stubFor(delete(urlPathMatching("/api/scim/v2/Groups/(.*)"))
455455
.willReturn(aResponse()
456456
.withStatus(201)));
457457
}
458458

459459
protected String stubForCreateScimRole() throws JsonProcessingException {
460460
String value = UUID.randomUUID().toString();
461461
String body = objectMapper.writeValueAsString(Map.of("id", value));
462-
stubFor(post(urlPathMatching("/api/scim/v2/groups"))
462+
stubFor(post(urlPathMatching("/api/scim/v2/Groups"))
463463
.willReturn(aResponse()
464464
.withHeader("Content-Type", "application/json")
465465
.withBody(body)));
@@ -473,7 +473,7 @@ protected String stubForCreateScimUser() throws JsonProcessingException {
473473

474474
protected String stubForCreateScimUser(String idValue) throws JsonProcessingException {
475475
String body = objectMapper.writeValueAsString(Map.of("id", idValue));
476-
stubFor(post(urlPathMatching("/api/scim/v2/users"))
476+
stubFor(post(urlPathMatching("/api/scim/v2/Users"))
477477
.willReturn(aResponse()
478478
.withHeader("Content-Type", "application/json")
479479
.withBody(body)));
@@ -512,7 +512,7 @@ protected String stubForCreateGraphUser() throws JsonProcessingException {
512512
}
513513

514514
protected void stubForUpdateScimUser() {
515-
stubFor(put(urlPathMatching("/api/scim/v2/users/(.*)"))
515+
stubFor(put(urlPathMatching("/api/scim/v2/Users/(.*)"))
516516
.willReturn(aResponse()
517517
.withHeader("Content-Type", "application/json")
518518
));
@@ -536,14 +536,14 @@ protected void stubForUpdateGraphUser(String sub) throws JsonProcessingException
536536
}
537537

538538
protected void stubForUpdateScimRole() {
539-
stubFor(put(urlPathMatching("/api/scim/v2/groups/(.*)"))
539+
stubFor(put(urlPathMatching("/api/scim/v2/Groups/(.*)"))
540540
.willReturn(aResponse()
541541
.withHeader("Content-Type", "application/json")
542542
));
543543
}
544544

545545
protected void stubForUpdateScimRolePatch() {
546-
stubFor(patch(urlPathMatching(String.format("/api/scim/v2/groups/(.*)")))
546+
stubFor(patch(urlPathMatching(String.format("/api/scim/v2/Groups/(.*)")))
547547
.willReturn(aResponse()
548548
.withHeader("Content-Type", "application/json")
549549
));

server/src/test/java/access/api/InvitationControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ void acceptPatchForDifferentScimIdentifier() throws Exception {
497497
.then()
498498
.statusCode(201);
499499
//Now assert the correct scim_identifier was used
500-
List<LoggedRequest> requests = findAll(postRequestedFor(urlPathMatching("/api/scim/v2/users")));
500+
List<LoggedRequest> requests = findAll(postRequestedFor(urlPathMatching("/api/scim/v2/Users")));
501501
assertEquals(1, requests.size());
502502

503503
Map<String, Object> request = objectMapper.readValue(requests.get(0).getBodyAsString(), new TypeReference<>() {

server/src/test/java/access/api/UserControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ void meUpdateScim() throws Exception {
568568
//This will trigger the SCIM update request, see CustomOidcUserService#loadUser
569569
openIDConnectFlow("/api/v1/users/login", GUEST_SUB);
570570

571-
List<LoggedRequest> loggedRequests = findAll(putRequestedFor(urlPathMatching("/api/scim/v2/users/(.*)")));
571+
List<LoggedRequest> loggedRequests = findAll(putRequestedFor(urlPathMatching("/api/scim/v2/Users/(.*)")));
572572

573573
assertEquals(1, loggedRequests.size());
574574
Map<String, Object> userRequest = objectMapper.readValue(loggedRequests.get(0).getBodyAsString(), Map.class);

server/src/test/java/access/provision/ProvisioningServiceDefaultTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void updateUserRequest() throws JsonProcessingException {
7272
this.stubForManageProvisioning(List.of("1", "4", "5"));
7373
this.stubForUpdateScimUser();
7474
provisioningService.updateUserRequest(user);
75-
List<LoggedRequest> loggedRequests = findAll(putRequestedFor(urlPathMatching(String.format("/api/scim/v2/users/(.*)"))));
75+
List<LoggedRequest> loggedRequests = findAll(putRequestedFor(urlPathMatching(String.format("/api/scim/v2/Users/(.*)"))));
7676

7777
assertEquals(1, loggedRequests.size());
7878
Map<String, Object> userRequest = objectMapper.readValue(loggedRequests.get(0).getBodyAsString(), Map.class);

0 commit comments

Comments
 (0)