Click or drag to resize

AuthenticationAttribute Class

Web controller authentication attribute
Inheritance Hierarchy
SystemObject
  SystemAttribute
    FilterAttribute
      ActionFilterAttribute
        Velo.Web.HelperAuthenticationAttribute

Namespace:  Velo.Web.Helper
Assembly:  Velo.Web (in Velo.Web.dll) Version: 22.2.10.1 (22.2.10.450)
Syntax
public class AuthenticationAttribute : ActionFilterAttribute

The AuthenticationAttribute type exposes the following members.

Constructors
  NameDescription
Public methodAuthenticationAttribute
Initializes a new instance of the AuthenticationAttribute class. Constructor without parameter
Public methodAuthenticationAttribute(Permissions)
Initializes a new instance of the AuthenticationAttribute class. Constructor with parameter
Top
Properties
  NameDescription
Private propertyPermission
Web controller authorization
Top
Methods
  NameDescription
Public methodOnActionExecuting
Check web controller permission
(Overrides ActionFilterAttribute.OnActionExecuting(ActionExecutingContext).)
Top
Extension Methods
  NameDescription
Public Extension MethodCode exampleConvertDateFromSQL
Convert SQL date include value null
(Defined by Extension.)
Public Extension MethodConvertDateToSQL
Convert C# date type to SQL date type
(Defined by Extension.)
Top
Examples
This example shows the declaration of a web controller class (all actions), as administrator.
using Velo.Web.Helper;

[Authentication(Permission: Permissions.Administrator)]
public class EmployeeController : Velo.Web.Helper.ControllerStandard
{
     //...
}
This example shows the declaration of a web controller action result Index, as administrator.
using Velo.Web.Helper;

public class EmployeeController : Velo.Web.Helper.ControllerStandard
{
    [Authentication(Permission: Permissions.Administrator)]
    public ActionResult Index()
    {
         //...
    }

    //...
}
See Also