Move a nullref check to base class

This commit is contained in:
Troy Dai 2016-08-08 08:59:22 -07:00
parent a79a0360c1
commit 3a5df89f1c
2 changed files with 5 additions and 5 deletions

View File

@ -152,11 +152,6 @@ namespace Microsoft.AspNetCore.Authentication.OpenIdConnect
/// <returns>A task executing the sign out procedure</returns> /// <returns>A task executing the sign out procedure</returns>
protected override async Task HandleSignOutAsync(SignOutContext context) protected override async Task HandleSignOutAsync(SignOutContext context)
{ {
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
Logger.EnteringOpenIdAuthenticationHandlerHandleSignOutAsync(GetType().FullName); Logger.EnteringOpenIdAuthenticationHandlerHandleSignOutAsync(GetType().FullName);
if (_configuration == null && Options.ConfigurationManager != null) if (_configuration == null && Options.ConfigurationManager != null)

View File

@ -288,6 +288,11 @@ namespace Microsoft.AspNetCore.Authentication
public async Task SignOutAsync(SignOutContext context) public async Task SignOutAsync(SignOutContext context)
{ {
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
if (ShouldHandleScheme(context.AuthenticationScheme, handleAutomatic: false)) if (ShouldHandleScheme(context.AuthenticationScheme, handleAutomatic: false))
{ {
SignOutAccepted = true; SignOutAccepted = true;