PHPackages                             coresite/apiauthbundle - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. coresite/apiauthbundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

coresite/apiauthbundle
======================

Authorization for token for REST application.

0.3.2(9y ago)1142MITPHPPHP &gt;=7.0.0

Since Jun 17Pushed 9y ago2 watchersCompare

[ Source](https://github.com/CoreSite/APIAuthBundle)[ Packagist](https://packagist.org/packages/coresite/apiauthbundle)[ Docs](https://github.com/CoreSite/CoreBundle)[ RSS](/packages/coresite-apiauthbundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (14)Used By (0)

APIAuthBundle
=============

[](#apiauthbundle)

Авторизация по токену, для REST приложений.

Установка и подключение
=======================

[](#установка-и-подключение)

Установка:
----------

[](#установка)

```
$ composer require coresite/apiauthbundle

```

Подключение:
------------

[](#подключение)

```
// app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new CoreSite\APIAuthBundle\CoreSiteAPIAuthBundle(),
            // ...
        );

        // ...
    }
}

```

Настройка:
----------

[](#настройка)

Пример настройки, вам скорее всего придется производить настройку под свою конфигурацию.

```
// app/security.yml
firewalls:

    # ...

    api:
        pattern: ^/api
        stateless: true
        simple_preauth:
            authenticator: cs_apiauth_authenticator
            provider: cs_apiauth_user_provider

    api_login:
        provider: fos_userbundle
        stateless: true
        anonymous: ~
        cs_apiauth_login:
            check_path:               api_login_check
            username_parameter:       _username
            password_parameter:       _password
            success_handler:          cs_apiauth_user_handler_authentication_success
            failure_handler:          cs_apiauth_user_handler_authentication_failure
            require_previous_session: false
        logout:
            success_handler:          cs_apiauth_user_handler_logout

    # ...

    providers:
        fos_userbundle:
            id: fos_user.user_provider.username
        cs_apiauth_user_provider:
            id: cs_apiauth_user_provider

        access_control:
            - { path: ^/api, role: IS_AUTHENTICATED_FULLY }
            - { path: ^/login_check, roles: IS_AUTHENTICATED_ANONYMOUSLY }

    # ...

```

Создание таблицы для хранение токенов:
--------------------------------------

[](#создание-таблицы-для-хранение-токенов)

```
    # php bin/console doctrine:schema:update --force

```

Отказ от отвестовенности
------------------------

[](#отказ-от-отвестовенности)

Обратите внимание, что данный бандел разработан для личных нужд и не является до конца доработанным проектом, его использование не рекомендуется промышленных целей. Автор не несет ни какой ответственности за проблемы которые могут возникнут при использования данного кода.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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 ~21 days

Total

13

Last Release

3413d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5933200?v=4)[CoreSite](/maintainers/CoreSite)[@CoreSite](https://github.com/CoreSite)

---

Top Contributors

[![CoreSite](https://avatars.githubusercontent.com/u/5933200?v=4)](https://github.com/CoreSite "CoreSite (66 commits)")

---

Tags

apirestauth

### Embed Badge

![Health badge](/badges/coresite-apiauthbundle/health.svg)

```
[![Health](https://phpackages.com/badges/coresite-apiauthbundle/health.svg)](https://phpackages.com/packages/coresite-apiauthbundle)
```

###  Alternatives

[zoonman/linkedin-api-php-client

LinkedIn API PHP SDK with OAuth 2.0 &amp; CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.

128716.7k](/packages/zoonman-linkedin-api-php-client)[ezralazuardy/heimdall

Painless OAuth 2.0 Server for CodeIgniter 4

454.2k](/packages/ezralazuardy-heimdall)

PHPackages © 2026

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