Exemplo n.º 1
0
        public static IAppBuilder UseHmacAuthentication(this IAppBuilder app, IServiceProvider serviceProvider, HmacAuthenticationOptions options = null)
        {
            if (options == null)
            {
                options = new HmacAuthenticationOptions();
            }

            app.Use <HmacAuthenticationServiceProviderMiddleware>(app, serviceProvider, options);

            return(app);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds HMAC authentication to the Owin pipeline
        /// </summary>
        /// <param name="app"></param>
        /// <param name="resolver"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IAppBuilder UseHmacAuthentication(this IAppBuilder app, IDependencyResolver resolver, HmacAuthenticationOptions options = null)
        {
            if (options == null)
            {
                options = new HmacAuthenticationOptions();
            }

            app.Use <HmacAuthenticationMiddleware>(app, resolver, options);

            return(app);
        }