public EdSightMiddleWare(OwinMiddleware next, EdSightOptions options) : base(next) { this.options = options; if (string.IsNullOrWhiteSpace(options.ClientId)) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "ClientId")); } if (string.IsNullOrWhiteSpace(options.ClientSecret)) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "ClientSecret")); } }
public static IAppBuilder UseEdSight(this IAppBuilder app, EdSightOptions options) { app.Use <EdSightMiddleWare>(options); return(app); }