PHPackages                             geggleto/psr7-recaptcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. geggleto/psr7-recaptcha

ActiveLibrary[Framework](/categories/framework)

geggleto/psr7-recaptcha
=======================

0.0.1(10y ago)113.2k—0%[2 issues](https://github.com/geggleto/psr7-recaptcha/issues)MITPHP

Since Nov 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/geggleto/psr7-recaptcha)[ Packagist](https://packagist.org/packages/geggleto/psr7-recaptcha)[ RSS](/packages/geggleto-psr7-recaptcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

psr7-recaptcha
==============

[](#psr7-recaptcha)

Configuration
-------------

[](#configuration)

This middleware helps you guard your application with ReCaptcha. You can use it as a middleware or even just as an object in your service layer

This package uses the "google/recaptcha" package to handle the bulk of the lifting.

Usage
-----

[](#usage)

The class is invokable

```
$container[Recaptcha::class] = new \ReCaptcha\ReCaptcha($key);

$recaptcha = new \Geggleto\Service\Captcha($container[Recaptcha::class]);

//As Middleware
$app->post('/login', 'Auth:login')->add($recaptcha);

//Anywhere else
$recaptcha->verify($response, $ip);
```

```
// Slim 3 Example
// Container File
//...
use Geggleto\Service\Captcha;
use ReCaptcha\ReCaptcha;
//...
    Captcha::class => function ($c) {
        return new Captcha($c[ReCaptcha::class]);
    },
    ReCaptcha::class => function ($c) {
        return new ReCaptcha($c['captcha']['key']);
    },
    'errorHandler' => function ($c) { //CUSTOM Error Handler
        return function (\Slim\Http\Request $request, \Slim\Http\Response $response, $exception) use ($c) {
            return $c['view']->render($response, "errors/servererror.twig", ["exception" => $exception]);
        };
    }
//...

//In routes.php

//Grab the instance from the Container
$captcha = $app->getContainer()->get(Captcha::class);

//Applying it to routes
$app->post('/signin', Home::class.':processLogin')->add($captcha);
$app->post('/forgot', Home::class.':processForgot')->add($captcha);
$app->post('/recover/{key}', Home::class.':processRecover')->add($captcha);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3836d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f941aecd52e3f8ac94dbe9b714801c7adc767acc32644d3ee6a4efeded84c5e?d=identicon)[geggleto](/maintainers/geggleto)

---

Top Contributors

[![geggleto](https://avatars.githubusercontent.com/u/4027602?v=4)](https://github.com/geggleto "geggleto (3 commits)")

---

Tags

middlewareframeworkslim

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/geggleto-psr7-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/geggleto-psr7-recaptcha/health.svg)](https://phpackages.com/packages/geggleto-psr7-recaptcha)
```

###  Alternatives

[slim/csrf

Slim Framework 4 CSRF protection PSR-15 middleware

3512.1M94](/packages/slim-csrf)[slim/http-cache

Slim Framework HTTP cache middleware and service provider

1242.9M27](/packages/slim-http-cache)[davidepastore/slim-validation

A slim middleware for validation based on Respect/Validation

171223.7k3](/packages/davidepastore-slim-validation)[bnf/slim3-psr15

PSR-15 middleware support for Slim Framework v3

10177.0k5](/packages/bnf-slim3-psr15)[pavlakis/slim-cli

Making a mock GET request through the CLI and enabling the same application entry point on CLI scripts.

3691.9k3](/packages/pavlakis-slim-cli)[yiisoft/yii-middleware

Yii Middleware

21151.3k1](/packages/yiisoft-yii-middleware)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
