Class ActionContextExtensions
public static class ActionContextExtensions
- Inheritance
-
objectActionContextExtensions
Methods
AuthenticateAsync(IActionContext)
Extension method for authenticate using the DefaultAuthenticateScheme scheme.
public static Task<AuthenticateResult> AuthenticateAsync(this IActionContext context)
Parameters
context
IActionContextThe IActionContext context.
Returns
AuthenticateAsync(IActionContext, string?)
Extension method for authenticate.
public static Task<AuthenticateResult> AuthenticateAsync(this IActionContext context, string? scheme)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
Returns
ChallengeAsync(IActionContext)
Extension method for authenticate using the DefaultChallengeScheme scheme.
public static Task ChallengeAsync(this IActionContext context)
Parameters
context
IActionContextThe IActionContext context.
Returns
- Task
The task.
ChallengeAsync(IActionContext, AuthenticationProperties?)
Extension method for authenticate using the DefaultChallengeScheme scheme.
public static Task ChallengeAsync(this IActionContext context, AuthenticationProperties? properties)
Parameters
context
IActionContextThe IActionContext context.
properties
AuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
ChallengeAsync(IActionContext, string?)
Extension method for Challenge.
public static Task ChallengeAsync(this IActionContext context, string? scheme)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
Returns
- Task
The result.
ChallengeAsync(IActionContext, string?, AuthenticationProperties?)
Extension method for Challenge.
public static Task ChallengeAsync(this IActionContext context, string? scheme, AuthenticationProperties? properties)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
properties
AuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
ForbidAsync(IActionContext)
Extension method for Forbid using the DefaultForbidScheme scheme..
public static Task ForbidAsync(this IActionContext context)
Parameters
context
IActionContextThe IActionContext context.
Returns
- Task
The task.
ForbidAsync(IActionContext, AuthenticationProperties?)
Extension method for Forbid.
public static Task ForbidAsync(this IActionContext context, AuthenticationProperties? properties)
Parameters
context
IActionContextThe IActionContext context.
properties
AuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
ForbidAsync(IActionContext, string)
Extension method for Forbid.
public static Task ForbidAsync(this IActionContext context, string scheme)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
Returns
- Task
The task.
ForbidAsync(IActionContext, string?, AuthenticationProperties?)
Extension method for Forbid.
public static Task ForbidAsync(this IActionContext context, string? scheme, AuthenticationProperties? properties)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
properties
AuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
GetTokenAsync(IActionContext, string?)
Extension method for getting the value of an authentication token.
public static Task<string?> GetTokenAsync(this IActionContext context, string? tokenName)
Parameters
context
IActionContextThe IActionContext context.
tokenName
stringThe name of the token.
Returns
GetTokenAsync(IActionContext, string?, string?)
Extension method for getting the value of an authentication token.
public static Task<string?> GetTokenAsync(this IActionContext context, string? scheme, string? tokenName)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
tokenName
stringThe name of the token.
Returns
SignInAsync(IActionContext, ClaimsPrincipal?)
Extension method for SignIn using the DefaultSignInScheme.
public static Task SignInAsync(this IActionContext context, ClaimsPrincipal? principal)
Parameters
context
IActionContextThe IActionContext context.
principal
ClaimsPrincipalThe user.
Returns
- Task
The task.
SignInAsync(IActionContext, ClaimsPrincipal?, AuthenticationProperties?)
Extension method for SignIn using the DefaultSignInScheme.
public static Task SignInAsync(this IActionContext context, ClaimsPrincipal? principal, AuthenticationProperties? properties)
Parameters
context
IActionContextThe IActionContext context.
principal
ClaimsPrincipalThe user.
properties
AuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
SignInAsync(IActionContext, string?, ClaimsPrincipal?)
Extension method for SignIn.
public static Task SignInAsync(this IActionContext context, string? scheme, ClaimsPrincipal? principal)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
principal
ClaimsPrincipalThe user.
Returns
- Task
The task.
SignInAsync(IActionContext, string?, ClaimsPrincipal?, AuthenticationProperties?)
Extension method for SignIn.
public static Task SignInAsync(this IActionContext context, string? scheme, ClaimsPrincipal? principal, AuthenticationProperties? properties)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
principal
ClaimsPrincipalThe user.
properties
AuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
SignOutAsync(IActionContext, AuthenticationProperties?)
Extension method for SignOut using the DefaultSignOutScheme.
public static Task SignOutAsync(this IActionContext context, AuthenticationProperties? properties)
Parameters
context
IActionContextThe IActionContext context.
properties
AuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
SignOutAsync(IActionContext, string?, AuthenticationProperties?)
Extension method for SignOut.
public static Task SignOutAsync(this IActionContext context, string? scheme, AuthenticationProperties? properties)
Parameters
context
IActionContextThe IActionContext context.
scheme
stringThe name of the authentication scheme.
properties
AuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
SignOutAsync(IActionContext, params string[]?)
Extension method for SignOut.
public static Task SignOutAsync(this IActionContext context, params string[]? schemes)
Parameters
context
IActionContextThe IActionContext context.
schemes
string[]The name of the authentication scheme.
Returns
- Task
The task.