scim2 icon indicating copy to clipboard operation
scim2 copied to clipboard

Compliance to SCIM 2 section 2.5

Open wwebers opened this issue 6 years ago • 2 comments

The client SDK seem to incorrectly interprete section 2.5 of the core standard, which states:

When a resource is expressed in JSON format, unassigned attributes, although they are defined in schema, MAY be omitted for compactness.

This "MAY" expresses according to RFC2119 that the server implementation is allowed to either omit the attribute or to send an empty value.

However, when talking to servers which return empty attributes, e.g. empty "display" attributes, we get the infamous UnrecognizedPropertyException exception.

wwebers avatar Dec 07 '18 07:12 wwebers

@wwebers, can you please provide an example of the problem? Without further information, it seems more likely that you're deserializing with a POJO that doesn't support a "display" field, hence the UnrecognizedPropertyException.

braveulysses avatar Mar 04 '19 23:03 braveulysses

I'm running a pretty much straight forward request:

    public void getUser() {
        Filter filter = null;
        try {
            filter = Filter.eq("userName", "wwebers");
        } catch (BadRequestException e) {
            e.printStackTrace();
        }
        try {
            ListResponse<UserResource> response = scimService
                    .searchRequest("Users")
                    .filter(filter.toString())
                    .invoke(UserResource.class);
        } catch (ScimException e) {
            e.printStackTrace();
        }
    }

Will say I use the DTOs which are provided by the pingidenity framework. I guess it's also related to my other issue #108

wwebers avatar Apr 05 '19 07:04 wwebers