Table of Contents

Interface IClaimsPrincipalAccessor

Namespace
The.Web.Security
Assembly
Instagile.Web.Client.dll

Gets the HTTP user associated with a backend request or frontend tab.

public interface IClaimsPrincipalAccessor

Remarks

If both HttpContext and AuthenticationStateProvider are available, the former should be preferred, because MVC may register a dummy ASP.

Properties

HasLocalRoles

Gets whether the returned ClaimsPrincipal fully specifies user roles without the need for external lookups.

bool HasLocalRoles { get; }

Property Value

bool

Methods

GetUserAsync()

Gets the current ClaimsPrincipal from scoped dependencies, which may be a transient HTTP request or a long-lived browser tab.

Task<ClaimsPrincipal> GetUserAsync()

Returns

Task<ClaimsPrincipal>

A principal which may contain a standard ClaimsIdentity or the special claim InvalidScope.

SetUser(ClaimsPrincipal)

Sets the current in ClaimsPrincipal in scoped dependencies if one is present, which is the case for transient HTTP requests.

void SetUser(ClaimsPrincipal user)

Parameters

user ClaimsPrincipal