61 changed files with 137 additions and 137 deletions
@ -1,13 +1,13 @@
@@ -1,13 +1,13 @@
|
||||
using System; |
||||
using System.Threading; |
||||
using System.Threading.Tasks; |
||||
using Bit.CryptoAgent.Repositories.EntityFramework; |
||||
using Bit.KeyConnector.Repositories.EntityFramework; |
||||
using Microsoft.EntityFrameworkCore; |
||||
using Microsoft.Extensions.DependencyInjection; |
||||
using Microsoft.Extensions.Hosting; |
||||
using Microsoft.Extensions.Logging; |
||||
|
||||
namespace Bit.CryptoAgent.HostedServices |
||||
namespace Bit.KeyConnector.HostedServices |
||||
{ |
||||
public class DatabaseMigrationHostedService : IHostedService, IDisposable |
||||
{ |
||||
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
namespace Bit.CryptoAgent |
||||
namespace Bit.KeyConnector |
||||
{ |
||||
public class CryptoAgentSettings |
||||
public class KeyConnectorSettings |
||||
{ |
||||
public string WebVaultUri { get; set; } |
||||
public string IdentityServerUri { get; set; } |
||||
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
using System; |
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
namespace Bit.CryptoAgent.Migrations.SqlServer |
||||
namespace Bit.KeyConnector.Migrations.SqlServer |
||||
{ |
||||
public partial class InitialCreate : Migration |
||||
{ |
||||
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
using System; |
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
namespace Bit.CryptoAgent.Migrations.Sqlite |
||||
namespace Bit.KeyConnector.Migrations.Sqlite |
||||
{ |
||||
public partial class InitialCreate : Migration |
||||
{ |
||||
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
using System; |
||||
|
||||
namespace Bit.CryptoAgent.Models |
||||
namespace Bit.KeyConnector.Models |
||||
{ |
||||
public interface IStoredItem<TId> where TId : IEquatable<TId> |
||||
{ |
||||
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
using System; |
||||
|
||||
namespace Bit.CryptoAgent.Models |
||||
namespace Bit.KeyConnector.Models |
||||
{ |
||||
public class UserKeyModel : BaseUserKeyModel, IStoredItem<Guid> |
||||
{ |
||||
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
namespace Bit.CryptoAgent.Models |
||||
namespace Bit.KeyConnector.Models |
||||
{ |
||||
public class UserKeyRequestModel |
||||
{ |
||||
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
namespace Bit.CryptoAgent.Models |
||||
namespace Bit.KeyConnector.Models |
||||
{ |
||||
public class UserKeyResponseModel |
||||
{ |
||||
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
using System; |
||||
using Microsoft.Extensions.DependencyInjection; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories.EntityFramework |
||||
namespace Bit.KeyConnector.Repositories.EntityFramework |
||||
{ |
||||
public abstract class BaseRepository |
||||
{ |
||||
@ -1,9 +1,9 @@
@@ -1,9 +1,9 @@
|
||||
using Bit.CryptoAgent.Models; |
||||
using Bit.KeyConnector.Models; |
||||
using Microsoft.Extensions.DependencyInjection; |
||||
using System; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories.EntityFramework |
||||
namespace Bit.KeyConnector.Repositories.EntityFramework |
||||
{ |
||||
public class UserKeyRepository : BaseRepository, IUserKeyRepository |
||||
{ |
||||
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories |
||||
namespace Bit.KeyConnector.Repositories |
||||
{ |
||||
public interface IApplicationDataRepository |
||||
{ |
||||
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories |
||||
namespace Bit.KeyConnector.Repositories |
||||
{ |
||||
public interface IRepository<TItem, TId> |
||||
{ |
||||
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
using Bit.CryptoAgent.Models; |
||||
using Bit.KeyConnector.Models; |
||||
using System; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories |
||||
namespace Bit.KeyConnector.Repositories |
||||
{ |
||||
public interface IUserKeyRepository : IRepository<UserKeyModel, Guid> |
||||
{ |
||||
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
using JsonFlatFileDataStore; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories.JsonFile |
||||
namespace Bit.KeyConnector.Repositories.JsonFile |
||||
{ |
||||
public class ApplicationDataRepository : IApplicationDataRepository |
||||
{ |
||||
@ -1,10 +1,10 @@
@@ -1,10 +1,10 @@
|
||||
using Bit.CryptoAgent.Models; |
||||
using Bit.KeyConnector.Models; |
||||
using JsonFlatFileDataStore; |
||||
using System; |
||||
using System.Linq; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories.JsonFile |
||||
namespace Bit.KeyConnector.Repositories.JsonFile |
||||
{ |
||||
public class Repository<TItem, TId> : IRepository<TItem, TId> |
||||
where TId : IEquatable<TId> |
||||
@ -1,9 +1,9 @@
@@ -1,9 +1,9 @@
|
||||
using Bit.CryptoAgent.Models; |
||||
using Bit.KeyConnector.Models; |
||||
using JsonFlatFileDataStore; |
||||
using System; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories.JsonFile |
||||
namespace Bit.KeyConnector.Repositories.JsonFile |
||||
{ |
||||
public class UserKeyRepository : Repository<UserKeyModel, Guid>, IUserKeyRepository |
||||
{ |
||||
@ -1,10 +1,10 @@
@@ -1,10 +1,10 @@
|
||||
using MongoDB.Driver; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories.Mongo |
||||
namespace Bit.KeyConnector.Repositories.Mongo |
||||
{ |
||||
public abstract class BaseRepository<T> |
||||
{ |
||||
public BaseRepository(CryptoAgentSettings settings, string collectionName) |
||||
public BaseRepository(KeyConnectorSettings settings, string collectionName) |
||||
{ |
||||
Client = new MongoClient(settings.Database.MongoConnectionString); |
||||
Database = Client.GetDatabase(settings.Database.MongoDatabaseName); |
||||
@ -1,13 +1,13 @@
@@ -1,13 +1,13 @@
|
||||
using Bit.CryptoAgent.Models; |
||||
using Bit.KeyConnector.Models; |
||||
using MongoDB.Driver; |
||||
using System; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Repositories.Mongo |
||||
namespace Bit.KeyConnector.Repositories.Mongo |
||||
{ |
||||
public class UserKeyRepository : BaseRepository<UserKeyModel>, IUserKeyRepository |
||||
{ |
||||
public UserKeyRepository(CryptoAgentSettings settings) |
||||
public UserKeyRepository(KeyConnectorSettings settings) |
||||
: base(settings, "UserKey") |
||||
{ } |
||||
|
||||
@ -1,8 +1,8 @@
@@ -1,8 +1,8 @@
|
||||
using Bit.CryptoAgent.Repositories; |
||||
using Bit.KeyConnector.Repositories; |
||||
using System; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Services |
||||
namespace Bit.KeyConnector.Services |
||||
{ |
||||
public class CryptoService : ICryptoService |
||||
{ |
||||
@ -1,13 +1,13 @@
@@ -1,13 +1,13 @@
|
||||
using System.Security.Cryptography.X509Certificates; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Services |
||||
namespace Bit.KeyConnector.Services |
||||
{ |
||||
public class FilesystemCertificateProviderService : ICertificateProviderService |
||||
{ |
||||
private readonly CryptoAgentSettings _settings; |
||||
private readonly KeyConnectorSettings _settings; |
||||
|
||||
public FilesystemCertificateProviderService(CryptoAgentSettings settings) |
||||
public FilesystemCertificateProviderService(KeyConnectorSettings settings) |
||||
{ |
||||
_settings = settings; |
||||
} |
||||
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
using System.Security.Cryptography.X509Certificates; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Services |
||||
namespace Bit.KeyConnector.Services |
||||
{ |
||||
public interface ICertificateProviderService |
||||
{ |
||||
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
using System.Security.Cryptography; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Services |
||||
namespace Bit.KeyConnector.Services |
||||
{ |
||||
public interface ICryptoFunctionService |
||||
{ |
||||
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Services |
||||
namespace Bit.KeyConnector.Services |
||||
{ |
||||
public interface ICryptoService |
||||
{ |
||||
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Services |
||||
namespace Bit.KeyConnector.Services |
||||
{ |
||||
public interface IRsaKeyService |
||||
{ |
||||
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
using System.Security.Cryptography.X509Certificates; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace Bit.CryptoAgent.Services |
||||
namespace Bit.KeyConnector.Services |
||||
{ |
||||
public class LocalCertificateRsaKeyService : IRsaKeyService |
||||
{ |
||||
Loading…
Reference in new issue