PHPackages                             vanta/esia-gateway-client - 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. vanta/esia-gateway-client

ActiveLibrary[API Development](/categories/api)

vanta/esia-gateway-client
=========================

Pure client for ESIA gateway

0.5.3(1y ago)191MITPHPPHP ^8.2

Since Nov 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/VantaFinance/Esia-gateway-client)[ Packagist](https://packagist.org/packages/vanta/esia-gateway-client)[ RSS](/packages/vanta-esia-gateway-client/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (14)Versions (30)Used By (0)

ESIA gateway client
===================

[](#esia-gateway-client)

Клиент для общения со [шлюзом ЕСИА](https://wiki.esia.pro). Текущая версия поддерживает только взаимодействие через [ЦПГ HTTP API](https://wiki.esia.pro/docs/esia-gw/for-developers/sentinel-cpg/).

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

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

Минимальная версия PHP: 8.1

1. Выполнить `composer require vanta/esia-gateway-client`
2. Обязательно установить PSR-совместимый клиент

Использование
-------------

[](#использование)

Создание инстанса клиента:

```
use GuzzleHttp\Psr7\HttpFactory;
use Symfony\Component\HttpClient\CurlHttpClient;
use Symfony\Component\HttpClient\Psr18Client;
use Vanta\Integration\EsiaGateway\RestClientBuilder;
use Vanta\Integration\EsiaGateway\Infrastructure\HttpClient\ConfigurationClient;

$builder = RestClientBuilder::create(
    new Psr18Client(new CurlHttpClient(), new HttpFactory(), new HttpFactory()),
    new ConfigurationClient(
        clientId: 'YOUR_CLIENT_ID',
        clientSecret: 'YOUR_CLIENT_SECRET',
        url: 'YOUR_URL_GATEWAY',
        redirectUri: 'https://auth.vanta.ru'
    )
);

$client = $builder->createEsiaGatewayClient('https://demo.gate.esia.pro', 'https://pos-credit.ru');
```

Генерация URL для авторизации пользователя:

```
$authorizationUrl = $builder->createAuthorizationUrlBuilder()
    ->withPermission(ScopePermission::DRIVERS_LICENSE_DOC)
    ->withoutPermission(ScopePermission::MOBILE)
    ->build()
;
```

Обмен авторизационного кода на токен доступа и токен обновления:

```
$accessToken = $client->getPairKeyByAuthorizationCode($code);
```

Обмен токена обновления на токен доступа и новый токен обновления:

```
$accessToken = $client->getPairKeyByRefreshToken($refreshToken);
```

Получение информации о пользователе:

```
$userInfo = $client->getUserInfo($accessToken);
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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

Recently: every ~34 days

Total

29

Last Release

615d ago

PHP version history (2 changes)0.1PHP ^8.1

0.5PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/37250ac0f6117b7d479802e14fcc870f2e2a85e6c6f26a037cfacb08b3db70a1?d=identicon)[shashkov.root](/maintainers/shashkov.root)

---

Top Contributors

[![root-aza](https://avatars.githubusercontent.com/u/13816704?v=4)](https://github.com/root-aza "root-aza (22 commits)")

---

Tags

esiaesia-gateway

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vanta-esia-gateway-client/health.svg)

```
[![Health](https://phpackages.com/badges/vanta-esia-gateway-client/health.svg)](https://phpackages.com/packages/vanta-esia-gateway-client)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M739](/packages/sylius-sylius)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)

PHPackages © 2026

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