Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Microsoft.SCIM.WebHostSample/Resources/SampleResourceTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
namespace Microsoft.SCIM.WebHostSample.Resources
{
using System;

using System.Collections.Generic;

public class SampleResourceTypes
{
public static Core2ResourceType UserResourceType
Expand All @@ -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<Core2SchemaExtensions>() {
new Core2SchemaExtensions()
{
Schema = SampleConstants.UserEnterpriseSchema,
Required = false
}
}
};

return userResource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -97,4 +98,4 @@ public static class AttributeNames
public const string Version = "version";
public const string Watermark = "watermark";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Microsoft.SCIM
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

[DataContract]
Expand Down Expand Up @@ -57,6 +58,13 @@ public string Schema
set;
}

[DataMember(Name = AttributeNames.SchemaExtensions)]
public List<Core2SchemaExtensions> SchemaExtensions
{
get;
set;
}

private void InitializeEndpoint(string value)
{
if (string.IsNullOrWhiteSpace(value))
Expand Down Expand Up @@ -85,4 +93,4 @@ private void OnSerializing(StreamingContext context)
this.name = this.Identifier;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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;
}
}
}