problem with getMembers() method in Groups
Closed this issue · 1 comments
RFC7643 describes the member attribute as follows
members
A list of members of the Group. While values MAY be added or
removed, sub-attributes of members are "immutable". The "value"
sub-attribute contains the value of an "id" attribute of a SCIM
resource, and the "$ref" sub-attribute must be the URI of a SCIM
resource such as a "User", or a "Group". The intention of the
"Group" type is to allow the service provider to support nested
groups. Service providers MAY require clients to provide a
non-empty value by setting the "required" attribute characteristic
of a sub-attribute of the "members" attribute in the "Group"
resource schema.
the problem in charon is that when the getMembers() method is called only a list with the values will be returned leaving the developer in the dark if the ID reference is another group, a user or any other resource.
It is possible to validate it by hand by using the method getAttributeList() but a helper sub-class in the groups class would be helpful here resolving the different values into member-objects.
just noticed that changing this would bring either a short unpleasant change into the library or some significant changes would have to be made.