mirror of
https://github.com/bitwarden/server.git
synced 2025-05-30 15:50:33 -05:00
rename to push notification service
This commit is contained in:
parent
c95d39f563
commit
887fe4fc05
@ -4,7 +4,7 @@ using Bit.Core.Models.Table;
|
|||||||
|
|
||||||
namespace Bit.Core.Services
|
namespace Bit.Core.Services
|
||||||
{
|
{
|
||||||
public interface IPushService
|
public interface IPushNotificationService
|
||||||
{
|
{
|
||||||
Task PushSyncCipherCreateAsync(Cipher cipher);
|
Task PushSyncCipherCreateAsync(Cipher cipher);
|
||||||
Task PushSyncCipherUpdateAsync(Cipher cipher);
|
Task PushSyncCipherUpdateAsync(Cipher cipher);
|
@ -17,7 +17,7 @@ namespace Bit.Core.Services
|
|||||||
private readonly IOrganizationRepository _organizationRepository;
|
private readonly IOrganizationRepository _organizationRepository;
|
||||||
private readonly IOrganizationUserRepository _organizationUserRepository;
|
private readonly IOrganizationUserRepository _organizationUserRepository;
|
||||||
private readonly ICollectionCipherRepository _collectionCipherRepository;
|
private readonly ICollectionCipherRepository _collectionCipherRepository;
|
||||||
private readonly IPushService _pushService;
|
private readonly IPushNotificationService _pushService;
|
||||||
|
|
||||||
public CipherService(
|
public CipherService(
|
||||||
ICipherRepository cipherRepository,
|
ICipherRepository cipherRepository,
|
||||||
@ -26,7 +26,7 @@ namespace Bit.Core.Services
|
|||||||
IOrganizationRepository organizationRepository,
|
IOrganizationRepository organizationRepository,
|
||||||
IOrganizationUserRepository organizationUserRepository,
|
IOrganizationUserRepository organizationUserRepository,
|
||||||
ICollectionCipherRepository collectionCipherRepository,
|
ICollectionCipherRepository collectionCipherRepository,
|
||||||
IPushService pushService)
|
IPushNotificationService pushService)
|
||||||
{
|
{
|
||||||
_cipherRepository = cipherRepository;
|
_cipherRepository = cipherRepository;
|
||||||
_folderRepository = folderRepository;
|
_folderRepository = folderRepository;
|
||||||
|
@ -24,7 +24,7 @@ namespace Bit.Core.Services
|
|||||||
private readonly IGroupRepository _groupRepository;
|
private readonly IGroupRepository _groupRepository;
|
||||||
private readonly IDataProtector _dataProtector;
|
private readonly IDataProtector _dataProtector;
|
||||||
private readonly IMailService _mailService;
|
private readonly IMailService _mailService;
|
||||||
private readonly IPushService _pushService;
|
private readonly IPushNotificationService _pushService;
|
||||||
|
|
||||||
public OrganizationService(
|
public OrganizationService(
|
||||||
IOrganizationRepository organizationRepository,
|
IOrganizationRepository organizationRepository,
|
||||||
@ -34,7 +34,7 @@ namespace Bit.Core.Services
|
|||||||
IGroupRepository groupRepository,
|
IGroupRepository groupRepository,
|
||||||
IDataProtectionProvider dataProtectionProvider,
|
IDataProtectionProvider dataProtectionProvider,
|
||||||
IMailService mailService,
|
IMailService mailService,
|
||||||
IPushService pushService)
|
IPushNotificationService pushService)
|
||||||
{
|
{
|
||||||
_organizationRepository = organizationRepository;
|
_organizationRepository = organizationRepository;
|
||||||
_organizationUserRepository = organizationUserRepository;
|
_organizationUserRepository = organizationUserRepository;
|
||||||
|
@ -18,18 +18,18 @@ using Microsoft.AspNetCore.Http;
|
|||||||
|
|
||||||
namespace Bit.Core.Services
|
namespace Bit.Core.Services
|
||||||
{
|
{
|
||||||
public class PushSharpPushService : IPushService
|
public class PushSharpPushNotificationService : IPushNotificationService
|
||||||
{
|
{
|
||||||
private readonly IDeviceRepository _deviceRepository;
|
private readonly IDeviceRepository _deviceRepository;
|
||||||
private readonly ILogger<IPushService> _logger;
|
private readonly ILogger<IPushNotificationService> _logger;
|
||||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
private GcmServiceBroker _gcmBroker;
|
private GcmServiceBroker _gcmBroker;
|
||||||
private ApnsServiceBroker _apnsBroker;
|
private ApnsServiceBroker _apnsBroker;
|
||||||
|
|
||||||
public PushSharpPushService(
|
public PushSharpPushNotificationService(
|
||||||
IDeviceRepository deviceRepository,
|
IDeviceRepository deviceRepository,
|
||||||
IHttpContextAccessor httpContextAccessor,
|
IHttpContextAccessor httpContextAccessor,
|
||||||
ILogger<IPushService> logger,
|
ILogger<IPushNotificationService> logger,
|
||||||
IHostingEnvironment hostingEnvironment,
|
IHostingEnvironment hostingEnvironment,
|
||||||
GlobalSettings globalSettings)
|
GlobalSettings globalSettings)
|
||||||
{
|
{
|
@ -20,7 +20,7 @@ namespace Bit.Core.Services
|
|||||||
private readonly ICipherRepository _cipherRepository;
|
private readonly ICipherRepository _cipherRepository;
|
||||||
private readonly IOrganizationUserRepository _organizationUserRepository;
|
private readonly IOrganizationUserRepository _organizationUserRepository;
|
||||||
private readonly IMailService _mailService;
|
private readonly IMailService _mailService;
|
||||||
private readonly IPushService _pushService;
|
private readonly IPushNotificationService _pushService;
|
||||||
private readonly IdentityErrorDescriber _identityErrorDescriber;
|
private readonly IdentityErrorDescriber _identityErrorDescriber;
|
||||||
private readonly IdentityOptions _identityOptions;
|
private readonly IdentityOptions _identityOptions;
|
||||||
private readonly IPasswordHasher<User> _passwordHasher;
|
private readonly IPasswordHasher<User> _passwordHasher;
|
||||||
@ -32,7 +32,7 @@ namespace Bit.Core.Services
|
|||||||
ICipherRepository cipherRepository,
|
ICipherRepository cipherRepository,
|
||||||
IOrganizationUserRepository organizationUserRepository,
|
IOrganizationUserRepository organizationUserRepository,
|
||||||
IMailService mailService,
|
IMailService mailService,
|
||||||
IPushService pushService,
|
IPushNotificationService pushService,
|
||||||
IUserStore<User> store,
|
IUserStore<User> store,
|
||||||
IOptions<IdentityOptions> optionsAccessor,
|
IOptions<IdentityOptions> optionsAccessor,
|
||||||
IPasswordHasher<User> passwordHasher,
|
IPasswordHasher<User> passwordHasher,
|
||||||
|
@ -4,7 +4,7 @@ using Bit.Core.Models.Table;
|
|||||||
|
|
||||||
namespace Bit.Core.Services
|
namespace Bit.Core.Services
|
||||||
{
|
{
|
||||||
public class NoopPushService : IPushService
|
public class NoopPushNotificationService : IPushNotificationService
|
||||||
{
|
{
|
||||||
public Task PushSyncCipherCreateAsync(Cipher cipher)
|
public Task PushSyncCipherCreateAsync(Cipher cipher)
|
||||||
{
|
{
|
@ -50,7 +50,7 @@ namespace Bit.Core.Utilities
|
|||||||
public static void AddDefaultServices(this IServiceCollection services)
|
public static void AddDefaultServices(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddSingleton<IMailService, SendGridMailService>();
|
services.AddSingleton<IMailService, SendGridMailService>();
|
||||||
services.AddSingleton<IPushService, PushSharpPushService>();
|
services.AddSingleton<IPushNotificationService, PushSharpPushNotificationService>();
|
||||||
services.AddSingleton<IBlockIpService, AzureQueueBlockIpService>();
|
services.AddSingleton<IBlockIpService, AzureQueueBlockIpService>();
|
||||||
services.AddSingleton<IPushRegistrationService, NotificationHubPushRegistrationService>();
|
services.AddSingleton<IPushRegistrationService, NotificationHubPushRegistrationService>();
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ namespace Bit.Core.Utilities
|
|||||||
public static void AddNoopServices(this IServiceCollection services)
|
public static void AddNoopServices(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddSingleton<IMailService, NoopMailService>();
|
services.AddSingleton<IMailService, NoopMailService>();
|
||||||
services.AddSingleton<IPushService, NoopPushService>();
|
services.AddSingleton<IPushNotificationService, NoopPushNotificationService>();
|
||||||
services.AddSingleton<IBlockIpService, NoopBlockIpService>();
|
services.AddSingleton<IBlockIpService, NoopBlockIpService>();
|
||||||
services.AddSingleton<IPushRegistrationService, NoopPushRegistrationService>();
|
services.AddSingleton<IPushRegistrationService, NoopPushRegistrationService>();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user