Partilhar via


AuthenticationTokenExtensions.GetTokenAsync Método

Definição

Sobrecargas

GetTokenAsync(AuthenticationManager, String)
GetTokenAsync(IAuthenticationService, HttpContext, String)

Autentica a solicitação usando o esquema de autenticação especificado e retorna o valor do token.

GetTokenAsync(AuthenticationManager, String, String)
GetTokenAsync(IAuthenticationService, HttpContext, String, String)

Autentica a solicitação usando o esquema de autenticação especificado e retorna o valor do token.

GetTokenAsync(AuthenticationManager, String)

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

Parâmetros

tokenName
String

Retornos

Aplica-se a

GetTokenAsync(IAuthenticationService, HttpContext, String)

Origem:
TokenExtensions.cs
Origem:
TokenExtensions.cs
Origem:
TokenExtensions.cs

Autentica a solicitação usando o esquema de autenticação especificado e retorna o valor do token.

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

Parâmetros

context
HttpContext

O HttpContext contexto.

tokenName
String

O nome do token.

Retornos

O valor do token, se presente.

Aplica-se a

GetTokenAsync(AuthenticationManager, String, String)

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

Parâmetros

signInScheme
String
tokenName
String

Retornos

Aplica-se a

GetTokenAsync(IAuthenticationService, HttpContext, String, String)

Origem:
TokenExtensions.cs
Origem:
TokenExtensions.cs
Origem:
TokenExtensions.cs

Autentica a solicitação usando o esquema de autenticação especificado e retorna o valor do token.

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

Parâmetros

context
HttpContext

O HttpContext contexto.

scheme
String

O nome do esquema de autenticação.

tokenName
String

O nome do token.

Retornos

O valor do token, se presente.

Aplica-se a