| 37459 |
amit |
1 |
package com.smartdukaan.cron.scheduled;
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Supplies a g-recaptcha-response token for the Motorola warranty page.
|
|
|
5 |
*
|
|
|
6 |
* The page is Oracle Service Cloud (RightNow). Its lookup endpoint answers
|
|
|
7 |
* "==CHALLENGE REQUIRED==" and hands back a Google reCAPTCHA v2 config
|
|
|
8 |
* (sitekey 6LcHf0wUAAAAAFxRHKequHkHUGyUWA5dy24ZaB5s) instead of the warranty
|
|
|
9 |
* payload, on the FIRST lookup of a clean session -- it is not rate-triggered.
|
|
|
10 |
*
|
|
|
11 |
* This is deliberately an unimplemented seam. reCAPTCHA v2 is not a puzzle with
|
|
|
12 |
* a computable answer the way vivo's 4-char image or the oppo/realme DingXiang
|
|
|
13 |
* slider are, so there is no solver to write here in the way CaptchaService
|
|
|
14 |
* solves vivo. Point this at whatever token source is actually sanctioned --
|
|
|
15 |
* the Lenovo partner warranty API (supportapi.lenovo.com, ClientID-based) is
|
|
|
16 |
* the route that removes the need for a browser at all.
|
|
|
17 |
*
|
|
|
18 |
* Until a bean implementing this exists, CheckMotorolaWarrantyTask detects the
|
|
|
19 |
* challenge, logs it once, and abandons the batch rather than hammering the
|
|
|
20 |
* endpoint with lookups that cannot succeed.
|
|
|
21 |
*/
|
|
|
22 |
public interface MotorolaChallengeSolver {
|
|
|
23 |
|
|
|
24 |
/**
|
|
|
25 |
* @param siteKey reCAPTCHA sitekey scraped from the challenge payload
|
|
|
26 |
* @param pageUrl the warranty page the challenge was raised on
|
|
|
27 |
* @return a token to post back as g-recaptcha-response, or null if none
|
|
|
28 |
* can be supplied (the caller then skips the batch)
|
|
|
29 |
*/
|
|
|
30 |
String solve(String siteKey, String pageUrl);
|
|
|
31 |
}
|