-
Notifications
You must be signed in to change notification settings - Fork 128
Endpoint fixes #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoint fixes #30
Conversation
|
Good PR @Ryanmeakins |
4e44638 to
bcc2c89
Compare
5e5cbdb to
dac5c28
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to unblock, since payload matches spec. I think this endpoint also requires Auth (at the moment accessible without auth).
Also, the /Schemas endpoint should list all attributes supported by the endpoint ( see RFC here)
An HTTP GET to the endpoint "/Schemas" SHALL return all supported schemas in ListResponse format
A few attributes are missing from those supported by this scim app. For example for User resource: nickName, timezone, roles, and some subattributes eg in name.
| AttributeScheme nameScheme = new AttributeScheme("name", AttributeDataType.complex, false); | ||
| nameScheme.Description = SampleConstants.DescriptionName; | ||
| nameScheme.AddSubAttribute(FormattedNameAttributeScheme); | ||
| nameScheme.AddSubAttribute(GivenNameAttributeScheme); | ||
| return nameScheme; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Name attribute in this endpoint supports other subattributes (eg FamilyName, HonorificPrefix, HonorificSuffix) but are not added here hence not returned in /Schemas (see here). /Schemas should include all supported attributes / subattributes of the scim endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 the attributes returned should match what the API supports.
41a636e to
045be9c
Compare
|
The latest version of this branch returns an empty "schemas" array when creating a new user. The returned response is as follows (the "schemas" attribute is an empty array). This does not happen with the Master branch, which correctly returns the expected array of "schemas". Reversing the 2 line change in "Microsoft.SystemForCrossDomainIdentityManagement/Schemas/Schematized.cs" seems to fix that issue on my machine, but I am not sure what else that might impact or what the original purpose of that change was. I think the issue is that in the change the "IReadOnlyCollection Schemas" field is being decorated as the DataMember named "Schemas" which returns an empty array when it is serialized into json since I don't think "IReadOnlyCollection" supports serialization. |
@blairno I just confirmed the issue. Thank you for noticing. I have pushed new changes |
- Fix type property's value in atttributes schema to be camelCase
- Add subAttributes to complex types
- Add schemas attribute to Schema resource
- Remove all unused imports
- Put all using statements inside namespace
- Fix typos in the code
- Use expression body where necessary
- Add Authentication
045be9c to
a56c03e
Compare
* Adds returning of sample resource types from the endpoint
* Adds sample schema types support
* fix: Make schema discovery response SCIM compliant
- Fix type property's value in atttributes schema to be camelCase
- Add subAttributes to complex types
- Add schemas attribute to Schema resource
- Remove all unused imports
- Put all using statements inside namespace
- Fix typos in the code
- Use expression body where necessary
- Add Authentication
Co-authored-by: RyanE <v-ryeaki@microsoft.com>
Co-authored-by: Charity Marani <cmarani@microsoft.com>
* Adds returning of sample resource types from the endpoint
* Adds sample schema types support
* fix: Make schema discovery response SCIM compliant
- Fix type property's value in atttributes schema to be camelCase
- Add subAttributes to complex types
- Add schemas attribute to Schema resource
- Remove all unused imports
- Put all using statements inside namespace
- Fix typos in the code
- Use expression body where necessary
- Add Authentication
Co-authored-by: RyanE <v-ryeaki@microsoft.com>
Co-authored-by: Charity Marani <cmarani@microsoft.com>
* Adds returning of sample resource types from the endpoint
* Adds sample schema types support
* fix: Make schema discovery response SCIM compliant
- Fix type property's value in atttributes schema to be camelCase
- Add subAttributes to complex types
- Add schemas attribute to Schema resource
- Remove all unused imports
- Put all using statements inside namespace
- Fix typos in the code
- Use expression body where necessary
- Add Authentication
Co-authored-by: RyanE <v-ryeaki@microsoft.com>
Co-authored-by: Charity Marani <cmarani@microsoft.com>
* Adds returning of sample resource types from the endpoint
* Adds sample schema types support
* fix: Make schema discovery response SCIM compliant
- Fix type property's value in atttributes schema to be camelCase
- Add subAttributes to complex types
- Add schemas attribute to Schema resource
- Remove all unused imports
- Put all using statements inside namespace
- Fix typos in the code
- Use expression body where necessary
- Add Authentication
Co-authored-by: RyanE <v-ryeaki@microsoft.com>
Co-authored-by: Charity Marani <cmarani@microsoft.com>
* Adds returning of sample resource types from the endpoint
* Adds sample schema types support
* fix: Make schema discovery response SCIM compliant
- Fix type property's value in atttributes schema to be camelCase
- Add subAttributes to complex types
- Add schemas attribute to Schema resource
- Remove all unused imports
- Put all using statements inside namespace
- Fix typos in the code
- Use expression body where necessary
- Add Authentication
Co-authored-by: RyanE <v-ryeaki@microsoft.com>
Co-authored-by: Charity Marani <cmarani@microsoft.com>
Co-authored-by: Ryanmeakins <Ryanmeakins@gmail.com>
Co-authored-by: RyanE <v-ryeaki@microsoft.com>
Co-authored-by: Charity Marani <cmarani@microsoft.com>
Problem: The provider base class does not return any values for resource types or schemas. Therefore running the sample as is with the InMemory provider returns empty arrays when calling the endpoints.
Solution: In order to increase the usefulness of the sample provider sample values have been added to the returned collection for Types and Schemas.
Validation: The included Postman tests for endpoint validation.