Table of Contents

Class ActionContextExtensions

Namespace
Phoesion.Glow.SDK.Firefly
Assembly
Phoesion.Glow.SDK.Authentication.dll
public static class ActionContextExtensions
Inheritance
object
ActionContextExtensions

Methods

AuthenticateAsync(IActionContext)

Extension method for authenticate using the DefaultAuthenticateScheme scheme.

public static Task<AuthenticateResult> AuthenticateAsync(this IActionContext context)

Parameters

context IActionContext

The IActionContext context.

Returns

Task<AuthenticateResult>

The AuthenticateResult.

AuthenticateAsync(IActionContext, string?)

Extension method for authenticate.

public static Task<AuthenticateResult> AuthenticateAsync(this IActionContext context, string? scheme)

Parameters

context IActionContext

The IActionContext context.

scheme string

The name of the authentication scheme.

Returns

Task<AuthenticateResult>

The AuthenticateResult.

ChallengeAsync(IActionContext)

Extension method for authenticate using the DefaultChallengeScheme scheme.

public static Task ChallengeAsync(this IActionContext context)

Parameters

context IActionContext

The 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 IActionContext

The IActionContext context.

properties AuthenticationProperties

The AuthenticationProperties properties.

Returns

Task

The task.

ChallengeAsync(IActionContext, string?)

Extension method for Challenge.

public static Task ChallengeAsync(this IActionContext context, string? scheme)

Parameters

context IActionContext

The IActionContext context.

scheme string

The 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 IActionContext

The IActionContext context.

scheme string

The name of the authentication scheme.

properties AuthenticationProperties

The 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 IActionContext

The IActionContext context.

Returns

Task

The task.

ForbidAsync(IActionContext, AuthenticationProperties?)

Extension method for Forbid.

public static Task ForbidAsync(this IActionContext context, AuthenticationProperties? properties)

Parameters

context IActionContext

The IActionContext context.

properties AuthenticationProperties

The AuthenticationProperties properties.

Returns

Task

The task.

ForbidAsync(IActionContext, string)

Extension method for Forbid.

public static Task ForbidAsync(this IActionContext context, string scheme)

Parameters

context IActionContext

The IActionContext context.

scheme string

The 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 IActionContext

The IActionContext context.

scheme string

The name of the authentication scheme.

properties AuthenticationProperties

The 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 IActionContext

The IActionContext context.

tokenName string

The name of the token.

Returns

Task<string>

The value of the token.

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 IActionContext

The IActionContext context.

scheme string

The name of the authentication scheme.

tokenName string

The name of the token.

Returns

Task<string>

The value of the token.

SignInAsync(IActionContext, ClaimsPrincipal?)

Extension method for SignIn using the DefaultSignInScheme.

public static Task SignInAsync(this IActionContext context, ClaimsPrincipal? principal)

Parameters

context IActionContext

The IActionContext context.

principal ClaimsPrincipal

The 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 IActionContext

The IActionContext context.

principal ClaimsPrincipal

The user.

properties AuthenticationProperties

The 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 IActionContext

The IActionContext context.

scheme string

The name of the authentication scheme.

principal ClaimsPrincipal

The 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 IActionContext

The IActionContext context.

scheme string

The name of the authentication scheme.

principal ClaimsPrincipal

The user.

properties AuthenticationProperties

The 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 IActionContext

The IActionContext context.

properties AuthenticationProperties

The 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 IActionContext

The IActionContext context.

scheme string

The name of the authentication scheme.

properties AuthenticationProperties

The 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 IActionContext

The IActionContext context.

schemes string[]

The name of the authentication scheme.

Returns

Task

The task.