I can't get a component to be disabled using policy
- Create an empty BlazorServer project with the WindowsAuthenticate authorization template.
- Add a default policy that denies everything.
builder.Services.AddAuthentication(NegotiateDefaults.AuthenticationScheme) .AddNegotiate();builder.Services.AddAuthorization(options =>{ options.FallbackPolicy = new AuthorizationPolicyBuilder().RequireAssertion(x=>false).Build();});- Add the AllowAnonumus attribute to the _host page. If you don’t add it, there will be no access to the site at all, it will return 403
@attribute [Microsoft.AspNetCore.Authorization.AllowAnonymous]- Make sure that the template has one component that requires authorization.
<AuthorizeView><Authorized> Hello, @context.User.Identity.Name!</Authorized></AuthorizeView>Now run the project, and at first you won’t see the login.But if you quickly click on the NavBar you will see it. Explain how the code gets into <Authorized> tags