LCCaptcha
Objective-C
@interface LCCaptcha : NSObject
/**
Request a captcha.
This method get a captcha digest from server.
You can use the captcha digest to verify a captcha code that recognized by user.
@param options The options that configure the captcha.
@param callback The callback of request.
*/
+ (void)requestCaptchaWithOptions:(nullable LCCaptchaRequestOptions *)options
callback:(LCCaptchaRequestCallback)callback;
/**
Verify a captcha code for captcha digest that you've requested before.
@param captchaCode The symbols user recognized from captcha image.
@param captchaDigest The captcha digest that you've requested before.
@param callback The callback of request.
*/
+ (void)verifyCaptchaCode:(NSString *)captchaCode
forCaptchaDigest:(LCCaptchaDigest *)captchaDigest
callback:(LCCaptchaVerificationCallback)callback;
@end
Swift
class LCCaptcha : NSObject
Undocumented
-
Request a captcha.
This method get a captcha digest from server. You can use the captcha digest to verify a captcha code that recognized by user.
Declaration
Objective-C
+ (void)requestCaptchaWithOptions:(nullable LCCaptchaRequestOptions *)options callback:(nonnull LCCaptchaRequestCallback)callback;
Swift
class func request(with options: LCCaptchaRequestOptions?, callback: @escaping LCCaptchaRequestCallback)
Parameters
options
The options that configure the captcha.
callback
The callback of request.
-
Verify a captcha code for captcha digest that you’ve requested before.
Declaration
Objective-C
+ (void)verifyCaptchaCode:(nonnull NSString *)captchaCode forCaptchaDigest:(nonnull LCCaptchaDigest *)captchaDigest callback:(nonnull LCCaptchaVerificationCallback)callback;
Swift
class func verifyCaptchaCode(_ captchaCode: String, for captchaDigest: LCCaptchaDigest, callback: @escaping LCCaptchaVerificationCallback)
Parameters
captchaCode
The symbols user recognized from captcha image.
captchaDigest
The captcha digest that you’ve requested before.
callback
The callback of request.