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

ActiveLibrary

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

Pure client for ESIA gateway

0.5.3(1y ago)192MITPHPPHP ^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 1mo 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

30

—

LowBetter than 64% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

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

562d 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.4k5.6M651](/packages/sylius-sylius)[symfony/serializer-pack

A pack for the Symfony serializer

1.1k28.2M221](/packages/symfony-serializer-pack)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k136](/packages/symfony-ai-platform)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1195.3M72](/packages/web-auth-webauthn-lib)

PHPackages © 2026

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