mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
Move remaining OrganizationAuth files to AC Team code ownership (#3382)
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Api.AdminConsole.Models.Request;
|
||||
|
||||
public class AdminAuthRequestUpdateRequestModel
|
||||
{
|
||||
[EncryptedString]
|
||||
public string EncryptedUserKey { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool RequestApproved { get; set; }
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace Bit.Api.AdminConsole.Models.Request;
|
||||
|
||||
public class BulkDenyAdminAuthRequestRequestModel
|
||||
{
|
||||
public IEnumerable<Guid> Ids { get; set; }
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Reflection;
|
||||
using Bit.Core.Auth.Models.Data;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Api.AdminConsole.Models.Response;
|
||||
|
||||
public class PendingOrganizationAuthRequestResponseModel : ResponseModel
|
||||
{
|
||||
public PendingOrganizationAuthRequestResponseModel(OrganizationAdminAuthRequest authRequest, string obj = "pending-org-auth-request") : base(obj)
|
||||
{
|
||||
if (authRequest == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(authRequest));
|
||||
}
|
||||
|
||||
Id = authRequest.Id;
|
||||
UserId = authRequest.UserId;
|
||||
OrganizationUserId = authRequest.OrganizationUserId;
|
||||
Email = authRequest.Email;
|
||||
PublicKey = authRequest.PublicKey;
|
||||
RequestDeviceIdentifier = authRequest.RequestDeviceIdentifier;
|
||||
RequestDeviceType = authRequest.RequestDeviceType.GetType().GetMember(authRequest.RequestDeviceType.ToString())
|
||||
.FirstOrDefault()?.GetCustomAttribute<DisplayAttribute>()?.GetName();
|
||||
RequestIpAddress = authRequest.RequestIpAddress;
|
||||
CreationDate = authRequest.CreationDate;
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public Guid OrganizationUserId { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string PublicKey { get; set; }
|
||||
public string RequestDeviceIdentifier { get; set; }
|
||||
public string RequestDeviceType { get; set; }
|
||||
public string RequestIpAddress { get; set; }
|
||||
public DateTime CreationDate { get; set; }
|
||||
}
|
Reference in New Issue
Block a user