Search in sources :

Example 1 with GenerateCaptureResponseEnvelope

use of org.haiku.haikudepotserver.api2.model.GenerateCaptureResponseEnvelope in project haikudepotserver by haiku.

the class CaptchaApiImpl method generateCaptcha.

@Override
public ResponseEntity<GenerateCaptureResponseEnvelope> generateCaptcha(Object body) {
    GenerateCaptchaResult resultV1 = captchaApiV1.generateCaptcha(new GenerateCaptchaRequest());
    org.haiku.haikudepotserver.api2.model.GenerateCaptchaResult resultV2 = new org.haiku.haikudepotserver.api2.model.GenerateCaptchaResult();
    resultV2.setToken(resultV1.token);
    resultV2.setPngImageDataBase64(resultV1.pngImageDataBase64);
    return ResponseEntity.ok(new GenerateCaptureResponseEnvelope().result(resultV2));
}
Also used : GenerateCaptureResponseEnvelope(org.haiku.haikudepotserver.api2.model.GenerateCaptureResponseEnvelope) GenerateCaptchaResult(org.haiku.haikudepotserver.api1.model.captcha.GenerateCaptchaResult) GenerateCaptchaRequest(org.haiku.haikudepotserver.api1.model.captcha.GenerateCaptchaRequest)

Aggregations

GenerateCaptchaRequest (org.haiku.haikudepotserver.api1.model.captcha.GenerateCaptchaRequest)1 GenerateCaptchaResult (org.haiku.haikudepotserver.api1.model.captcha.GenerateCaptchaResult)1 GenerateCaptureResponseEnvelope (org.haiku.haikudepotserver.api2.model.GenerateCaptureResponseEnvelope)1