AuthorizationExtensions class

namespace: Serenity   assemblySerenity.Net.Core

Authorization extension methods

public static class AuthorizationExtensions

Public Members

name description
static GetIdentifier(…) Gets name identifier claim from given identity
static GetUserDefinition(…) Gets user definition for given user identity
static GetUserDefinition<TUserDefinition>(…) Gets user definition for given user identity
static IsLoggedIn(…) Returns true if user is logged in (authenticated). (2 methods)
static ValidateLoggedIn(…) Checks if there is a currently logged user and throws a validation error with "NotLoggedIn" error code if not.
static ValidatePermission(…) Checks if current user has given permission and throws a validation error with "AccessDenied" error code if not.

See Also