Skip to content

Recaptcha defines the basic functionality for verification of Recaptcha tokens (all version) generated on the client site.

License

Notifications You must be signed in to change notification settings

lukasaron/recaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reCaptcha

GoDoc Build Status Go Report Card License

reCaptcha defines the functionality for verification of reCaptcha tokens (all version) generated on the client site.

To make this project independent to any web server there is not an executable file/script, but only the library is performing the basic evaluation of provided token and result is captured in the VerifyResponse structure.

User of this library can define endpoints as the project requires. The only one required task is to define one environmental variable SECRET_KEY which has to hold the generated secret key value.

Installation

go get module github.com/lukasaron/recaptcha

Example of usage

package main

import (
	"fmt"
	"github.com/lukasaron/recaptcha"
)

func main() {
    token := "--- accept the token from the client side and pass it here --- "
    remoteIP := "--- fill the remote IP or leave empty --- "
	r, err := recaptcha.VerifyToken(token, remoteIP)
	fmt.Printf("Response: %+v\n, error: %v", r, err)
}

About

Recaptcha defines the basic functionality for verification of Recaptcha tokens (all version) generated on the client site.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages