/// <summary> /// Adds JWT bearer token middleware to your web application pipeline. /// </summary> /// <param name="app">The IAppBuilder passed to your configuration method.</param> /// <param name="options">An options class that controls the middleware behavior.</param> /// <returns>The original app parameter.</returns> public static IAppBuilder UseAuth0JwtBearerAuthentication(this IAppBuilder app, Auth0JwtBearerAuthenticationOptions options) { if (app == null) { throw new ArgumentNullException("app"); } if (options == null) { throw new ArgumentNullException("options"); } app.Use(typeof(Auth0JwtBearerAuthenticationMiddleware), app, options); app.UseStageMarker(PipelineStage.Authenticate); return app; }
/// <summary> /// Adds JWT bearer token middleware to your web application pipeline. /// </summary> /// <param name="app">The IAppBuilder passed to your configuration method.</param> /// <param name="options">An options class that controls the middleware behavior.</param> /// <returns>The original app parameter.</returns> public static IAppBuilder UseAuth0JwtBearerAuthentication(this IAppBuilder app, Auth0JwtBearerAuthenticationOptions options) { if (app == null) { throw new ArgumentNullException("app"); } if (options == null) { throw new ArgumentNullException("options"); } app.Use(typeof(Auth0JwtBearerAuthenticationMiddleware), app, options); app.UseStageMarker(PipelineStage.Authenticate); return(app); }