mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
[PM-1188] Server owner auth migration (#2825)
* [PM-1188] add sso project to auth * [PM-1188] move sso api models to auth * [PM-1188] fix sso api model namespace & imports * [PM-1188] move core files to auth * [PM-1188] fix core sso namespace & models * [PM-1188] move sso repository files to auth * [PM-1188] fix sso repo files namespace & imports * [PM-1188] move sso sql files to auth folder * [PM-1188] move sso test files to auth folders * [PM-1188] fix sso tests namespace & imports * [PM-1188] move auth api files to auth folder * [PM-1188] fix auth api files namespace & imports * [PM-1188] move auth core files to auth folder * [PM-1188] fix auth core files namespace & imports * [PM-1188] move auth email templates to auth folder * [PM-1188] move auth email folder back into shared directory * [PM-1188] fix auth email names * [PM-1188] move auth core models to auth folder * [PM-1188] fix auth model namespace & imports * [PM-1188] add entire Identity project to auth codeowners * [PM-1188] fix auth orm files namespace & imports * [PM-1188] move auth orm files to auth folder * [PM-1188] move auth sql files to auth folder * [PM-1188] move auth tests to auth folder * [PM-1188] fix auth test files namespace & imports * [PM-1188] move emergency access api files to auth folder * [PM-1188] fix emergencyaccess api files namespace & imports * [PM-1188] move emergency access core files to auth folder * [PM-1188] fix emergency access core files namespace & imports * [PM-1188] move emergency access orm files to auth folder * [PM-1188] fix emergency access orm files namespace & imports * [PM-1188] move emergency access sql files to auth folder * [PM-1188] move emergencyaccess test files to auth folder * [PM-1188] fix emergency access test files namespace & imports * [PM-1188] move captcha files to auth folder * [PM-1188] fix captcha files namespace & imports * [PM-1188] move auth admin files into auth folder * [PM-1188] fix admin auth files namespace & imports - configure mvc to look in auth folders for views * [PM-1188] remove extra imports and formatting * [PM-1188] fix ef auth model imports * [PM-1188] fix DatabaseContextModelSnapshot paths * [PM-1188] fix grant import in ef * [PM-1188] update sqlproj * [PM-1188] move missed sqlproj files * [PM-1188] move auth ef models out of auth folder * [PM-1188] fix auth ef models namespace * [PM-1188] remove auth ef models unused imports * [PM-1188] fix imports for auth ef models * [PM-1188] fix more ef model imports * [PM-1188] fix file encodings
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.Entities;
|
||||
namespace Bit.Core.Auth.Entities;
|
||||
|
||||
public class AuthRequest : ITableObject<Guid>
|
||||
{
|
||||
@ -10,7 +12,7 @@ public class AuthRequest : ITableObject<Guid>
|
||||
public Enums.AuthRequestType Type { get; set; }
|
||||
[MaxLength(50)]
|
||||
public string RequestDeviceIdentifier { get; set; }
|
||||
public Enums.DeviceType RequestDeviceType { get; set; }
|
||||
public DeviceType RequestDeviceType { get; set; }
|
||||
[MaxLength(50)]
|
||||
public string RequestIpAddress { get; set; }
|
||||
public Guid? ResponseDeviceId { get; set; }
|
@ -1,8 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.Entities;
|
||||
namespace Bit.Core.Auth.Entities;
|
||||
|
||||
public class EmergencyAccess : ITableObject<Guid>
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Core.Entities;
|
||||
namespace Bit.Core.Auth.Entities;
|
||||
|
||||
public class Grant
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
using Bit.Core.Models.Data;
|
||||
using Bit.Core.Auth.Models.Data;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Entities;
|
||||
namespace Bit.Core.Auth.Entities;
|
||||
|
||||
public class SsoConfig : ITableObject<long>
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Entities;
|
||||
namespace Bit.Core.Auth.Entities;
|
||||
|
||||
public class SsoUser : ITableObject<long>
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Enums;
|
||||
namespace Bit.Core.Auth.Enums;
|
||||
|
||||
public enum AuthRequestType : byte
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Enums;
|
||||
namespace Bit.Core.Auth.Enums;
|
||||
|
||||
public enum EmergencyAccessStatusType : byte
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Enums;
|
||||
namespace Bit.Core.Auth.Enums;
|
||||
|
||||
public enum EmergencyAccessType : byte
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Enums;
|
||||
namespace Bit.Core.Auth.Enums;
|
||||
|
||||
public enum Saml2BindingType : byte
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Enums;
|
||||
namespace Bit.Core.Auth.Enums;
|
||||
|
||||
public enum Saml2NameIdFormat : byte
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Enums;
|
||||
namespace Bit.Core.Auth.Enums;
|
||||
|
||||
public enum Saml2SigningBehavior : byte
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Enums;
|
||||
namespace Bit.Core.Auth.Enums;
|
||||
|
||||
public enum SsoType : byte
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Enums;
|
||||
namespace Bit.Core.Auth.Enums;
|
||||
|
||||
public enum TwoFactorProviderType : byte
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Exceptions;
|
||||
namespace Bit.Core.Auth.Exceptions;
|
||||
|
||||
public class DuplicateAuthRequestException : Exception
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Services;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OtpNet;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class AuthenticatorTokenProvider : IUserTwoFactorTokenProvider<User>
|
||||
{
|
@ -1,13 +1,13 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models;
|
||||
using Bit.Core.Auth.Utilities.Duo;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Services;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Utilities.Duo;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class DuoWebTokenProvider : IUserTwoFactorTokenProvider<User>
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Services;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class EmailTokenProvider : IUserTwoFactorTokenProvider<User>
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public interface IOrganizationTwoFactorTokenProvider
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class LowerInvariantLookupNormalizer : ILookupNormalizer
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models;
|
||||
using Bit.Core.Auth.Utilities.Duo;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Utilities.Duo;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public interface IOrganizationDuoWebTokenProvider : IOrganizationTwoFactorTokenProvider { }
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Bit.Core.Entities;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class RoleStore : IRoleStore<Role>
|
||||
{
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class TwoFactorRememberTokenProvider : DataProtectorTokenProvider<User>
|
||||
{
|
@ -5,7 +5,7 @@ using Bit.Core.Services;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class UserStore :
|
||||
IUserStore<User>,
|
@ -1,7 +1,7 @@
|
||||
using System.Text.Json;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models;
|
||||
using Bit.Core.Services;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Utilities;
|
||||
@ -10,7 +10,7 @@ using Fido2NetLib.Objects;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class WebAuthnTokenProvider : IUserTwoFactorTokenProvider<User>
|
||||
{
|
@ -1,12 +1,12 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Services;
|
||||
using Bit.Core.Settings;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using YubicoDotNetClient;
|
||||
|
||||
namespace Bit.Core.Identity;
|
||||
namespace Bit.Core.Auth.Identity;
|
||||
|
||||
public class YubicoOtpTokenProvider : IUserTwoFactorTokenProvider<User>
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Bit.Core.IdentityServer;
|
||||
namespace Bit.Core.Auth.IdentityServer;
|
||||
|
||||
public static class TokenRetrieval
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using Bit.Core.LoginFeatures.PasswordlessLogin;
|
||||
using Bit.Core.LoginFeatures.PasswordlessLogin.Interfaces;
|
||||
using Bit.Core.Auth.LoginFeatures.PasswordlessLogin;
|
||||
using Bit.Core.Auth.LoginFeatures.PasswordlessLogin.Interfaces;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Bit.Core.LoginFeatures;
|
||||
namespace Bit.Core.Auth.LoginFeatures;
|
||||
|
||||
public static class LoginServiceCollectionExtensions
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.LoginFeatures.PasswordlessLogin.Interfaces;
|
||||
namespace Bit.Core.Auth.LoginFeatures.PasswordlessLogin.Interfaces;
|
||||
|
||||
public interface IVerifyAuthRequestCommand
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using Bit.Core.LoginFeatures.PasswordlessLogin.Interfaces;
|
||||
using Bit.Core.Auth.LoginFeatures.PasswordlessLogin.Interfaces;
|
||||
using Bit.Core.Repositories;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.LoginFeatures.PasswordlessLogin;
|
||||
namespace Bit.Core.Auth.LoginFeatures.PasswordlessLogin;
|
||||
|
||||
public class VerifyAuthRequestCommand : IVerifyAuthRequestCommand
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Models.Api.Request.Accounts;
|
||||
namespace Bit.Core.Auth.Models.Api.Request.Accounts;
|
||||
|
||||
public class KeysRequestModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Core.Models.Api.Request.Accounts;
|
||||
namespace Bit.Core.Auth.Models.Api.Request.Accounts;
|
||||
|
||||
public class PreloginRequestModel
|
||||
{
|
@ -4,7 +4,7 @@ using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.Models.Api.Request.Accounts;
|
||||
namespace Bit.Core.Auth.Models.Api.Request.Accounts;
|
||||
|
||||
public class RegisterRequestModel : IValidatableObject, ICaptchaProtectedModel
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Models.Api;
|
||||
namespace Bit.Core.Auth.Models.Api;
|
||||
|
||||
public interface ICaptchaProtectedModel
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Models.Api.Response.Accounts;
|
||||
namespace Bit.Core.Auth.Models.Api.Response.Accounts;
|
||||
|
||||
public interface ICaptchaProtectedResponseModel
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Core.Models.Api.Response.Accounts;
|
||||
namespace Bit.Core.Auth.Models.Api.Response.Accounts;
|
||||
|
||||
public class PreloginResponseModel
|
||||
{
|
@ -1,4 +1,6 @@
|
||||
namespace Bit.Core.Models.Api.Response.Accounts;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Core.Auth.Models.Api.Response.Accounts;
|
||||
|
||||
public class RegisterResponseModel : ResponseModel, ICaptchaProtectedResponseModel
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Models.Business;
|
||||
namespace Bit.Core.Auth.Models.Business;
|
||||
|
||||
public class CaptchaResponse
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Models.Business;
|
||||
namespace Bit.Core.Auth.Models.Business;
|
||||
|
||||
public class ExpiringToken
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
|
||||
namespace Bit.Core.Models.Business.Tokenables;
|
||||
namespace Bit.Core.Auth.Models.Business.Tokenables;
|
||||
|
||||
public class EmergencyAccessInviteTokenable : Tokens.ExpiringTokenable
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Tokens;
|
||||
|
||||
namespace Bit.Core.Models.Business.Tokenables;
|
||||
namespace Bit.Core.Auth.Models.Business.Tokenables;
|
||||
|
||||
public class HCaptchaTokenable : ExpiringTokenable
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Tokens;
|
||||
|
||||
namespace Bit.Core.Models.Business.Tokenables;
|
||||
namespace Bit.Core.Auth.Models.Business.Tokenables;
|
||||
|
||||
public class SsoTokenable : ExpiringTokenable
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
using Bit.Core.Auth.Entities;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
namespace Bit.Core.Auth.Models.Data;
|
||||
|
||||
public class EmergencyAccessDetails : EmergencyAccess
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
using Bit.Core.Auth.Entities;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
namespace Bit.Core.Auth.Models.Data;
|
||||
|
||||
public class EmergencyAccessNotify : EmergencyAccess
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
using Bit.Core.Vault.Models.Data;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
namespace Bit.Core.Auth.Models.Data;
|
||||
|
||||
public class EmergencyAccessViewData
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
namespace Bit.Core.Auth.Models.Data;
|
||||
|
||||
public class SsoConfigurationData
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Auth.Enums;
|
||||
|
||||
namespace Bit.Core.Models;
|
||||
namespace Bit.Core.Auth.Models;
|
||||
|
||||
public interface ITwoFactorProvidersUser
|
||||
{
|
@ -1,4 +1,6 @@
|
||||
namespace Bit.Core.Models.Mail;
|
||||
using Bit.Core.Models.Mail;
|
||||
|
||||
namespace Bit.Core.Auth.Models.Mail;
|
||||
|
||||
public class FailedAuthAttemptsModel : NewDeviceLoggedInModel
|
||||
{
|
@ -1,4 +1,6 @@
|
||||
namespace Bit.Core.Models.Mail;
|
||||
using Bit.Core.Models.Mail;
|
||||
|
||||
namespace Bit.Core.Auth.Models.Mail;
|
||||
|
||||
public class MasterPasswordHintViewModel : BaseMailModel
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Models.Mail;
|
||||
namespace Bit.Core.Auth.Models.Mail;
|
||||
|
||||
public class PasswordlessSignInModel
|
||||
{
|
@ -1,4 +1,6 @@
|
||||
namespace Bit.Core.Models.Mail;
|
||||
using Bit.Core.Models.Mail;
|
||||
|
||||
namespace Bit.Core.Auth.Models.Mail;
|
||||
|
||||
public class RecoverTwoFactorModel : BaseMailModel
|
||||
{
|
@ -1,4 +1,6 @@
|
||||
namespace Bit.Core.Models.Mail;
|
||||
using Bit.Core.Models.Mail;
|
||||
|
||||
namespace Bit.Core.Auth.Models.Mail;
|
||||
|
||||
public class VerifyDeleteModel : BaseMailModel
|
||||
{
|
@ -1,4 +1,6 @@
|
||||
namespace Bit.Core.Models.Mail;
|
||||
using Bit.Core.Models.Mail;
|
||||
|
||||
namespace Bit.Core.Auth.Models.Mail;
|
||||
|
||||
public class VerifyEmailModel : BaseMailModel
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using System.Text.Json;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Fido2NetLib.Objects;
|
||||
|
||||
namespace Bit.Core.Models;
|
||||
namespace Bit.Core.Auth.Models;
|
||||
|
||||
public class TwoFactorProvider
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
|
@ -1,5 +1,5 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Models.Data;
|
||||
using Bit.Core.Auth.Entities;
|
||||
using Bit.Core.Auth.Models.Data;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
|
@ -1,6 +1,6 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
namespace Bit.Core.Auth.Repositories;
|
||||
|
||||
public interface IGrantRepository
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
using Bit.Core.Repositories;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
namespace Bit.Core.Auth.Repositories;
|
||||
|
||||
public interface ISsoConfigRepository : IRepository<SsoConfig, long>
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
using Bit.Core.Repositories;
|
||||
|
||||
namespace Bit.Core.Repositories;
|
||||
namespace Bit.Core.Auth.Repositories;
|
||||
|
||||
public interface ISsoUserRepository : IRepository<SsoUser, long>
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Auth.Models.Business;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Models.Business;
|
||||
|
||||
namespace Bit.Core.Services;
|
||||
namespace Bit.Core.Auth.Services;
|
||||
|
||||
public interface ICaptchaValidationService
|
||||
{
|
@ -1,9 +1,11 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Data;
|
||||
using Bit.Core.Auth.Entities;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models.Data;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Services;
|
||||
using Bit.Core.Vault.Models.Data;
|
||||
|
||||
namespace Bit.Core.Services;
|
||||
namespace Bit.Core.Auth.Services;
|
||||
|
||||
public interface IEmergencyAccessService
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Services;
|
||||
namespace Bit.Core.Auth.Services;
|
||||
|
||||
public interface ISsoConfigService
|
||||
{
|
@ -1,10 +1,13 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models;
|
||||
using Bit.Core.Auth.Models.Business.Tokenables;
|
||||
using Bit.Core.Auth.Models.Data;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Models;
|
||||
using Bit.Core.Models.Business.Tokenables;
|
||||
using Bit.Core.Models.Data;
|
||||
using Bit.Core.Repositories;
|
||||
using Bit.Core.Services;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Tokens;
|
||||
using Bit.Core.Vault.Models.Data;
|
||||
@ -12,7 +15,7 @@ using Bit.Core.Vault.Repositories;
|
||||
using Bit.Core.Vault.Services;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Bit.Core.Services;
|
||||
namespace Bit.Core.Auth.Services;
|
||||
|
||||
public class EmergencyAccessService : IEmergencyAccessService
|
||||
{
|
@ -1,14 +1,14 @@
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Bit.Core.Auth.Models.Business;
|
||||
using Bit.Core.Auth.Models.Business.Tokenables;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Models.Business;
|
||||
using Bit.Core.Models.Business.Tokenables;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Tokens;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Bit.Core.Services;
|
||||
namespace Bit.Core.Auth.Services;
|
||||
|
||||
public class HCaptchaValidationService : ICaptchaValidationService
|
||||
{
|
@ -1,9 +1,12 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Auth.Entities;
|
||||
using Bit.Core.Auth.Repositories;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Repositories;
|
||||
using Bit.Core.Services;
|
||||
|
||||
namespace Bit.Core.Services;
|
||||
namespace Bit.Core.Auth.Services;
|
||||
|
||||
public class SsoConfigService : ISsoConfigService
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Auth.Models.Business;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Models.Business;
|
||||
|
||||
namespace Bit.Core.Services;
|
||||
namespace Bit.Core.Auth.Services;
|
||||
|
||||
public class NoopCaptchaValidationService : ICaptchaValidationService
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Core.Settings;
|
||||
namespace Bit.Core.Auth.Settings;
|
||||
|
||||
public interface IPasswordlessAuthSettings
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Auth.Models.Api;
|
||||
using Bit.Core.Auth.Services;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Services;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Bit.Core.Utilities;
|
||||
namespace Bit.Core.Auth.Utilities;
|
||||
|
||||
public class CaptchaProtectedAttribute : ActionFilterAttribute
|
||||
{
|
@ -17,7 +17,7 @@ using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using Bit.Core.Models.Api.Response.Duo;
|
||||
|
||||
namespace Bit.Core.Utilities;
|
||||
namespace Bit.Core.Auth.Utilities;
|
||||
|
||||
public class DuoApi
|
||||
{
|
@ -36,7 +36,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Bit.Core.Utilities.Duo;
|
||||
namespace Bit.Core.Auth.Utilities.Duo;
|
||||
|
||||
public static class DuoWeb
|
||||
{
|
@ -1,7 +1,8 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models;
|
||||
using Bit.Core.Models.Business;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json;
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models;
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Bit.Core.Identity;
|
||||
using Bit.Core.Auth.Identity;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user