Security API | Blazor

When security is enabled Radzen will inject an instance of the SecurityService service to all pages. It is available

as the Security property.

Security methods

bool IsAuthenticated()

Returns true if the user is authenticated (logged in); otherwise false;

Use it in Radzen as ${Security.IsAuthenticated()}.

bool IsInRole(params string[] roles)

Returns true if the user is from the specified role(s) or Administrator; otherwise false;

Use it in Radzen as ${Security.IsInRole('Sales')}.

Security properties

User

Returns the current ApplicationUser instance.

Use it in Radzen as ${Security.User.Email}.

Check Extend Application User for instructions about adding custom properties to the user.

We are here for you

Making our users happy is always a priority for us.