Dela via


Microsoft.AspNetCore.Components.Authorization Namespace

Provides classes for retrieving information about the current authentication state.

Classes

AuthenticationState

Provides information about the currently authenticated user, if any.

AuthenticationStateData

A JSON-serializable type that represents the data that is used to create an AuthenticationState.

AuthenticationStateProvider

Provides information about the authentication state of the current user.

AuthorizeRouteView

Combines the behaviors of AuthorizeView and RouteView, so that it displays the page matching the specified route but only if the user is authorized to see it.

Additionally, this component supplies a cascading parameter of type Task<TResult>, which makes the user's current authentication state available to descendants.

AuthorizeView

Displays differing content depending on the user's authorization status.

AuthorizeViewCore

A base class for components that display differing content depending on the user's authorization status.

CascadingAuthenticationState

Structs

ClaimData

This is a serializable representation of a Claim object that only consists of the type and value.

Interfaces

IHostEnvironmentAuthenticationStateProvider

An interface implemented by services to receive authentication state information from the host environment. If this is implemented by the host's AuthenticationStateProvider, it will receive authentication state from the HttpContext. Or if this implemented service that is registered directly as an IHostEnvironmentAuthenticationStateProvider, it will receive the AuthenticationState returned by GetAuthenticationStateAsync()

Delegates

AuthenticationStateChangedHandler

A handler for the AuthenticationStateChanged event.

Remarks

For more information about Blazor authorization, see ASP.NET Core Blazor authentication and authorization.