1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-13 00:58:13 -05:00

move all models into core

This commit is contained in:
Kyle Spearrin 2017-03-08 21:55:08 -05:00
parent bd0c960e9f
commit 8bcd4e0463
60 changed files with 64 additions and 64 deletions

View File

@ -2,7 +2,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Services; using Bit.Core.Services;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;

View File

@ -2,7 +2,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Identity; using Bit.Core.Identity;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Services; using Bit.Core.Services;

View File

@ -4,7 +4,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Services; using Bit.Core.Services;

View File

@ -5,7 +5,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;

View File

@ -5,7 +5,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;

View File

@ -5,7 +5,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Bit.Core.Services; using Bit.Core.Services;

View File

@ -4,7 +4,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Services; using Bit.Core.Services;

View File

@ -4,7 +4,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Services; using Bit.Core.Services;

View File

@ -2,7 +2,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Services; using Bit.Core.Services;
namespace Bit.Api.Controllers namespace Bit.Api.Controllers

View File

@ -4,7 +4,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Api.Models; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Services; using Bit.Core.Services;

View File

@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Api.Models; using Bit.Core.Models.Api;
namespace Bit.Api.Controllers namespace Bit.Api.Controllers
{ {

View File

@ -1,4 +1,4 @@
using Bit.Api.Models.Response; using Bit.Core.Models.Api;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Identity; using Bit.Core.Identity;

View File

@ -1,5 +1,5 @@
using AspNetCoreRateLimit; using AspNetCoreRateLimit;
using Bit.Api.Models.Response; using Bit.Core.Models.Api;
using Bit.Core.Services; using Bit.Core.Services;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;

View File

@ -1,5 +1,5 @@
using System; using System;
using Bit.Api.Models.Response; using Bit.Core.Models.Api;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Filters;
using Bit.Api.Models.Response; using Bit.Core.Models.Api;
using System.Linq; using System.Linq;
namespace Bit.Api.Utilities namespace Bit.Api.Utilities

View File

@ -2,7 +2,7 @@
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class FolderDataModel public class FolderDataModel
{ {

View File

@ -2,7 +2,7 @@
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class LoginDataModel public class LoginDataModel
{ {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class DeleteAccountRequestModel public class DeleteAccountRequestModel
{ {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class EmailRequestModel public class EmailRequestModel
{ {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class EmailTokenRequestModel public class EmailTokenRequestModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class ImportRequestModel public class ImportRequestModel
{ {

View File

@ -1,7 +1,7 @@
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class KeysRequestModel public class KeysRequestModel
{ {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class PasswordHintRequestModel public class PasswordHintRequestModel
{ {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class PasswordRequestModel public class PasswordRequestModel
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class RecoverTwoFactorRequestModel public class RecoverTwoFactorRequestModel
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class RegenerateTwoFactorRequestModel public class RegenerateTwoFactorRequestModel
{ {

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class RegisterRequestModel public class RegisterRequestModel
{ {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class SecurityStampRequestModel public class SecurityStampRequestModel
{ {

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class UpdateProfileRequestModel public class UpdateProfileRequestModel
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class UpdateTwoFactorRequestModel public class UpdateTwoFactorRequestModel
{ {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class AuthTokenRequestModel public class AuthTokenRequestModel
{ {

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class AuthTokenTwoFactorRequestModel public class AuthTokenTwoFactorRequestModel
{ {

View File

@ -1,11 +1,11 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Api.Utilities; using Bit.Core.Utilities;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Bit.Core.Enums; using Bit.Core.Enums;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class CipherRequestModel public class CipherRequestModel
{ {

View File

@ -4,7 +4,7 @@ using Bit.Core.Models.Table;
using Bit.Core.Enums; using Bit.Core.Enums;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class DeviceRequestModel public class DeviceRequestModel
{ {

View File

@ -1,10 +1,10 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Api.Utilities; using Bit.Core.Utilities;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class FolderRequestModel public class FolderRequestModel
{ {

View File

@ -1,10 +1,10 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Api.Utilities; using Bit.Core.Utilities;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class LoginRequestModel public class LoginRequestModel
{ {

View File

@ -3,7 +3,7 @@ using Bit.Core.Enums;
using Bit.Core.Models.Business; using Bit.Core.Models.Business;
using System; using System;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class OrganizationCreateRequestModel public class OrganizationCreateRequestModel
{ {

View File

@ -1,6 +1,6 @@
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class OrganizationUpdateRequestModel public class OrganizationUpdateRequestModel
{ {

View File

@ -1,6 +1,6 @@
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class OrganizationUserInviteRequestModel public class OrganizationUserInviteRequestModel
{ {

View File

@ -1,10 +1,10 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Api.Utilities; using Bit.Core.Utilities;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class SubvaultCreateRequestModel : SubvaultUpdateRequestModel public class SubvaultCreateRequestModel : SubvaultUpdateRequestModel
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using Bit.Core.Enums; using Bit.Core.Enums;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class UpdateDomainsRequestModel public class UpdateDomainsRequestModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class AuthTokenResponseModel : ResponseModel public class AuthTokenResponseModel : ResponseModel
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class CipherHistoryResponseModel : ResponseModel public class CipherHistoryResponseModel : ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class CipherResponseModel : ResponseModel public class CipherResponseModel : ResponseModel
{ {

View File

@ -2,7 +2,7 @@
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Bit.Core.Enums; using Bit.Core.Enums;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class DeviceResponseModel : ResponseModel public class DeviceResponseModel : ResponseModel
{ {

View File

@ -5,7 +5,7 @@ using Newtonsoft.Json;
using Bit.Core.Enums; using Bit.Core.Enums;
using System.Linq; using System.Linq;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class DomainsResponseModel : ResponseModel public class DomainsResponseModel : ResponseModel
{ {

View File

@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace Bit.Api.Models.Response namespace Bit.Core.Models.Api
{ {
public class ErrorResponseModel : ResponseModel public class ErrorResponseModel : ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class FolderResponseModel : ResponseModel public class FolderResponseModel : ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class KeysResponseModel : ResponseModel public class KeysResponseModel : ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class ListResponseModel<T> : ResponseModel where T : ResponseModel public class ListResponseModel<T> : ResponseModel where T : ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class LoginResponseModel : ResponseModel public class LoginResponseModel : ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class OrganizationResponseModel : ResponseModel public class OrganizationResponseModel : ResponseModel
{ {

View File

@ -2,7 +2,7 @@
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class OrganizationUserResponseModel : ResponseModel public class OrganizationUserResponseModel : ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class ProfileOrganizationResponseModel : ResponseModel public class ProfileOrganizationResponseModel : ResponseModel
{ {

View File

@ -5,7 +5,7 @@ using System.Linq;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.Enums; using Bit.Core.Enums;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class ProfileResponseModel : ResponseModel public class ProfileResponseModel : ResponseModel
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public abstract class ResponseModel public abstract class ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class SubvaultResponseModel : ResponseModel public class SubvaultResponseModel : ResponseModel
{ {

View File

@ -2,7 +2,7 @@
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Bit.Core.Enums; using Bit.Core.Enums;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class TwoFactorResponseModel : ResponseModel public class TwoFactorResponseModel : ResponseModel
{ {

View File

@ -2,7 +2,7 @@
using Bit.Core.Models.Table; using Bit.Core.Models.Table;
using Bit.Core.Enums; using Bit.Core.Enums;
namespace Bit.Api.Models namespace Bit.Core.Models.Api
{ {
public class UserKeyResponseModel : ResponseModel public class UserKeyResponseModel : ResponseModel
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Utilities namespace Bit.Core.Utilities
{ {
/// <summary> /// <summary>
/// Validates a string that is in encrypted form: "b64iv=|b64ct=" /// Validates a string that is in encrypted form: "b64iv=|b64ct="