C# 클래스 Evbpc.Framework.Integrations.Google.ReCaptcha.Validator

This class provides the ability to easily implement Google's reCAPTCHA.
See: https://www.google.com/recaptcha/intro/index.html
파일 보기 프로젝트 열기: EBrown8534/Framework

공개 메소드들

메소드 설명
GetBodyDivContent ( ) : string

Returns the <div> that should be inserted in the HTML where the reCAPTCHA should be rendered.

This method allows you to pass an arbitrary list of extra classes, regardless of what the current instance may contain.

Validate ( NameValueCollection form, string remoteIp = null ) : Response

Determines if the reCAPTCHA response in a NameValueCollection passed validation.

If the returned Response is null, then a severe error occurred during the exchange.

Validator ( string reCaptchaSecret, string reCaptchaSiteKey ) : System

Creates a new instance of the Validator.

보호된 메소드들

메소드 설명
GetPostParameters ( string reCaptchaFormResponse, string remoteIp = null ) : NameValueCollection

Returns the parameters to be placed within the post body of a validation message.

UploadRecaptchaResponse ( NameValueCollection postParameters ) : string

Uploads a request to the Google API for reCAPTCHA data to be validated.

메소드 상세

GetBodyDivContent() 공개 메소드

Returns the <div> that should be inserted in the HTML where the reCAPTCHA should be rendered.
This method allows you to pass an arbitrary list of extra classes, regardless of what the current instance may contain.
public GetBodyDivContent ( ) : string
리턴 string

GetPostParameters() 보호된 메소드

Returns the parameters to be placed within the post body of a validation message.
protected GetPostParameters ( string reCaptchaFormResponse, string remoteIp = null ) : NameValueCollection
reCaptchaFormResponse string The response from the reCAPTCHA form.
remoteIp string An optional IP to include as the origin of the reCAPTCHA form.
리턴 System.Collections.Specialized.NameValueCollection

UploadRecaptchaResponse() 보호된 정적인 메소드

Uploads a request to the Google API for reCAPTCHA data to be validated.
protected static UploadRecaptchaResponse ( NameValueCollection postParameters ) : string
postParameters System.Collections.Specialized.NameValueCollection The parameters to send in the POST message.
리턴 string

Validate() 공개 메소드

Determines if the reCAPTCHA response in a NameValueCollection passed validation.
If the returned Response is null, then a severe error occurred during the exchange.
public Validate ( NameValueCollection form, string remoteIp = null ) : Response
form System.Collections.Specialized.NameValueCollection The Request.Form to validate.
remoteIp string An optional IPAddress
리턴 Response

Validator() 공개 메소드

Creates a new instance of the Validator.
public Validator ( string reCaptchaSecret, string reCaptchaSiteKey ) : System
reCaptchaSecret string The reCAPTCHA secret.
reCaptchaSiteKey string The reCAPTCHA site key.
리턴 System