Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aventer-ug/go-captcha

Captcha server written in golang
https://github.com/aventer-ug/go-captcha

captcha golang

Last synced: 24 days ago
JSON representation

Captcha server written in golang

Awesome Lists containing this project

README

        

# Go-Captcha API

Server to generate and check captcha

This Captcha Generation is using "Inter Font© SIL OpenFontLicense 1.1"

## Requirements

- Redis Server

## How to Use

As example, you can start the go-captcha API like that:

```bash
export API_PORT=10888
export API_BIND=0.0.0.0
export LOGLEVEL=debug
export REDIS_SERVER=localhost:6379

go run init.go app.go
```

If you want to generate a captcha:

```bash
curl -X GET localhost:10888/api/captcha/v0
```

It will give you as result a PNG File and in the HTTP Response Header a "sessiontoken". This token you have to add to your CaptchaCheck Request:

```bash
curl -H 'sessiontoken: ' -X POST localhost:10888/api/captcha/v0/
```

Thats it! Pretty easy.