Skip to main content

5.3.5 VerifyCode

Introduction​

VerifyCode renders script text as a PNG verification code using Java’s built-in graphics and image encoding APIs.

Purpose​

Responses use image/png and Cache-Control: no-store. Images include random colors, character rotation and interference lines. Input must be a non-blank string of at most 32 characters without control characters.

Applications generate, store and verify challenge text. The handler generates the image. Script failures and invalid text produce a Structure failure response.

Usage​

Call POST /verifyCode with {"text":"A7K9"}:

return ${text};

PNG image generated by the VerifyCode handler

Configuration​

Select VerifyCode in the console or set the API option below, then save and publish:

API options
{"resultHandler": "verifyCode"}