AuthenticationHttpContextExtensions.GetTokenAsync Method

Definition

Overloads

GetTokenAsync(HttpContext, String)

Extension method for getting the value of an authentication token.

GetTokenAsync(HttpContext, String, String)

Extension method for getting the value of an authentication token.

GetTokenAsync(HttpContext, String)

Extension method for getting the value of an authentication token.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<System::String ^> ^ GetTokenAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ tokenName);
public static System.Threading.Tasks.Task<string> GetTokenAsync (this Microsoft.AspNetCore.Http.HttpContext context, string tokenName);
static member GetTokenAsync : Microsoft.AspNetCore.Http.HttpContext * string -> System.Threading.Tasks.Task<string>
<Extension()>
Public Function GetTokenAsync (context As HttpContext, tokenName As String) As Task(Of String)

Parameters

context
HttpContext

The HttpContext context.

tokenName
String

The name of the token.

Returns

Task<String>

The value of the token.

GetTokenAsync(HttpContext, String, String)

Extension method for getting the value of an authentication token.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<System::String ^> ^ GetTokenAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ scheme, System::String ^ tokenName);
public static System.Threading.Tasks.Task<string> GetTokenAsync (this Microsoft.AspNetCore.Http.HttpContext context, string scheme, string tokenName);
static member GetTokenAsync : Microsoft.AspNetCore.Http.HttpContext * string * string -> System.Threading.Tasks.Task<string>
<Extension()>
Public Function GetTokenAsync (context As HttpContext, scheme As String, tokenName As String) As Task(Of String)

Parameters

context
HttpContext

The HttpContext context.

scheme
String

The name of the authentication scheme.

tokenName
String

The name of the token.

Returns

Task<String>

The value of the token.

Applies to