C# Class CardShop.Auth.AuthorizeUserAttribute

Used to specify a method or class that requires authentication.
Inheritance: System.Web.Mvc.AuthorizeAttribute
Afficher le fichier Open project: egreene/PracticeGDVP Class Usage Examples

Méthodes publiques

Méthode Description
AuthorizeUserAttribute ( ) : System

Requires the user to be logged in, but not of any particular role.

Méthodes protégées

Méthode Description
AuthorizeCore ( System.Web.HttpContextBase httpContext ) : bool

Will check to see if the currently-acting user has any of the provided roles. Otherwise, if no roles are specified, the check will merely be to see if the user is logged in.

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

If the user is logged in, a 403 view will be rendered. If the user is not logged in, the action will be passed onto the default handler (asking them to login).

Method Details

AuthorizeCore() protected méthode

Will check to see if the currently-acting user has any of the provided roles. Otherwise, if no roles are specified, the check will merely be to see if the user is logged in.
protected AuthorizeCore ( System.Web.HttpContextBase httpContext ) : bool
httpContext System.Web.HttpContextBase
Résultat bool

AuthorizeUserAttribute() public méthode

Requires the user to be logged in, but not of any particular role.
public AuthorizeUserAttribute ( ) : System
Résultat System

HandleUnauthorizedRequest() protected méthode

If the user is logged in, a 403 view will be rendered. If the user is not logged in, the action will be passed onto the default handler (asking them to login).
protected HandleUnauthorizedRequest ( System.Web.Mvc.AuthorizationContext filterContext ) : void
filterContext System.Web.Mvc.AuthorizationContext
Résultat void