PHPackages                             mikoweb/simple-api-key-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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. mikoweb/simple-api-key-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

mikoweb/simple-api-key-bundle
=============================

Simple Api Key

v0.1.1(9y ago)017LGPLv3PHPPHP &gt;=5.5.9

Since Apr 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mikoweb/simple-api-key-bundle)[ Packagist](https://packagist.org/packages/mikoweb/simple-api-key-bundle)[ Docs](http://mikoweb.pl)[ RSS](/packages/mikoweb-simple-api-key-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Simple Api Key Bundle
=====================

[](#simple-api-key-bundle)

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

[](#installation)

Requires composer, install as follows:

```
composer require mikoweb/simple-api-key-bundle

```

### Enable Bundle

[](#enable-bundle)

Place in your AppKernel.php to enable the bundle:

```
// app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Uecode\Bundle\ApiKeyBundle\UecodeApiKeyBundle(),
            new FOS\UserBundle\FOSUserBundle(),
            new Mikoweb\Bundle\SimpleApiKeyBundle\MikowebSimpleApiKeyBundle(),
        );

        // ...
    }
}
```

### Configuration

[](#configuration)

Import following files in config.yml:

```
imports:
    # ...
    - { resource: api_groups.yml }
    - { resource: api_keys.yml }
```

Example groups file:

```
mikoweb_simple_api_key:
    groups:
        api_user:
            roles:
                - ROLE_API_USER
                - ROLE_DO_SOMETHING
                - ROLE_ACCESS_TO_ARTICLES
        api_extended_user:
            roles:
                - ROLE_API_USER
                - ROLE_DO_SOMETHING
                - ROLE_ACCESS_TO_ARTICLES
                - ROLE_EXTENDED_ACCESS
```

Example keys file:

```
mikoweb_simple_api_key:
    keys:
        normal_key: api_user
        extended_key: api_extended_user
        krwntfibN8: api_user
```

Add following entries to config.yml

```
# FOSUserBundle
fos_user:
    db_driver:      orm
    firewall_name:  api
    user_class:     Mikoweb\Bundle\SimpleApiKeyBundle\Entity\User

# UecodeApiKeyBundle
uecode_api_key:
    delivery: header
    parameter_name: X-Api-Key

# SimpleApiKeyBundle
mikoweb_simple_api_key:
    user_class: Mikoweb\Bundle\SimpleApiKeyBundle\Entity\User
```

#### Security firewall

[](#security-firewall)

`security.yml`

```
security:
    role_hierarchy:
        ROLE_API_USER: ROLE_USER

    providers:
        api_key:
            id: mikoweb.simple_api_key.api_key_user_provider

    firewalls:
        api:
            pattern:    ^/api/*
            api_key:    true
            stateless:  true
            provider:   api_key

    access_control:
        - { path: ^/api/, role: ROLE_API_USER }
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Every ~0 days

Total

2

Last Release

3367d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4729995?v=4)[Rafał Mikołajun](/maintainers/mikoweb)[@mikoweb](https://github.com/mikoweb)

---

Top Contributors

[![mikoweb](https://avatars.githubusercontent.com/u/4729995?v=4)](https://github.com/mikoweb "mikoweb (2 commits)")

### Embed Badge

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

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

PHPackages © 2026

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