/// <summary>
        /// Authenticate users using Instagram
        /// </summary>
        /// <param name="app">The <see cref="IAppBuilder"/> passed to the configuration method</param>
        /// <param name="options">Middleware configuration options</param>
        /// <returns>The updated <see cref="IAppBuilder"/></returns>
        public static IAppBuilder UseInstagramAuthentication(this IAppBuilder app, InstagramAuthenticationOptions options) {
            if (app == null) {
                throw new ArgumentNullException("app");
            }
            if (options == null) {
                throw new ArgumentNullException("options");
            }

            app.Use(typeof(InstagramAuthenticationMiddleware), app, options);
            return app;
        }
Ejemplo n.º 2
0
 private static void SetupInstagramAuth(IAppBuilder app)
 {
     InstagramAuthenticationOptions instagramOptions = new InstagramAuthenticationOptions()
     {
         AppId = InstagramAppId,
         AppSecret = InstagramAppSecret
     };
     app.UseInstagramAuthentication(instagramOptions);
 }