diff --git a/src/Microsoft.AspNetCore.Authentication.Abstractions/AuthenticationHttpContextExtensions.cs b/src/Microsoft.AspNetCore.Authentication.Abstractions/AuthenticationHttpContextExtensions.cs index 8f159eb279..238251a60d 100644 --- a/src/Microsoft.AspNetCore.Authentication.Abstractions/AuthenticationHttpContextExtensions.cs +++ b/src/Microsoft.AspNetCore.Authentication.Abstractions/AuthenticationHttpContextExtensions.cs @@ -180,5 +180,14 @@ namespace Microsoft.AspNetCore.Authentication /// The value of the token. public static Task GetTokenAsync(this HttpContext context, string scheme, string tokenName) => context.RequestServices.GetRequiredService().GetTokenAsync(context, scheme, tokenName); + + /// + /// Extension method for getting the value of an authentication token. + /// + /// The context. + /// The name of the token. + /// The value of the token. + public static Task GetTokenAsync(this HttpContext context, string tokenName) => + context.RequestServices.GetRequiredService().GetTokenAsync(context, tokenName); } }