PowerDMS / Owin.Scim

OWIN SCIM 1.1 & 2.0 implementation for .NET
MIT License
63 stars 29 forks source link

Owin.Scim should not touch meta.Created and meta.LastUpdated #30

Open chihoyeung opened 8 years ago

chihoyeung commented 8 years ago

(disclaimer: I wrote the original code that populated those values in UserService)

I think we should remove any code from inside Owin.Scim that populates these two fields, they should be the responsibility of the application server. In my particular case, the application server does not even persist creation/modify date for users, thus I want to return null - I do not see anything in the spec saying they are required.

Just wanted to put it out there for discussion before I go remove that code.

dgioulakis commented 8 years ago

I think most implementors would rather this metadata be filled via business logic. It's their choice whether to persist it. Since no part of Resource.Meta is used during calculation of resource versioning, I wouldn't consider this an issue or design flaw.

chihoyeung commented 8 years ago

I see two things I need:

  1. We need to modify Meta.Created and Meta.LastModified to nullable DateTime.
  2. We need to modify UserService and GroupService (in Owin.Scim) to not automatically populate these properties (since I don't persist them in the application server, I don't want to give any impression they exist at all)