blazor sample ujsing cliam policy
@page "/debug"
@attribute [Authorize(Policy = "IsDeveloper")]
blazor sample ujsing cliam policy
@page "/debug"
@attribute [Authorize(Policy = "IsDeveloper")]
blazor sample ujsing cliam policy
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthorization(config =>
{
config.AddPolicy("IsDeveloper", policy => policy.RequireClaim("IsDeveloper", "true"));
});
}
blazor sample ujsing cliam policy
<AuthorizeView Policy="IsDeveloper">
<p>You can only see this if you satisfy the IsDeveloper policy.</p>
</AuthorizeView>
blazor sample ujsing cliam policy
[Route("api/[controller]")]
[ApiController]
public class SystemController
{
[Authorize(Policy = “IsDeveloper”)]
public IActionResult LoadDebugInfo()
{
// ...
}
}
blazor sample ujsing cliam policy
@page "/debug"
@attribute [Authorize(Policy = "IsDeveloper")]
blazor sample ujsing cliam policy
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthorization(config =>
{
config.AddPolicy("IsDeveloper", policy => policy.RequireClaim("IsDeveloper", "true"));
});
}
blazor sample ujsing cliam policy
<AuthorizeView Policy="IsDeveloper">
<p>You can only see this if you satisfy the IsDeveloper policy.</p>
</AuthorizeView>
blazor sample ujsing cliam policy
[Route("api/[controller]")]
[ApiController]
public class SystemController
{
[Authorize(Policy = “IsDeveloper”)]
public IActionResult LoadDebugInfo()
{
// ...
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us