1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

DAL & CRUD for SSO

This commit is contained in:
Matt Portune
2020-06-25 16:42:29 -04:00
parent b7154f017f
commit 39a81af3e9
14 changed files with 407 additions and 2 deletions

View File

@ -0,0 +1,12 @@
using System;
namespace Bit.Core.Models.Api
{
public class SsoConfigRequestModel
{
public long Id { get; set; }
public bool Enabled { get; set; }
public Guid OrganizationId { get; set; }
public string Data { get; set; }
}
}

View File

@ -0,0 +1,27 @@
using System;
using Bit.Core.Models.Table;
namespace Bit.Core.Models.Api
{
public class SsoConfigResponseModel : ResponseModel
{
public SsoConfigResponseModel(SsoConfig ssoConfig, string obj = "ssoconfig")
: base(obj)
{
if (ssoConfig == null)
{
throw new ArgumentNullException(nameof(ssoConfig));
}
Id = ssoConfig.Id;
Enabled = ssoConfig.Enabled;
OrganizationId = ssoConfig.OrganizationId;
Data = ssoConfig.Data;
}
public long Id { get; set; }
public bool Enabled { get; set; }
public Guid OrganizationId { get; set; }
public string Data { get; set; }
}
}

View File

@ -12,6 +12,7 @@ namespace Bit.Core.Models.Table
private Dictionary<TwoFactorProviderType, TwoFactorProvider> _twoFactorProviders;
public Guid Id { get; set; }
public string Identifier { get; set; }
public string Name { get; set; }
public string BusinessName { get; set; }
public string BusinessAddress1 { get; set; }

View File

@ -0,0 +1,14 @@
using System;
namespace Bit.Core.Models.Table
{
public class SsoConfig
{
public long Id { get; set; }
public bool Enabled { get; set; } = true;
public Guid OrganizationId { get; set; }
public string Data { get; set; }
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
}
}