Class MsAzurePatchRemoveRebuilder
java.lang.Object
de.captaingoldfish.scim.sdk.server.patch.msazure.MsAzurePatchRemoveRebuilder
This class is a workaround handler in order to handle the broken patch requests of Microsoft Azure. Azure
sends illegal patch-remove requests that look 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
ConstructorsConstructorDescriptionMsAzurePatchRemoveRebuilder(PatchOp patchOp, String path, List<String> values) -
Method Summary
-
Constructor Details
-
MsAzurePatchRemoveRebuilder
-
-
Method Details
-
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
-