C# 클래스 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.
상속: System.Web.Mvc.FilterAttribute, IAuthorizationFilter
파일 보기 프로젝트 열기: DevRainSolutions/KyivSmartCity

공개 메소드들

메소드 설명
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.

메소드 상세

OnAuthorization() 공개 메소드

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

SpamProtectionAttribute() 공개 메소드

Initializes a new instance of the SpamProtectionAttribute class.
public SpamProtectionAttribute ( ) : System
리턴 System

SpamProtectionAttribute() 공개 메소드

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