AuthorizeRouteView Class

Definition

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.

public ref class AuthorizeRouteView sealed : Microsoft::AspNetCore::Components::RouteView
public sealed class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView
type AuthorizeRouteView = class
    inherit RouteView
Public NotInheritable Class AuthorizeRouteView
Inherits RouteView
Inheritance
AuthorizeRouteView

Constructors

AuthorizeRouteView()

Initialize a new instance of a AuthorizeRouteView.

Properties

Authorizing

The content that will be displayed while asynchronous authorization is in progress.

DefaultLayout

Gets or sets the type of a layout to be used if the page does not declare any layout. If specified, the type must implement IComponent and accept a parameter named Body.

(Inherited from RouteView)
NotAuthorized

The content that will be displayed if the user is not authorized.

Resource

The resource to which access is being controlled.

RouteData

Gets or sets the route data. This determines the page that will be displayed and the parameter values that will be supplied to the page.

(Inherited from RouteView)

Methods

Attach(RenderHandle)

Attaches the component to a RenderHandle.

(Inherited from RouteView)
Render(RenderTreeBuilder)

Renders the component.

(Inherited from RouteView)
SetParametersAsync(ParameterView)

Sets parameters supplied by the component's parent in the render tree.

(Inherited from RouteView)

Applies to