C# Class Agribusiness.Web.Controllers.Filters.MembershipUserOnlyAttribute

Inheritance: System.Web.Mvc.AuthorizeAttribute, IAuthorizationFilter
显示文件 Open project: ucdavis/Agribusiness

Protected Methods

Method Description
AuthorizeCore ( System httpContext ) : bool
HandleUnauthorizedRequest ( System.Web.Mvc.AuthorizationContext filterContext ) : void

Private Methods

Method Description
IsValidEmail ( string email ) : bool

method for determining is the user provided a valid email address We use regular expressions in this check, as it is a more thorough way of checking the address provided

http://www.dreamincode.net/code/snippet1374.htm

Method Details

AuthorizeCore() protected method

protected AuthorizeCore ( System httpContext ) : bool
httpContext System
return bool

HandleUnauthorizedRequest() protected method

protected HandleUnauthorizedRequest ( System.Web.Mvc.AuthorizationContext filterContext ) : void
filterContext System.Web.Mvc.AuthorizationContext
return void