Skip to content

This package implements google recaptcha code verification.

Notifications You must be signed in to change notification settings

vloldik/gorecaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About package

This package implements google recaptcha code verification.

Installation

go get github.com/vloldik/gorecaptcha

Usage

// Create assessment service
assessmentService := gorecaptcha.NewAssessmentService(option, projectId, captchaKey)
// Create and validate assessment of given token, check if action is LOGIN and score is more than 0.4
assessment, err := assessmentService.CreateAndValidateAssessment(context, token, "LOGIN", 0.4)

An err will be nil if all conditions in the AssessmentService.ValidateAssessment() function are met.

Create an option

// With API key
option := option.WithAPIKey(apiKey)
// With Credentials.json (service credentials, etc.)
option := option.WithCredentialsFile(fileName)

Links to related documentation

About

This package implements google recaptcha code verification.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages