Walter.BOM Namespace
Walter.Web.FireWall Namespace
ASP-WAF | .Net API for WAF Systems

UserTypeRenderTagHelper Class

Class UserType Renderer TagHelper allows you to make HTML elements visible, or hide them based on the type of consumer that is using the razor page. Implements the [Microsoft.AspNetCore.Razor.TagHelpers.TagHelper]

Namespace:  Walter.Web.FireWall.TagHelpers
Assembly:  Walter.Web.FireWall (in Walter.Web.FireWall.dll)

Syntax


public sealed class UserTypeRenderTagHelper

Examples


You can set the type to reject or accept via the boolean value or as the allowed type flags
create an UL only if the user matches the type
<ul>
       <li firewall-userTypes-allowed="IsHuman | IsSearchEngine"
           firewall-userTypes-is-NotDiscovered="true"
           firewall-userTypes-is-bot="false" firewall-userTypes-is-Malicious="false">
           <a asp-action="Login" asp-controller="Account">login to view the movie</a>
       </li>
       <li firewall-userTypes-is-bot="true"
           firewall-userTypes-is-Malicious="true">
           <a asp-action="Login" asp-controller="honeypot">login to view the movie</a>
       </li>
   </ul>

See Also


[Microsoft.AspNetCore.Razor.TagHelpers.TagHelper]