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:
24
src/Scim/Models/ScimListResponse.cs
Normal file
24
src/Scim/Models/ScimListResponse.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user