Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BearerTokenValidatorMiddleware"/> class.
 /// </summary>
 /// <param name="next"></param>
 /// <param name="options"><see cref="BearerTokenValidatorMiddlewareOptions"/> to use to customize the current <see cref="BearerTokenValidatorMiddleware"/> behavior.</param>
 public BearerTokenValidatorMiddleware(RequestDelegate next, BearerTokenValidatorMiddlewareOptions options)
 {
     _next    = next ?? throw new ArgumentNullException(nameof(next));
     _options = options ?? new BearerTokenValidatorMiddlewareOptions();
 }
Ejemplo n.º 2
0
 public static void ConfigureBearerTokenValidatorMiddleware(this IApplicationBuilder app, BearerTokenValidatorMiddlewareOptions options)
 {
     app.UseMiddleware <BearerTokenValidatorMiddleware>(options);
 }