AuthenticationTokenExtensions.GetTokenAsync Method

Definition

Overloads

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

Extension method for getting the value of an authentication token.

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

Extension method for getting the value of an authentication token.

GetTokenAsync(AuthenticationManager, String)

public static System.Threading.Tasks.Task<string> GetTokenAsync (this Microsoft.AspNetCore.Http.Authentication.AuthenticationManager manager, string tokenName);
Parameters
tokenName
String
Returns

GetTokenAsync(IAuthenticationService, HttpContext, String)

Extension method for getting the value of an authentication token.

public static System.Threading.Tasks.Task<string> GetTokenAsync (this Microsoft.AspNetCore.Authentication.IAuthenticationService auth, Microsoft.AspNetCore.Http.HttpContext context, string tokenName);
Parameters
context
HttpContext

The HttpContext context.

tokenName
String

The name of the token.

Returns

The value of the token.

GetTokenAsync(AuthenticationManager, String, String)

[System.Runtime.CompilerServices.AsyncStateMachine(typeof(Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions/<GetTokenAsync>d__7))]
public static System.Threading.Tasks.Task<string> GetTokenAsync (this Microsoft.AspNetCore.Http.Authentication.AuthenticationManager manager, string signInScheme, string tokenName);
Parameters
signInScheme
String
tokenName
String
Returns

GetTokenAsync(IAuthenticationService, HttpContext, String, String)

Extension method for getting the value of an authentication token.

[System.Runtime.CompilerServices.AsyncStateMachine(typeof(Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions/<GetTokenAsync>d__7))]
public static System.Threading.Tasks.Task<string> GetTokenAsync (this Microsoft.AspNetCore.Authentication.IAuthenticationService auth, Microsoft.AspNetCore.Http.HttpContext context, string scheme, string tokenName);
Parameters
context
HttpContext

The HttpContext context.

scheme
String

The name of the authentication scheme.

tokenName
String

The name of the token.

Returns

The value of the token.