Class MsAzurePatchRemoveWorkaroundHandler
- java.lang.Object
-
- de.captaingoldfish.scim.sdk.server.patch.MsAzurePatchRemoveWorkaroundHandler
-
public final class MsAzurePatchRemoveWorkaroundHandler extends Object
This class is a workaround handler in order to handle the broken patch requests of Microsoft Azure. Azure sends illegal patch-remove requests that looks as follows:PATCH /scim/Groups/2752513 { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op": "Remove", "path": "members", "value": [ { "value": "2392066" } ] } ] }the value in the request must not be present. Instead the request should look like this:PATCH /scim/Groups/2752513 { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op": "Remove", "path": "members[value eq \"2392066\"]" } ] }This class will try its best to fix the bad request and turn it into a valid request- Since:
- 07.06.2021
- Author:
- Pascal Knueppel
-
-
Constructor Summary
Constructors Constructor Description MsAzurePatchRemoveWorkaroundHandler(PatchOp patchOp, String path, List<String> values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringfixPath()tries to build a valid path operation from the illegal Azure request.
-
-
-
Method Detail
-
fixPath
public String fixPath()
tries to build a valid path operation from the illegal Azure request. If a new path is created it will also clear thevalueslist in order to bypass the validation successfully- Returns:
- the original path if the request not illegal or the path could not be fixed or a new fixed path
-
-