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
contextIActionContextThe IActionContext context.
Returns
AuthenticateAsync(IActionContext, string?)
Extension method for authenticate.
public static Task<AuthenticateResult> AuthenticateAsync(this IActionContext context, string? scheme)
Parameters
contextIActionContextThe IActionContext context.
schemestringThe name of the authentication scheme.
Returns
ChallengeAsync(IActionContext)
Extension method for authenticate using the DefaultChallengeScheme scheme.
public static Task ChallengeAsync(this IActionContext context)
Parameters
contextIActionContextThe 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
contextIActionContextThe IActionContext context.
propertiesAuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
ChallengeAsync(IActionContext, string?)
Extension method for Challenge.
public static Task ChallengeAsync(this IActionContext context, string? scheme)
Parameters
contextIActionContextThe IActionContext context.
schemestringThe 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
contextIActionContextThe IActionContext context.
schemestringThe name of the authentication scheme.
propertiesAuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
ForbidAsync(IActionContext)
Extension method for Forbid using the DefaultForbidScheme scheme..
public static Task ForbidAsync(this IActionContext context)
Parameters
contextIActionContextThe IActionContext context.
Returns
- Task
The task.
ForbidAsync(IActionContext, AuthenticationProperties?)
Extension method for Forbid.
public static Task ForbidAsync(this IActionContext context, AuthenticationProperties? properties)
Parameters
contextIActionContextThe IActionContext context.
propertiesAuthenticationPropertiesThe AuthenticationProperties properties.
Returns
- Task
The task.
ForbidAsync(IActionContext, string)
Extension method for Forbid.
public static Task ForbidAsync(this IActionContext context, string scheme)
Parameters
contextIActionContextThe IActionContext context.
schemestringThe 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
contextIActionContextThe IActionContext context.
schemestringThe name of the authentication scheme.
propertiesAuthenticationPropertiesThe 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
contextIActionContextThe IActionContext context.
tokenNamestringThe 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
contextIActionContextThe IActionContext context.
schemestringThe name of the authentication scheme.
tokenNamestringThe 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
contextIActionContextThe IActionContext context.
principalClaimsPrincipalThe 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
contextIActionContextThe IActionContext context.
principalClaimsPrincipalThe user.
propertiesAuthenticationPropertiesThe 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
contextIActionContextThe IActionContext context.
schemestringThe name of the authentication scheme.
principalClaimsPrincipalThe 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
contextIActionContextThe IActionContext context.
schemestringThe name of the authentication scheme.
principalClaimsPrincipalThe user.
propertiesAuthenticationPropertiesThe 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
contextIActionContextThe IActionContext context.
propertiesAuthenticationPropertiesThe 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
contextIActionContextThe IActionContext context.
schemestringThe name of the authentication scheme.
propertiesAuthenticationPropertiesThe 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
contextIActionContextThe IActionContext context.
schemesstring[]The name of the authentication scheme.
Returns
- Task
The task.