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

Run dotnet format (#1764)

This commit is contained in:
Oscar Hinton
2021-12-16 15:35:09 +01:00
committed by GitHub
parent 61dc65aa59
commit 23b0a1f9df
531 changed files with 3024 additions and 3000 deletions

View File

@ -1,3 +1,3 @@
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Core.Test")]

View File

@ -11,7 +11,7 @@
public const long FileSize501mb = 501L * 1024L * 1024L;
}
public static class TokenPurposes
public static class TokenPurposes
{
public const string LinkSso = "LinkSso";
}

View File

@ -1,4 +1,4 @@
using System;
using System;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
using Bit.Core.Models.Table;

View File

@ -1,4 +1,4 @@
using System;
using System;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Data;

View File

@ -1,16 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Bit.Core.Models.Table;
using Bit.Core.Enums;
using Microsoft.AspNetCore.Http;
using Bit.Core.Repositories;
using System.Threading.Tasks;
using System.Security.Claims;
using System.Threading.Tasks;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Utilities;
using Bit.Core.Models.Data;
using Bit.Core.Models.Table;
using Bit.Core.Repositories;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using Microsoft.AspNetCore.Http;
namespace Bit.Core.Context
{
@ -414,7 +414,7 @@ namespace Bit.Core.Context
}
return Organizations;
}
public async Task<ICollection<CurrentContentProvider>> ProviderMembershipAsync(
IProviderUserRepository providerUserRepository, Guid userId)
{

View File

@ -1,6 +1,6 @@
namespace Bit.Core.Enums
namespace Bit.Core.Enums
{
public static class BitwardenClient
public static class BitwardenClient
{
public const string
Web = "web",

View File

@ -1,9 +1,9 @@
namespace Bit.Core.Enums
namespace Bit.Core.Enums
{
public enum CipherStateAction
{
Restore,
SoftDelete,
HardDelete,
}
public enum CipherStateAction
{
Restore,
SoftDelete,
HardDelete,
}
}

View File

@ -62,7 +62,7 @@
Organization_DisabledKeyConnector = 1607,
Policy_Updated = 1700,
ProviderUser_Invited = 1800,
ProviderUser_Confirmed = 1801,
ProviderUser_Updated = 1802,

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Enums
namespace Bit.Core.Enums
{
public enum FileUploadType
{

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
namespace Bit.Core.Enums
{

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
namespace Bit.Core.Enums
{

View File

@ -1,6 +1,6 @@
namespace Bit.Core.Enums
namespace Bit.Core.Enums
{
public enum SupportedDatabaseProviders
public enum SupportedDatabaseProviders
{
SqlServer,
MySql,

View File

@ -1,11 +1,11 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Models.Table;
using Bit.Core.Enums;
using OtpNet;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
using OtpNet;
namespace Bit.Core.Identity
{

View File

@ -1,13 +1,13 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Models.Table;
using System;
using System.Threading.Tasks;
using Bit.Core.Enums;
using Bit.Core.Utilities.Duo;
using Bit.Core.Models;
using System;
using Microsoft.Extensions.DependencyInjection;
using Bit.Core.Models.Table;
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
{

View File

@ -1,11 +1,11 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Models.Table;
using Bit.Core.Enums;
using Bit.Core.Services;
using Microsoft.Extensions.DependencyInjection;
using Bit.Core.Models;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
namespace Bit.Core.Identity
{

View File

@ -1,9 +1,9 @@
using System.Threading.Tasks;
using Bit.Core.Models.Table;
using Bit.Core.Enums;
using Bit.Core.Utilities.Duo;
using Bit.Core.Models;
using Bit.Core.Models.Table;
using Bit.Core.Settings;
using Bit.Core.Utilities.Duo;
namespace Bit.Core.Identity
{

View File

@ -1,9 +1,9 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Microsoft.AspNetCore.Identity;
namespace Bit.Core.Identity
{

View File

@ -48,7 +48,7 @@ namespace Bit.Core.Identity
{
return Task.FromResult<IdentityUser>(null);
}
return Task.FromResult(new IdentityUser
{
Id = normalizedEmail,

View File

@ -1,8 +1,8 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Models.Table;
using Microsoft.AspNetCore.Identity;
namespace Bit.Core.Identity
{

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Identity;
using Bit.Core.Models.Table;
using Microsoft.Extensions.Options;
using Bit.Core.Models.Table;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
namespace Bit.Core.Identity
{

View File

@ -1,20 +1,20 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Models.Table;
using Bit.Core.Enums;
using Bit.Core.Models;
using Bit.Core.Repositories;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using U2fLib = U2F.Core.Crypto.U2F;
using U2F.Core.Models;
using U2F.Core.Exceptions;
using U2F.Core.Utils;
using System;
using System.Threading.Tasks;
using Bit.Core.Enums;
using Bit.Core.Models;
using Bit.Core.Models.Table;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using U2F.Core.Exceptions;
using U2F.Core.Models;
using U2F.Core.Utils;
using U2fLib = U2F.Core.Crypto.U2F;
namespace Bit.Core.Identity
{

View File

@ -1,12 +1,12 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Context;
using Bit.Core.Models.Table;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Context;
using Bit.Core.Settings;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
namespace Bit.Core.Identity

View File

@ -1,18 +1,18 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Models.Table;
using Bit.Core.Enums;
using Bit.Core.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System;
using System.Threading.Tasks;
using Bit.Core.Enums;
using Bit.Core.Models;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Microsoft.Extensions.DependencyInjection;
using Fido2NetLib.Objects;
using Fido2NetLib;
using Bit.Core.Utilities;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using Fido2NetLib;
using Fido2NetLib.Objects;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
namespace Bit.Core.Identity
{

View File

@ -1,13 +1,13 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Bit.Core.Models.Table;
using Bit.Core.Enums;
using YubicoDotNetClient;
using System;
using System.Linq;
using System.Threading.Tasks;
using Bit.Core.Enums;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Bit.Core.Settings;
using System;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
using YubicoDotNetClient;
namespace Bit.Core.Identity
{

View File

@ -1,7 +1,7 @@
using IdentityServer4.Models;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Bit.Core.Settings;
using IdentityServer4.Models;
namespace Bit.Core.IdentityServer
{

View File

@ -1,6 +1,6 @@
using IdentityModel;
using System.Collections.Generic;
using IdentityModel;
using IdentityServer4.Models;
using System.Collections.Generic;
namespace Bit.Core.IdentityServer
{

View File

@ -1,5 +1,5 @@
using IdentityServer4.Models;
using System.Collections.Generic;
using System.Collections.Generic;
using IdentityServer4.Models;
namespace Bit.Core.IdentityServer
{

View File

@ -1,25 +1,25 @@
using Bit.Core.Models.Table;
using Bit.Core.Enums;
using Bit.Core.Repositories;
using IdentityServer4.Validation;
using Microsoft.AspNetCore.Identity;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Security.Claims;
using System.Text.Json;
using System.Threading.Tasks;
using Bit.Core.Services;
using System.Linq;
using Bit.Core.Models;
using Bit.Core.Identity;
using Bit.Core.Models.Data;
using Bit.Core.Utilities;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
using Microsoft.Extensions.Logging;
using Bit.Core.Models.Api;
using Bit.Core.Context;
using Bit.Core.Enums;
using Bit.Core.Identity;
using Bit.Core.Models;
using Bit.Core.Models.Api;
using Bit.Core.Models.Data;
using Bit.Core.Models.Table;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using IdentityServer4.Validation;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
namespace Bit.Core.IdentityServer
{
@ -319,7 +319,7 @@ namespace Bit.Core.IdentityServer
var orgPolicy = await _policyRepository.GetByOrganizationIdTypeAsync(userOrg.OrganizationId,
PolicyType.RequireSso);
// Owners and Admins are exempt from this policy
if (orgPolicy != null && orgPolicy.Enabled &&
if (orgPolicy != null && orgPolicy.Enabled &&
userOrg.Type != OrganizationUserType.Owner && userOrg.Type != OrganizationUserType.Admin)
{
return false;

View File

@ -1,17 +1,17 @@
using System.Linq;
using IdentityServer4.Stores;
using System.Threading.Tasks;
using IdentityServer4.Models;
using System;
using System.Collections.Generic;
using Bit.Core.Repositories;
using System;
using IdentityModel;
using Bit.Core.Utilities;
using System.Collections.ObjectModel;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Bit.Core.Context;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Context;
using System.Collections.ObjectModel;
using Bit.Core.Utilities;
using IdentityModel;
using IdentityServer4.Models;
using IdentityServer4.Stores;
namespace Bit.Core.IdentityServer
{
@ -45,7 +45,7 @@ namespace Bit.Core.IdentityServer
_userRepository = userRepository;
_globalSettings = globalSettings;
_staticClientStore = staticClientStore;
_licensingService = licensingService;
_licensingService = licensingService;
_currentContext = currentContext;
_organizationUserRepository = organizationUserRepository;
_providerUserRepository = providerUserRepository;
@ -138,11 +138,11 @@ namespace Bit.Core.IdentityServer
var user = await _userRepository.GetByIdAsync(id);
if (user != null)
{
var claims = new Collection<ClientClaim>()
var claims = new Collection<ClientClaim>()
{
new ClientClaim(JwtClaimTypes.Subject, user.Id.ToString()),
new ClientClaim(JwtClaimTypes.AuthenticationMethod, "Application", "external")
};
};
var orgs = await _currentContext.OrganizationMembershipAsync(_organizationUserRepository, user.Id);
var providers = await _currentContext.ProviderMembershipAsync(_providerUserRepository, user.Id);
var isPremium = await _licensingService.ValidateUserPremiumAsync(user);

View File

@ -1,10 +1,10 @@
using System;
using Bit.Core.Settings;
using IdentityServer4.Configuration;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Caching.Redis;
using Microsoft.Extensions.Options;
using Bit.Core.Settings;
namespace Bit.Core.IdentityServer
{

View File

@ -1,21 +1,21 @@
using System;
using Bit.Core.Models.Table;
using Bit.Core.Repositories;
using IdentityServer4.Validation;
using Microsoft.AspNetCore.Identity;
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Context;
using System.Linq;
using System.Security.Claims;
using System.Text.Json;
using System.Threading.Tasks;
using Bit.Core.Context;
using Bit.Core.Identity;
using Bit.Core.Models.Data;
using Microsoft.Extensions.Logging;
using IdentityServer4.Extensions;
using Bit.Core.Models.Table;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using IdentityModel;
using IdentityServer4.Extensions;
using IdentityServer4.Validation;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
namespace Bit.Core.IdentityServer
{
@ -64,7 +64,7 @@ namespace Bit.Core.IdentityServer
protected async override Task<(User, bool)> ValidateContextAsync(CustomTokenRequestValidationContext context)
{
var email = context.Result.ValidatedRequest.Subject?.GetDisplayName()
var email = context.Result.ValidatedRequest.Subject?.GetDisplayName()
?? context.Result.ValidatedRequest.ClientClaims?.FirstOrDefault(claim => claim.Type == JwtClaimTypes.Email)?.Value;
var user = string.IsNullOrWhiteSpace(email) ? null : await _userManager.FindByEmailAsync(email);
return (user, user != null);
@ -94,7 +94,8 @@ namespace Bit.Core.IdentityServer
// Apikey login
if (context.Result.ValidatedRequest.GrantType == "client_credentials")
{
if (user.UsesKeyConnector) {
if (user.UsesKeyConnector)
{
// KeyConnectorUrl is configured in the CLI client, we just need to tell the client to use it
context.Result.CustomResponse["ApiUseKeyConnector"] = true;
context.Result.CustomResponse["ResetMasterPassword"] = false;
@ -129,8 +130,8 @@ namespace Bit.Core.IdentityServer
context.Result.CustomResponse = customResponse;
}
protected override void SetSsoResult(CustomTokenRequestValidationContext context,
Dictionary<string, object> customResponse)
protected override void SetSsoResult(CustomTokenRequestValidationContext context,
Dictionary<string, object> customResponse)
{
context.Result.Error = "invalid_grant";
context.Result.ErrorDescription = "Single Sign on required.";

View File

@ -22,7 +22,7 @@ namespace Bit.Core.IdentityServer
{
var id = Guid.NewGuid().ToString();
var cacheKey = GetKey(key, id);
var expiresUtc = options.Expires ?? DateTimeOffset.UtcNow.AddMinutes(15);
var cacheOptions = new DistributedCacheEntryOptions()
.SetAbsoluteExpiration(expiresUtc);

View File

@ -34,7 +34,7 @@ namespace Bit.Core.IdentityServer
var options = new DistributedCacheEntryOptions();
options.SetAbsoluteExpiration(expiresUtc);
var ticket = TicketSerializer.Default.Serialize(data);
Cache.Set(cacheKey, ticket, options);

View File

@ -1,7 +1,7 @@
using IdentityServer4;
using IdentityServer4.Models;
using System.Collections.Generic;
using System.Collections.Generic;
using Bit.Core.Settings;
using IdentityServer4;
using IdentityServer4.Models;
namespace Bit.Core.IdentityServer
{

View File

@ -1,16 +1,16 @@
using IdentityServer4.Services;
using System.Threading.Tasks;
using IdentityServer4.Models;
using Bit.Core.Repositories;
using Bit.Core.Services;
using System.Security.Claims;
using System;
using System.Collections.Generic;
using System.Linq;
using System;
using IdentityModel;
using Bit.Core.Utilities;
using System.Security.Claims;
using System.Threading.Tasks;
using Bit.Core.Context;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using IdentityModel;
using IdentityServer4.Models;
using IdentityServer4.Services;
namespace Bit.Core.IdentityServer
{

View File

@ -1,16 +1,16 @@
using Bit.Core.Models.Table;
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using Bit.Core.Context;
using Bit.Core.Identity;
using Bit.Core.Models.Table;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using IdentityServer4.Models;
using IdentityServer4.Validation;
using Microsoft.AspNetCore.Identity;
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using Bit.Core.Services;
using Bit.Core.Identity;
using Bit.Core.Context;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using Microsoft.Extensions.Logging;
namespace Bit.Core.IdentityServer

View File

@ -1,8 +1,8 @@
using IdentityServer4.Models;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Bit.Core.Settings;
using Bit.Core.Enums;
using Bit.Core.Settings;
using IdentityServer4.Models;
namespace Bit.Core.IdentityServer
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Http;
using System;
using System;
using System.Linq;
using Microsoft.AspNetCore.Http;
namespace Bit.Core.IdentityServer
{

View File

@ -1,7 +1,7 @@
using Bit.Core.Utilities;
using IdentityServer4.Services;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using IdentityServer4.Services;
namespace Bit.Core.IdentityServer
{

View File

@ -4,12 +4,12 @@ using System.Collections.Specialized;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Bit.Core.Settings;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Quartz;
using Quartz.Impl;
using Quartz.Impl.Matchers;
using Bit.Core.Settings;
namespace Bit.Core.Jobs
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Api
namespace Bit.Core.Models.Api
{
public interface ICaptchaProtectedModel
{

View File

@ -1,5 +1,5 @@
using Bit.Core.Enums;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;
namespace Bit.Core.Models.Api
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using Bit.Core.Enums;
namespace Bit.Core.Models.Api
{

View File

@ -1,5 +1,5 @@
using System.Linq;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace Bit.Core.Models.Api

View File

@ -1,8 +1,8 @@
using Bit.Core.Enums;
using System;
using System.Collections.Generic;
using Bit.Core.Enums;
using Bit.Core.Models.Table;
using Stripe;
using System;
using System.Collections.Generic;
namespace Bit.Core.Models.Business
{

View File

@ -1,11 +1,11 @@
using System;
using System;
namespace Bit.Core.Models.Business
{
public class ExpiringToken
{
public readonly string Token;
public readonly DateTime ExpirationDate;
public readonly string Token;
public readonly DateTime ExpirationDate;
public ExpiringToken(string token, DateTime expirationDate)
{

View File

@ -1,5 +1,5 @@
using Bit.Core.Models.Table;
using System.Collections.Generic;
using System.Collections.Generic;
using Bit.Core.Models.Table;
namespace Bit.Core.Models.Business
{

View File

@ -1,14 +1,14 @@
using Bit.Core.Enums;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Bit.Core.Settings;
using Newtonsoft.Json;
using System;
using System;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Bit.Core.Enums;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Bit.Core.Settings;
using Newtonsoft.Json;
namespace Bit.Core.Models.Business
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Bit.Core.Models.Data;
namespace Bit.Core.Models.Business
@ -11,7 +11,7 @@ namespace Bit.Core.Models.Business
public Permissions Permissions { get; set; }
public IEnumerable<SelectionReadOnly> Collections { get; set; }
public OrganizationUserInvite() {}
public OrganizationUserInvite() { }
public OrganizationUserInvite(OrganizationUserInviteData requestModel)
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Bit.Core.Enums.Provider;

View File

@ -24,7 +24,7 @@ namespace Bit.Core.Models.Business
[JsonConverter(typeof(StringEnumConverter))]
public ReferenceEventType Type { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public ReferenceEventSource Source { get; set; }

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
using Bit.Core.Models.Table;
using Stripe;
using System.Collections.Generic;
namespace Bit.Core.Models.Business
{

View File

@ -1,7 +1,7 @@
using Stripe;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Stripe;
namespace Bit.Core.Models.Business
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Bit.Core.Models.Table;
using Stripe;

View File

@ -1,12 +1,12 @@
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Newtonsoft.Json;
using System;
using System;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Bit.Core.Models.Table;
using Bit.Core.Services;
using Newtonsoft.Json;
namespace Bit.Core.Models.Business
{

View File

@ -1,5 +1,5 @@
using Newtonsoft.Json;
using System;
using System;
using Newtonsoft.Json;
namespace Bit.Core.Models.Data
{

View File

@ -1,6 +1,6 @@
using System;
using Bit.Core.Enums;
using Bit.Core.Context;
using Bit.Core.Enums;
using Bit.Core.Settings;
namespace Bit.Core.Models.Data

View File

@ -143,7 +143,7 @@ namespace Bit.Core.Models.Data
{
return $"OrganizationId={e.OrganizationId}";
}
if (e.ProviderId.HasValue)
{
return $"ProviderId={e.ProviderId}";

View File

@ -1,4 +1,4 @@
using System.Data;
using System.Data;
using Bit.Core.Models.Table;
namespace Bit.Core.Models.Data

View File

@ -15,7 +15,7 @@ namespace Bit.Core.Models.Data
public bool UseEvents { get; set; }
public bool UseTotp { get; set; }
public bool Use2fa { get; set; }
public bool UseApi{ get; set; }
public bool UseApi { get; set; }
public bool UseResetPassword { get; set; }
public bool SelfHost { get; set; }
public bool UsersGetPremium { get; set; }

View File

@ -12,12 +12,12 @@ namespace Bit.Core.Models.Data
{
throw new ArgumentNullException(nameof(orgUser));
}
if (user == null)
{
throw new ArgumentNullException(nameof(user));
}
if (org == null)
{
throw new ArgumentNullException(nameof(org));

View File

@ -1,4 +1,4 @@
using System.Data;
using System.Data;
using Bit.Core.Models.Table;
namespace Bit.Core.Models.Data

View File

@ -1,8 +1,8 @@
using System;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Bit.Core.Models.Data
namespace Bit.Core.Models.Data
{
public class Permissions
{

View File

@ -16,7 +16,7 @@ namespace Bit.Core.Models.Data
public bool UseEvents { get; set; }
public bool UseTotp { get; set; }
public bool Use2fa { get; set; }
public bool UseApi{ get; set; }
public bool UseApi { get; set; }
public bool UseResetPassword { get; set; }
public bool SelfHost { get; set; }
public bool UsersGetPremium { get; set; }

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
namespace Bit.Core.Models.Data
{

View File

@ -95,19 +95,19 @@ namespace Bit.Core.Models.Data
.Where(c => !string.IsNullOrWhiteSpace(c))?
.Select(c => c.Trim()) ??
Array.Empty<string>();
public IEnumerable<string> GetAdditionalUserIdClaimTypes() => AdditionalUserIdClaimTypes?
.Split(',')?
.Where(c => !string.IsNullOrWhiteSpace(c))?
.Select(c => c.Trim()) ??
Array.Empty<string>();
public IEnumerable<string> GetAdditionalEmailClaimTypes() => AdditionalEmailClaimTypes?
.Split(',')?
.Where(c => !string.IsNullOrWhiteSpace(c))?
.Select(c => c.Trim()) ??
Array.Empty<string>();
public IEnumerable<string> GetAdditionalNameClaimTypes() => AdditionalNameClaimTypes?
.Split(',')?
.Where(c => !string.IsNullOrWhiteSpace(c))?

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework
{

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework.Provider
{

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework.Provider
{

View File

@ -1,4 +1,4 @@
using AutoMapper;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework.Provider
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
{
public class FamiliesForEnterpriseOfferExistingAccountViewModel : BaseMailModel
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
{
public class FamiliesForEnterpriseOfferNewAccountViewModel : BaseMailModel
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
namespace Bit.Core.Models.Mail.FamiliesForEnterprise
{
public class FamiliesForEnterpriseSponsorshipRevertingViewModel : BaseMailModel
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
namespace Bit.Core.Models.Mail
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Collections.Generic;
using Bit.Core.Utilities;
using Newtonsoft.Json;
namespace Bit.Core.Models.Mail
{

View File

@ -1,4 +1,4 @@
using System;
using System;
namespace Bit.Core.Models.Mail
{

View File

@ -1,4 +1,4 @@
using System;
using System;
namespace Bit.Core.Models.Mail
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums;
using System;
using System;
using System.Collections.Generic;
using Bit.Core.Enums;
namespace Bit.Core.Models
{
@ -12,7 +12,7 @@ namespace Bit.Core.Models
Payload = payload;
ContextId = contextId;
}
public PushType Type { get; set; }
public T Payload { get; set; }
public string ContextId { get; set; }

View File

@ -1,4 +1,4 @@
using System;
using System;
using Bit.Core.Enums;
using Bit.Core.Models.Data;

View File

@ -1,8 +1,8 @@
using System;
using Bit.Core.Utilities;
using Bit.Core.Models.Data;
using Newtonsoft.Json;
using System.Collections.Generic;
using Bit.Core.Models.Data;
using Bit.Core.Utilities;
using Newtonsoft.Json;
namespace Bit.Core.Models.Table
{

Some files were not shown because too many files have changed in this diff Show More