AuthenticationHttpContextExtensions.GetTokenAsync Metodo

Definizione

Overload

GetTokenAsync(HttpContext, String)

Autentica la richiesta usando lo schema di autenticazione predefinito e restituisce il valore per il token. Lo schema di autenticazione predefinito può essere configurato usando DefaultAuthenticateScheme.

GetTokenAsync(HttpContext, String, String)

Autentica la richiesta usando lo schema specificato e restituisce il valore per il token.

GetTokenAsync(HttpContext, String)

Autentica la richiesta usando lo schema di autenticazione predefinito e restituisce il valore per il token. Lo schema di autenticazione predefinito può essere configurato usando DefaultAuthenticateScheme.

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);
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)

Parametri

context
HttpContext

Contesto HttpContext .

tokenName
String

Nome del token.

Restituisce

Valore del token, se presente.

Si applica a

GetTokenAsync(HttpContext, String, String)

Autentica la richiesta usando lo schema specificato e restituisce il valore per il 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);
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)

Parametri

context
HttpContext

Contesto HttpContext .

scheme
String

Nome dello schema di autenticazione.

tokenName
String

Nome del token.

Restituisce

Valore del token, se presente.

Si applica a