SAP / scimono

SAP SCIMono is a java reference implementation of the SCIM 2.0 industry standard for identity management. For more information about the specification visit: http://www.simplecloud.info
Apache License 2.0
27 stars 37 forks source link

How to parse the String filter? #72

Open ghost opened 4 years ago

ghost commented 4 years ago

Hello guys,

is there an example how to use the QueryFilterParser for the String filter?

many thanks in advance

karaimin commented 4 years ago

Hi @tihefrequi , QueryFilterParser is based on antlr. It executes antr visitors according against the scim query string. More information about what is antlr you can find here Depending on what you want to validate, you can write your own filter visitor. Scimono has implementation of such validators that are used for different scenarios. For example Patch request validation uses such validation for the path attribute.

You can find examples in the unit tests. (e.g ValuePathAttributesValidationVisitorTest)