Exemple #1
0
 public PushSubscriptionsController(
     IPushSubscriptionsService pushSubscriptionsService,
     PushServiceClient pushClient)
 {
     _pushSubscriptionsService = pushSubscriptionsService;
     _pushClient = pushClient;
 }
        public PushSubscriptionsController(IPushSubscriptionsService pushSubscriptionsService, PushServiceClient pushClient, IOptions <PushNotificationsOptions> options)
        {
            _pushSubscriptionsService = pushSubscriptionsService;
            _pushClient = pushClient;

            _pushClient.DefaultAuthentication = new VapidAuthentication(options.Value.PublicKey, options.Value.PrivateKey)
            {
                Subject = "https://cc-angularpwa.firebaseapp.com"
            };
        }
Exemple #3
0
        public WeatherNotificationsProducer(IOptions <PushNotificationsOptions> options, IPushSubscriptionsService pushSubscriptionsService, PushServiceClient pushClient)
        {
            _pushSubscriptionsService = pushSubscriptionsService;

            _pushClient = pushClient;
            _pushClient.DefaultAuthentication = new VapidAuthentication(options.Value.PublicKey, options.Value.PrivateKey)
            {
                Subject = "https://angular-pushnotifications.demo.io"
            };
        }
Exemple #4
0
 public PushNotificationsProducer(
     IPushSubscriptionsService pushSubscriptionsService,
     PushServiceClient pushClient,
     HttpClient httpClient,
     ILogger <PushNotificationsProducer> logger,
     IConfiguration configuration)
 {
     _pushSubscriptionsService = pushSubscriptionsService;
     _pushClient    = pushClient;
     _httpClient    = httpClient;
     _logger        = logger;
     _configuration = configuration;
 }
Exemple #5
0
        public WindAlertController(
            IOptions <PushNotificationsOptions> options,
            IPushSubscriptionsService pushSubscriptionsService,
            PushServiceClient pushClient,
            ILogger <WindAlertController> logger,
            IConfiguration configuration
            )
        {
            _pushSubscriptionsService = pushSubscriptionsService;
            _pushClient    = pushClient;
            _logger        = logger;
            _configuration = configuration;
            _logger.LogInformation("WindAlertController ctor");

            var vapidAuthentication = new VapidAuthentication(options.Value.PublicKey, options.Value.PrivateKey)
            {
                Subject = options.Value.Subject
            };

            _pushClient.DefaultAuthentication = vapidAuthentication;
        }
 public PushSubscriptionsController(IPushSubscriptionsService pushSubscriptionsService)
 {
     _pushSubscriptionsService = pushSubscriptionsService;
 }