Alexander "Arav" Andreev
925d48c10d
ICaptchaDB interface renamed to CaptchaDB. And implementation was renamed to InMemoryCaptchaDB. Composition of sync.Mutex was moved to the top of struct. Methods was rearranged to resemble order from CaptchaDB interface.
justcaptcha ver. 1.1
A simple CAPTCHA service implementation.
Usage
justcaptchad -expiry 5m -listen /var/run/justcaptchad/j.sock
-expiry
takes time for CAPTCHA to be valid for in format XX{s,m,h}.
-listen
is ip:port
or /path/to/unix.sock
to listen on.
API
Get a new captcha
GET /
It will return an ID of a new captcha in plaintext.
HTTP codes
200
if created
Get an image for a captcha
GET /:captcha_id/image?style=
Responds with an image (e.g. in PNG format).
An optional query parameter style=
could be supplied if captcha implementation
support different styles.
HTTP codes
200
if exists404
if doesn't exist500
if for some reason Image wasn't created
Submit an answer
POST /:captcha_id
It takes one form-data parameter answer=123456
.
Responds with empty body and one of HTTP codes.
HTTP codes
200
if solved403
if not solved404
if doesn't exist
Check if captcha is solved
GET /:captcha_id
Responds with empty body and one of HTTP codes.
HTTP codes
200
if solved403
if not solved404
if doesn't exist
Description
justcaptcha ver. 2.1.0
Latest
Languages
Go
100%