Remove unneeded AuthenticateContext
This commit is contained in:
parent
f9e19ed522
commit
ef9ff35370
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Microsoft.AspNetCore.Authentication
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class used by <see cref="IAuthenticationHandler"/> methods.
|
||||
/// </summary>
|
||||
public class AuthenticateContext : BaseAuthenticationContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="HttpContext"/> context.</param>
|
||||
/// <param name="authenticationScheme">The name of the authentication scheme.</param>
|
||||
public AuthenticateContext(HttpContext context, string authenticationScheme) : base(context, authenticationScheme, properties: null)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
|
@ -22,9 +22,8 @@ namespace Microsoft.AspNetCore.Authentication
|
|||
/// <summary>
|
||||
/// Authentication behavior.
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="AuthenticateContext"/> context.</param>
|
||||
/// <returns>The <see cref="AuthenticateResult"/> result.</returns>
|
||||
Task<AuthenticateResult> AuthenticateAsync(AuthenticateContext context);
|
||||
Task<AuthenticateResult> AuthenticateAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Challenge behavior.
|
||||
|
|
|
|||
|
|
@ -65,8 +65,7 @@ namespace Microsoft.AspNetCore.Authentication
|
|||
throw new InvalidOperationException($"No authentication handler is configured to authenticate for the scheme: {scheme}");
|
||||
}
|
||||
|
||||
var authContext = new AuthenticateContext(context, scheme);
|
||||
var result = await handler.AuthenticateAsync(authContext);
|
||||
var result = await handler.AuthenticateAsync();
|
||||
if (result.Succeeded)
|
||||
{
|
||||
var transformed = await Transform.TransformAsync(result.Principal);
|
||||
|
|
|
|||
Loading…
Reference in New Issue