From 4b4b3759096a7451605baf17db017a540c681430 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 14 Apr 2017 17:37:05 -0700 Subject: [PATCH] Add GetToken overload using default scheme --- .../TokenExtensions.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs b/src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs index 24f66d9043..1af05aab0f 100644 --- a/src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs +++ b/src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs @@ -125,6 +125,16 @@ namespace Microsoft.AspNetCore.Authentication return tokens; } + /// + /// Extension method for getting the value of an authentication token. + /// + /// The . + /// The context. + /// The name of the token. + /// The value of the token. + public static Task GetTokenAsync(this IAuthenticationService auth, HttpContext context, string tokenName) + => auth.GetTokenAsync(context, scheme: null, tokenName: tokenName); + /// /// Extension method for getting the value of an authentication token. ///