|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
@Role public interface CaptchaVerifier
The CaptchaVerifier interface allows us to check if an answer to a captcha was correct.
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||