public void WithEventsProcessorShouldValidateInput(JwtBearerOptions options, IJwtBearerEvents eventsProcessor) { Assert.Throws <ArgumentNullException>(() => options.WithEventsProcessor(eventsProcessor)); }
public static JwtBearerOptions WithEventsProcessor(this JwtBearerOptions options, IJwtBearerEvents eventsProcessor) { if (options == null) { throw new ArgumentNullException(nameof(options)); } if (eventsProcessor == null) { throw new ArgumentNullException(nameof(eventsProcessor)); } options.Events = eventsProcessor; return(options); }