Add challenge/forbid overloads for MVC
This commit is contained in:
parent
0da88e0dda
commit
f6cf5293a0
|
|
@ -47,6 +47,15 @@ namespace Microsoft.AspNetCore.Authentication
|
|||
public static Task ChallengeAsync(this HttpContext context) =>
|
||||
context.ChallengeAsync(scheme: null, properties: null);
|
||||
|
||||
/// <summary>
|
||||
/// Extension method for authenticate using the <see cref="AuthenticationOptions.DefaultChallengeScheme"/> scheme.
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="HttpContext"/> context.</param>
|
||||
/// <param name="properties">The <see cref="AuthenticationProperties"/> properties.</param>
|
||||
/// <returns>The task.</returns>
|
||||
public static Task ChallengeAsync(this HttpContext context, AuthenticationProperties properties) =>
|
||||
context.ChallengeAsync(scheme: null, properties: properties);
|
||||
|
||||
/// <summary>
|
||||
/// Extension method for Challenge.
|
||||
/// </summary>
|
||||
|
|
@ -77,6 +86,23 @@ namespace Microsoft.AspNetCore.Authentication
|
|||
public static Task ForbidAsync(this HttpContext context, string scheme) =>
|
||||
context.ForbidAsync(scheme, properties: null);
|
||||
|
||||
/// <summary>
|
||||
/// Extension method for Forbid.
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="HttpContext"/> context.</param>
|
||||
/// <returns>The task.</returns>
|
||||
public static Task ForbidAsync(this HttpContext context) =>
|
||||
context.ForbidAsync(scheme: null, properties: null);
|
||||
|
||||
/// <summary>
|
||||
/// Extension method for Forbid.
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="HttpContext"/> context.</param>
|
||||
/// <param name="properties">The <see cref="AuthenticationProperties"/> properties.</param>
|
||||
/// <returns>The task.</returns>
|
||||
public static Task ForbidAsync(this HttpContext context, AuthenticationProperties properties) =>
|
||||
context.ForbidAsync(scheme: null, properties: properties);
|
||||
|
||||
/// <summary>
|
||||
/// Extension method for Forbid.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue