1
0
mirror of https://github.com/bitwarden/server synced 2025-12-19 01:33:20 +00:00

stub out new scim api for dir sync

This commit is contained in:
Kyle Spearrin
2017-12-12 13:21:15 -05:00
parent 3d05c9208f
commit 7b359053d6
26 changed files with 802 additions and 14 deletions

View File

@@ -0,0 +1,24 @@
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
namespace Bit.Scim.Models
{
public class ScimListResponse : ScimSchemaBase
{
public ScimListResponse(IEnumerable<ScimResource> resources)
{
Resources = resources;
}
public override string SchemaIdentifier => Constants.Messages.ListResponse;
[JsonProperty("totalResults", Order = 0)]
public int TotalResults => Resources == null ? 0 : Resources.Count();
[JsonProperty("Resources", Order = 1)]
public IEnumerable<ScimResource> Resources { get; private set; }
[JsonProperty("startIndex", Order = 2)]
public int StartIndex { get; set; } = 0;
[JsonProperty("itemsPerPage", Order = 3)]
public int ItemsPerPage => Resources == null ? 0 : Resources.Count();
}
}