@Role
public interface CaptchaVerifier
| Modifier and Type | Method and Description |
|---|---|
String |
getUserId(javax.servlet.http.HttpServletRequest request)
Uses an HttpServletRequest object to get a unique id string to tell different users apart.
|
boolean |
isAnswerCorrect(String captchaId,
String answer)
Check if the solution to a captcha is correct.
|
boolean isAnswerCorrect(String captchaId, String answer) throws Exception
captchaId - A String used to identify the captcha which is to be solved because multiple users may
be solving captchas at the same time and which captcha belongs to who can't be confused.answer - The provided solution.Exception - If for some reason the CaptchaService fails or cannot be reached, or if the
CaptchaService has no record of any captcha gotten with the given captchaId.String getUserId(javax.servlet.http.HttpServletRequest request)
request - The HttpServletRequest sent by the user who must be identified.Copyright © 2004–2015 XWiki. All rights reserved.