C# Class DevRainSolutions.KyivSmartCity.New.Models.SpamProtectionAttribute

Verifies that a form has not been submitted in a too short timespan. Used in POST scenarios to ensure that no spam-bot is performing the request.
Inheritance: System.Web.Mvc.FilterAttribute, IAuthorizationFilter
Afficher le fichier Open project: DevRainSolutions/KyivSmartCity

Méthodes publiques

Méthode Description
OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void

Called when a process requests authorization.

SpamProtectionAttribute ( ) : System

Initializes a new instance of the SpamProtectionAttribute class.

SpamProtectionAttribute ( int timespan ) : System

Initializes a new instance of the SpamProtectionAttribute class.

Method Details

OnAuthorization() public méthode

Called when a process requests authorization.
public OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void
filterContext System.Web.Mvc.AuthorizationContext The filter context.
Résultat void

SpamProtectionAttribute() public méthode

Initializes a new instance of the SpamProtectionAttribute class.
public SpamProtectionAttribute ( ) : System
Résultat System

SpamProtectionAttribute() public méthode

Initializes a new instance of the SpamProtectionAttribute class.
public SpamProtectionAttribute ( int timespan ) : System
timespan int The he minimum timespan between GET- and POST-request.
Résultat System