scim icon indicating copy to clipboard operation
scim copied to clipboard

Expose `SetRequired(bool)` method of CoreAttributes in CoreUserSchema

Open springroll12 opened this issue 1 year ago • 0 comments

The core value in this library is that it provides pre-built endpoints and schema attributes to use to build a SCIM API.

It would be nice to be able to pick and choose which attributes from CoreUserSchema are required for a particular implementation and re-use these Attribute definitions. However without being able to specify which fields are required for the backing identity provider, this is not feasible.

As far as I can tell there is no way to re-use say the "email" Attribute defined below if we need it to be required. It seems to be necessary to recreate the entire Attribute definition, making CoreUserSchema() somewhat pointless unless you're using the default schema.

https://github.com/elimity-com/scim/blob/master/schema/schemas.go#L301

Is it a mis-use of the Attribute definitions to deviate from the required set of attributes (userName) in the User schema specification, or should we be allowed to modify these?

springroll12 avatar Sep 05 '24 19:09 springroll12