PHPackages                             ma27/api-key-authentication-bundle - 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. [Database &amp; ORM](/categories/database)
4. /
5. ma27/api-key-authentication-bundle

AbandonedArchivedSymfony-bundle[Database &amp; ORM](/categories/database)

ma27/api-key-authentication-bundle
==================================

A bundle that provides the possibility to generate api keys for rest apis

1.2.1(9y ago)84.2k↓50%2[1 issues](https://github.com/Ma27/Ma27ApiKeyAuthenticationBundle/issues)MITPHPPHP &gt;=5.3.9

Since Aug 28Pushed 8y ago3 watchersCompare

[ Source](https://github.com/Ma27/Ma27ApiKeyAuthenticationBundle)[ Packagist](https://packagist.org/packages/ma27/api-key-authentication-bundle)[ RSS](/packages/ma27-api-key-authentication-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (17)Used By (0)

Ma27ApiKeyAuthenticationBundle
==============================

[](#ma27apikeyauthenticationbundle)

[![Build Status](https://camo.githubusercontent.com/66835e56355f1e56718f6bcb3f370982e1edcb6c3516db23e2ef2ed7ca5a7e17/68747470733a2f2f7472617669732d63692e6f72672f4d6132372f4d6132374170694b657941757468656e7469636174696f6e42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Ma27/Ma27ApiKeyAuthenticationBundle)[![Code Coverage](https://camo.githubusercontent.com/5f6db18375330370cd0947204ec73790d8d20076af00e8149e8667f6e59d7924/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d6132372f4d6132374170694b657941757468656e7469636174696f6e42756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Ma27/Ma27ApiKeyAuthenticationBundle/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0801c5442b1fbdd5070c9635501bb534d05c1f03023c62c6533e5874a3438170/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d6132372f4d6132374170694b657941757468656e7469636174696f6e42756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Ma27/Ma27ApiKeyAuthenticationBundle/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/99bf781a06cf099df28884d04a6c9f775d687fa49bb5283a29b5216d516267c8/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33643865313865322d303662352d343037642d396336612d3437323435383832643864382f6d696e692e706e67)](https://insight.sensiolabs.com/projects/3d8e18e2-06b5-407d-9c6a-47245882d8d8)[![Latest Stable Version](https://camo.githubusercontent.com/d55f91f4029ec816f03e3380fee462f4a71fb8345630dda4dacdd603b7f3758e/68747470733a2f2f706f7365722e707567782e6f72672f6d6132372f6170692d6b65792d61757468656e7469636174696f6e2d62756e646c652f762f737461626c65)](https://packagist.org/packages/ma27/api-key-authentication-bundle)[![License](https://camo.githubusercontent.com/6d05fa63b53a5659a9a532e898ac2782886817de66868bee2eed19c071f6d02f/68747470733a2f2f706f7365722e707567782e6f72672f6d6132372f6170692d6b65792d61757468656e7469636174696f6e2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/ma27/api-key-authentication-bundle)

Symfony Bundle which provides an approach to authenticate users with API tokens.

### Current status

[](#current-status)

Unfortunately [@Ma27](https://github.com/Ma27/) doesn't have sufficient time to to keep this project running. Just open an issue if you're interested in helping out.

1. About

---

This bundle applies the concept of a stateless user authenticator as described in the [Symfony CookBook](http://symfony.com/doc/current/cookbook/security/api_key_authentication.html).

Furthermore it contains some extra features:

- RESTful actions in order to generate its own api key and for the logout
- Generator for safe API keys
- Abstract model based on `doctrine/common` (it is possible to use any Doctrine implementation like `doctrine/mongodb-odm` or `doctrine/phpcr-odm`)
- Powerful event system (it is possible to hook into all important processes)
- Implementation to manage password hashing using different strategies
- Command which purges API keys that weren't used for a certain time

2. Documentation

---

### Basic introduction

[](#basic-introduction)

To get a basic idea of how this bundle works, please refer to the following `medium.com` blogposts:

- [Authenticate users with API keys using Symfony and Doctrine](https://medium.com/@_Ma27_/authenticate-users-with-api-keys-using-symfony-and-doctrine-b2270752261a#.it9rtcrq7)
- [How to block users with the Ma27ApiKeyAuthenticationBundle](https://medium.com/@_Ma27_/how-to-block-users-with-the-ma27apikeyauthenticationbundle-5e71dc087b7d#.adfp9rpfn)

### Official documentation

[](#official-documentation)

In order to read the official documentation, please refer to the [Resources/doc/index.md](https://github.com/Ma27/Ma27ApiKeyAuthenticationBundle/blob/master/Resources/doc/index.md) file.

3. Support and BC promise

---

For changes in newly release versions please review the [CHANGELOG.md](https://github.com/Ma27/Ma27ApiKeyAuthenticationBundle/blob/master/CHANGELOG.md). To get more information about how to contribute please refer to the [CONTRIBUTING.md](https://github.com/Ma27/Ma27ApiKeyAuthenticationBundle/blob/master/.github/CONTRIBUTING.md).

### 1.2.x

[](#12x)

Version `1.2` is the latest `1.x` release and will experience support for one year after the final `2.0.0` release came out. The `1.2` version still supports a lot of legacy PHP versions (`hhvm` and PHP from `5.3.9`).

### 2.x

[](#2x)

Version `2.0` dropped support for each PHP and HHVM versions except PHP 7.1. The support Symfony versions are `2.8` and all `3.x` versions.

### Handling BC breaks

[](#handling-bc-breaks)

The ancient, unsupported development versions (all `0.x` versions) were experimental development versions and contained BC breaks.

From the `1.x` versions on backward compatibility is provided when jumping between minor releases. This rule doesn't apply to internals of the codebase (these internals are marked with the `@internal` annotation or have a `private` visibility modifier).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 97.3% 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

Every ~31 days

Recently: every ~53 days

Total

16

Last Release

3439d ago

Major Versions

0.1.2 → 1.02016-01-19

v1.2.x-dev → 2.0.0-alpha12016-12-17

PHP version history (2 changes)0.1-alphaPHP &gt;=5.3.9

2.0.0-alpha1PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/da644c2575ef6c95cced206737b1bd24246a3b44fd6ce71011b4b401dcc4fab9?d=identicon)[Ma27](/maintainers/Ma27)

![](https://avatars.githubusercontent.com/u/10898370?v=4)[Ben Bieler](/maintainers/benbieler)[@benbieler](https://github.com/benbieler)

---

Top Contributors

[![Ma27](https://avatars.githubusercontent.com/u/6025220?v=4)](https://github.com/Ma27 "Ma27 (107 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (3 commits)")

---

Tags

doctrinesecuritysymfonysymfony-bundlesecurityAuthenticationSymfony Bundleapi-key

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ma27-api-key-authentication-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ma27-api-key-authentication-bundle/health.svg)](https://phpackages.com/packages/ma27-api-key-authentication-bundle)
```

###  Alternatives

[majkl578/nette-identity-doctrine

Integration of entities implementing IIdentity in Nette 2

28119.1k](/packages/majkl578-nette-identity-doctrine)[tommyknocker/pdo-database-class

Framework-agnostic PHP database library with unified API for MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, and Oracle. Query Builder, caching, sharding, window functions, CTEs, JSON, migrations, ActiveRecord, CLI tools, AI-powered analysis. Zero external dependencies.

845.7k](/packages/tommyknocker-pdo-database-class)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

813.1k](/packages/ahmed-bhs-doctrine-doctor)[andanteproject/soft-deletable-bundle

A Symfony Bundle to handle soft deletable with Doctrine Entities

1028.3k](/packages/andanteproject-soft-deletable-bundle)

PHPackages © 2026

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