public static void AddSlackServices(IServiceCollection services)
        {
            _ = services ?? throw new ArgumentNullException(nameof(services));

            WebHookMetadata.Register <SlackMetadata>(services);
            services.TryAddSingleton <SlackVerifySignatureFilter>();
        }
        /// <summary>
        /// Add services for the Kudu receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddKuduServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            WebHookMetadata.Register <KuduMetadata>(services);
        }
Example #3
0
 public static void AddPandoraServices(IServiceCollection services)
 {
     if (services == null)
     {
         throw new ArgumentNullException(nameof(services));
     }
     WebHookMetadata.Register <PandoraMetadata>(services);
     services.TryAddSingleton <PandoraVerifySignatureFilter>();
 }
        /// <summary>
        /// Add services for the AzureContainerRegistry receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddAzureContainerRegistryServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            WebHookMetadata.Register <AzureContainerRegistryMetadata>(services);
        }
        /// <summary>
        /// Add services for the Slack receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddSlackServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            WebHookMetadata.Register <SlackMetadata>(services);
            services.TryAddSingleton <SlackVerifyTokenFilter>();
        }
        /// <summary>
        /// Add services for the Crisp receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddCrispServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            WebHookMetadata.Register <CrispMetadata>(services);
            services.TryAddSingleton <CrispVerifyKeyFilter>();
        }
        public static IMvcBuilder AddBoxWebHooks(this IMvcBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException(nameof(builder));

            WebHookMetadata.Register<BoxMetadata>(builder.Services);

            BoxServiceCollectionSetup.AddBoxServices(builder.Services);

            return builder.AddWebHooks();
        }
Example #8
0
        /// <summary>
        /// Add services for the Trello receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddTrelloServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            services.TryAddEnumerable(ServiceDescriptor.Transient <IConfigureOptions <MvcOptions>, MvcOptionsSetup>());
            WebHookMetadata.Register <TrelloMetadata>(services);

            services.TryAddSingleton <TrelloVerifySignatureFilter>();
        }
        /// <summary>
        /// Add services for the Salesforce receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddSalesforceServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            services.TryAddEnumerable(ServiceDescriptor.Transient <IConfigureOptions <MvcOptions>, MvcOptionsSetup>());
            WebHookMetadata.Register <SalesforceMetadata>(services);
            services.TryAddSingleton <ISalesforceResultCreator, SalesforceResultCreator>();
            services.TryAddSingleton <SalesforceVerifyOrganizationIdFilter>();
        }
Example #10
0
        /// <summary>
        /// Add services for the Stripe receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddStripeServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            WebHookMetadata.Register <StripeMetadata>(services);
            services.TryAddSingleton <StripeTestEventRequestFilter>();
            services.TryAddSingleton <StripeVerifyNotificationIdFilter>();
            services.TryAddSingleton <StripeVerifySignatureFilter>();
        }
Example #11
0
        public static IMvcBuilder AddSnsWebHooks(this IMvcBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            WebHookMetadata.Register <SnsMetadata>(builder.Services);

            SnsServiceCollectionSetup.AddSnsServices(builder.Services);

            return(builder.AddWebHooks());
        }
        /// <summary>
        /// Add services for the WebSub receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddWebSubServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            WebHookMetadata.Register <WebSubMetadata>(services);

            services.TryAddEnumerable(ServiceDescriptor.Transient <IApplicationModelProvider, WebSubBindingInfoProvider>());

            services.TryAddSingleton <WebSubWebHookSecurityFilter>();
            services.TryAddSingleton <WebSubWebHookIntentVerificationFilter>();
        }
        /// <summary>
        /// Add services for the Stripe receiver.
        /// </summary>
        /// <param name="services">The <see cref="IServiceCollection"/> to update.</param>
        public static void AddStripeServices(IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            services.TryAddEnumerable(ServiceDescriptor.Transient <IConfigureOptions <MvcOptions>, MvcOptionsSetup>());
            WebHookMetadata.Register <StripeMetadata>(services);

            services.TryAddSingleton <StripeTestEventRequestFilter>();
            services.TryAddSingleton <StripeVerifyNotificationIdFilter>();
            services.TryAddSingleton <StripeVerifySignatureFilter>();
        }
Example #14
0
        public static void AddFitbitServices(IServiceCollection services, Action <FitbitWebhookReceiverOptions> setupAction)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            // register the options action
            services.Configure(setupAction);

            WebHookMetadata.Register <FitbitMetadata>(services);

            services.TryAddSingleton <FitbitVerifySubscriberFilter>();
            services.TryAddSingleton <FitbitVerifySignatureFilter>();
            services.TryAddSingleton <FitbitActionResultFilter>();
        }