Add GetToken overload using default scheme

This commit is contained in:
Hao Kung 2017-04-14 17:37:05 -07:00
parent ef9ff35370
commit 4b4b375909
1 changed files with 10 additions and 0 deletions

View File

@ -125,6 +125,16 @@ namespace Microsoft.AspNetCore.Authentication
return tokens;
}
/// <summary>
/// Extension method for getting the value of an authentication token.
/// </summary>
/// <param name="auth">The <see cref="IAuthenticationService"/>.</param>
/// <param name="context">The <see cref="HttpContext"/> context.</param>
/// <param name="tokenName">The name of the token.</param>
/// <returns>The value of the token.</returns>
public static Task<string> GetTokenAsync(this IAuthenticationService auth, HttpContext context, string tokenName)
=> auth.GetTokenAsync(context, scheme: null, tokenName: tokenName);
/// <summary>
/// Extension method for getting the value of an authentication token.
/// </summary>