mirror of
https://github.com/bitwarden/server.git
synced 2025-04-12 08:38:13 -05:00
move all models into core
This commit is contained in:
parent
bd0c960e9f
commit
8bcd4e0463
@ -2,7 +2,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Services;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Identity;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Services;
|
||||
|
@ -4,7 +4,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Repositories;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Services;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Repositories;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Models.Table;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Repositories;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Models.Table;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Repositories;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Services;
|
||||
|
@ -4,7 +4,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Repositories;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Services;
|
||||
|
||||
|
@ -4,7 +4,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Repositories;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Services;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Services;
|
||||
|
||||
namespace Bit.Api.Controllers
|
||||
|
@ -4,7 +4,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Repositories;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Services;
|
||||
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Repositories;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Api.Controllers
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Bit.Api.Models.Response;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Identity;
|
||||
|
@ -1,5 +1,5 @@
|
||||
using AspNetCoreRateLimit;
|
||||
using Bit.Api.Models.Response;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Bit.Api.Models.Response;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Exceptions;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Bit.Api.Models.Response;
|
||||
using Bit.Core.Models.Api;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bit.Api.Utilities
|
||||
|
@ -2,7 +2,7 @@
|
||||
using Bit.Core.Models.Table;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class FolderDataModel
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Bit.Core.Models.Table;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class LoginDataModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class DeleteAccountRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class EmailRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class EmailTokenRequestModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class ImportRequestModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using Bit.Core.Models.Table;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class KeysRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class PasswordHintRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class PasswordRequestModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class RecoverTwoFactorRequestModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class RegenerateTwoFactorRequestModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class RegisterRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class SecurityStampRequestModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class UpdateProfileRequestModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class UpdateTwoFactorRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class AuthTokenRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class AuthTokenTwoFactorRequestModel
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Api.Utilities;
|
||||
using Bit.Core.Utilities;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Enums;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class CipherRequestModel
|
||||
{
|
@ -4,7 +4,7 @@ using Bit.Core.Models.Table;
|
||||
using Bit.Core.Enums;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class DeviceRequestModel
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Api.Utilities;
|
||||
using Bit.Core.Utilities;
|
||||
using Bit.Core.Models.Table;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class FolderRequestModel
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Api.Utilities;
|
||||
using Bit.Core.Utilities;
|
||||
using Bit.Core.Models.Table;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class LoginRequestModel
|
||||
{
|
@ -3,7 +3,7 @@ using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Business;
|
||||
using System;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class OrganizationCreateRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class OrganizationUpdateRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class OrganizationUserInviteRequestModel
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Api.Utilities;
|
||||
using Bit.Core.Utilities;
|
||||
using Bit.Core.Models.Table;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class SubvaultCreateRequestModel : SubvaultUpdateRequestModel
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using Bit.Core.Enums;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class UpdateDomainsRequestModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class AuthTokenResponseModel : ResponseModel
|
||||
{
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class CipherHistoryResponseModel : ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class CipherResponseModel : ResponseModel
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class DeviceResponseModel : ResponseModel
|
||||
{
|
@ -5,7 +5,7 @@ using Newtonsoft.Json;
|
||||
using Bit.Core.Enums;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class DomainsResponseModel : ResponseModel
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
|
||||
namespace Bit.Api.Models.Response
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class ErrorResponseModel : ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class FolderResponseModel : ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class KeysResponseModel : ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class ListResponseModel<T> : ResponseModel where T : ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class LoginResponseModel : ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class OrganizationResponseModel : ResponseModel
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class OrganizationUserResponseModel : ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class ProfileOrganizationResponseModel : ResponseModel
|
||||
{
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using Bit.Core.Models.Data;
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class ProfileResponseModel : ResponseModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public abstract class ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class SubvaultResponseModel : ResponseModel
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class TwoFactorResponseModel : ResponseModel
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class UserKeyResponseModel : ResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Utilities
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// Validates a string that is in encrypted form: "b64iv=|b64ct="
|
Loading…
x
Reference in New Issue
Block a user