PHPackages                             quillphp/key-auth - 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. [API Development](/categories/api)
4. /
5. quillphp/key-auth

ActiveLibrary[API Development](/categories/api)

quillphp/key-auth
=================

API Key authentication middleware for the Quill PHP framework

00PHPCI passing

Since Apr 6Pushed 2d agoCompare

[ Source](https://github.com/quillphp/quill-key-auth)[ Packagist](https://packagist.org/packages/quillphp/key-auth)[ RSS](/packages/quillphp-key-auth/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Quill API Key Auth Middleware
=============================

[](#quill-api-key-auth-middleware)

High-speed API Key authentication middleware for the [Quill PHP Framework](https://quillphp.com).

Installation
------------

[](#installation)

```
composer require quillphp/key-auth
```

Usage
-----

[](#usage)

```
use Quill\KeyAuth\KeyAuth;

$app->use(KeyAuth::new([
    'keys'   => ['secret-api-key-1', 'secret-api-key-2'],
    'header' => 'X-API-Key',
]));
```

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

[](#configuration)

OptionDefaultDescription`query``'api\_key'`The URL query parameter to check.`keys``\[\]`An array of valid API keys.`validator``null`Custom validator closure: `fn(string $key) =&gt; bool`.`error\_code``401`The error code to return for unauthorized requests.`error\_message``'Unauthorized: Invalid or missing API Key'`The error message to return.License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4742b2ad737c14793d6b0a418e6da90b446153a4d7ba120a1f3c07e2a2951d28?d=identicon)[quillphp](/maintainers/quillphp)

---

Top Contributors

[![fr3on](https://avatars.githubusercontent.com/u/26393383?v=4)](https://github.com/fr3on "fr3on (1 commits)")

---

Tags

apikey-authmiddlewarephp

### Embed Badge

![Health badge](/badges/quillphp-key-auth/health.svg)

```
[![Health](https://phpackages.com/badges/quillphp-key-auth/health.svg)](https://phpackages.com/packages/quillphp-key-auth)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M470](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M94](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

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