From 3a5df89f1c06868cc6dd67997ea492c227a977fc Mon Sep 17 00:00:00 2001 From: Troy Dai Date: Mon, 8 Aug 2016 08:59:22 -0700 Subject: [PATCH] Move a nullref check to base class --- .../OpenIdConnectHandler.cs | 5 ----- .../AuthenticationHandler.cs | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectHandler.cs b/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectHandler.cs index 7521ef39e8..e5dcbbdeb7 100644 --- a/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectHandler.cs +++ b/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectHandler.cs @@ -152,11 +152,6 @@ namespace Microsoft.AspNetCore.Authentication.OpenIdConnect /// A task executing the sign out procedure protected override async Task HandleSignOutAsync(SignOutContext context) { - if (context == null) - { - throw new ArgumentNullException(nameof(context)); - } - Logger.EnteringOpenIdAuthenticationHandlerHandleSignOutAsync(GetType().FullName); if (_configuration == null && Options.ConfigurationManager != null) diff --git a/src/Microsoft.AspNetCore.Authentication/AuthenticationHandler.cs b/src/Microsoft.AspNetCore.Authentication/AuthenticationHandler.cs index 1e642d82dd..f992cde009 100644 --- a/src/Microsoft.AspNetCore.Authentication/AuthenticationHandler.cs +++ b/src/Microsoft.AspNetCore.Authentication/AuthenticationHandler.cs @@ -288,6 +288,11 @@ namespace Microsoft.AspNetCore.Authentication public async Task SignOutAsync(SignOutContext context) { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + if (ShouldHandleScheme(context.AuthenticationScheme, handleAutomatic: false)) { SignOutAccepted = true;