diff --git a/Microsoft.SCIM.WebHostSample/Resources/SampleResourceTypes.cs b/Microsoft.SCIM.WebHostSample/Resources/SampleResourceTypes.cs index 0524102f..589e9263 100644 --- a/Microsoft.SCIM.WebHostSample/Resources/SampleResourceTypes.cs +++ b/Microsoft.SCIM.WebHostSample/Resources/SampleResourceTypes.cs @@ -3,7 +3,8 @@ namespace Microsoft.SCIM.WebHostSample.Resources { using System; - + using System.Collections.Generic; + public class SampleResourceTypes { public static Core2ResourceType UserResourceType @@ -14,7 +15,14 @@ public static Core2ResourceType UserResourceType { Identifier = Types.User, Endpoint = new Uri($"{SampleConstants.SampleScimEndpoint}/Users"), - Schema = SampleConstants.UserEnterpriseSchema + Schema = $"{SampleConstants.Core2SchemaPrefix}{Types.User}", + SchemaExtensions = new List() { + new Core2SchemaExtensions() + { + Schema = SampleConstants.UserEnterpriseSchema, + Required = false + } + } }; return userResource; diff --git a/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/AttributeNames.cs b/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/AttributeNames.cs index de302fff..ed35475d 100644 --- a/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/AttributeNames.cs +++ b/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/AttributeNames.cs @@ -80,6 +80,7 @@ public static class AttributeNames public const string ResourceType = "resourceType"; public const string Returned = "returned"; public const string Schema = "schema"; + public const string SchemaExtensions = "schemaExtensions"; public const string Schemas = "schemas"; public const string SecurityEnabled = "securityEnabled"; public const string Sort = "sort"; @@ -97,4 +98,4 @@ public static class AttributeNames public const string Version = "version"; public const string Watermark = "watermark"; } -} \ No newline at end of file +} diff --git a/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/Core2ResourceType.cs b/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/Core2ResourceType.cs index d5c8c89e..56952b4a 100644 --- a/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/Core2ResourceType.cs +++ b/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/Core2ResourceType.cs @@ -5,6 +5,7 @@ namespace Microsoft.SCIM { using System; + using System.Collections.Generic; using System.Runtime.Serialization; [DataContract] @@ -57,6 +58,13 @@ public string Schema set; } + [DataMember(Name = AttributeNames.SchemaExtensions)] + public List SchemaExtensions + { + get; + set; + } + private void InitializeEndpoint(string value) { if (string.IsNullOrWhiteSpace(value)) @@ -85,4 +93,4 @@ private void OnSerializing(StreamingContext context) this.name = this.Identifier; } } -} \ No newline at end of file +} diff --git a/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/Core2SchemaExtensions.cs b/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/Core2SchemaExtensions.cs new file mode 100644 index 00000000..e08604ea --- /dev/null +++ b/Microsoft.SystemForCrossDomainIdentityManagement/Schemas/Core2SchemaExtensions.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.SCIM +{ + using System; + using System.Runtime.Serialization; + + [DataContract] + public sealed class Core2SchemaExtensions + { + [DataMember(Name = AttributeNames.Schema, Order = 0)] + public string Schema + { + get; + set; + } + + [DataMember(Name = AttributeNames.Required, Order = 1)] + public bool Required + { + get; + set; + } + } +}