From 317ab6dda5b8ffcfebf355c0b949ca469f9ae5c6 Mon Sep 17 00:00:00 2001 From: Nate Barbettini Date: Tue, 11 Jul 2017 16:52:53 -0700 Subject: [PATCH] Fix logger null ref --- src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs b/src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs index 927b3db..29b0f7b 100644 --- a/src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs +++ b/src/Stormpath.AspNetCore/StormpathAuthenticationMiddleware.cs @@ -19,6 +19,7 @@ using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Stormpath.Owin.Abstractions.Configuration; @@ -64,7 +65,7 @@ public StormpathAuthenticationMiddleware( } _config = integrationConfiguration; - _logger = logger; + _logger = logger ?? NullLogger.Instance; } protected override AuthenticationHandler CreateHandler()