PHPackages                             slowprog/oauth2-modulbank - 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. slowprog/oauth2-modulbank

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

slowprog/oauth2-modulbank
=========================

Modulbank Provider for the OAuth 2.0 Client

1.0.0(9y ago)3253MITPHPPHP &gt;=5.5.0

Since Jul 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/SlowProg/oauth2-modulbank)[ Packagist](https://packagist.org/packages/slowprog/oauth2-modulbank)[ RSS](/packages/slowprog-oauth2-modulbank/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Modulbank Provider for OAuth 2.0 Client
=======================================

[](#modulbank-provider-for-oauth-20-client)

This package provides Modulbank OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

To install, use composer:

```
composer require slowprog/oauth2-modulbank

```

Usage
-----

[](#usage)

Usage is the same as The League's OAuth client, using `\League\OAuth2\Client\Provider\Modulbank` as the provider.

### Authorization Code Flow

[](#authorization-code-flow)

```
$provider = new \League\OAuth2\Client\Provider\Modulbank([
    'clientId'          => '{modulbank-client-id}',
    'clientSecret'      => '{modulbank-client-secret}',
    'redirectUri'       => 'https://example.com/callback-url',
    'debug'             => false
]);

// Get url for registration which must transfer to browser (send GET)
// $url = $provider->getRegistrationUrl($firstName, $lastName, $email, $cellPhone);
// Or
// Get url for authorization which must transfer to browser (send POST)
$url = $provider->getAuthorizationUrlShort();
$params = $provider->getAuthorizationParams([
    'scope' => 'account-info operation-history assistant-service money-transfer',
]);
```

Callback file:

```
$provider = new \League\OAuth2\Client\Provider\Modulbank([
    'clientId'          => '{modulbank-client-id}',
    'clientSecret'      => '{modulbank-client-secret}',
    'debug'             => false
]);

$token = $provider->getAccessToken('authorization_code', [
    'code' => $code
]);

// Use this to interact with an API on the users behalf
echo $token->getToken();
```

### Call methods

[](#call-methods)

```
$provider = new \League\OAuth2\Client\Provider\Modulbank([
    'clientId'          => '{modulbank-client-id}',
    'clientSecret'      => '{modulbank-client-secret}',
    'token'             => '{modulbank-client-token}',
    'debug'             => false
]);

$info = $provider->getAccountInfo();
// $history = $provider->getOperationHistory('9f65fff4-d638-41d8-83eb-a616039d3fe5');
// $balance = $provider->getBalance('9f65fff4-d638-41d8-83eb-a616039d3fe5');
```

### Managing Scopes

[](#managing-scopes)

When creating your Modulbank authorization URL, you can specify the state and scopes your application may authorize.

```
$params = $provider->getAuthorizationParams([
    'scope' => 'assistant-service money-transfer',
]);
```

If neither are defined, the provider will utilize internal defaults.

At the time of authoring this documentation, the [following scopes are available](https://api.modulbank.ru/auth/#_5).

- account-info
- operation-history
- assistant-service
- money-transfer

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/SlowProg/oauth2-modulbank/blob/master/LICENSE) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

3635d ago

### Community

Maintainers

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

---

Top Contributors

[![slowprog](https://avatars.githubusercontent.com/u/1294672?v=4)](https://github.com/slowprog "slowprog (8 commits)")[![dotzero](https://avatars.githubusercontent.com/u/265633?v=4)](https://github.com/dotzero "dotzero (1 commits)")

---

Tags

clientoauthoauth2authorizationauthorisationmodulbank

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/slowprog-oauth2-modulbank/health.svg)

```
[![Health](https://phpackages.com/badges/slowprog-oauth2-modulbank/health.svg)](https://phpackages.com/packages/slowprog-oauth2-modulbank)
```

###  Alternatives

[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2306.4M37](/packages/stevenmaguire-oauth2-keycloak)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

25310.7M73](/packages/thenetworg-oauth2-azure)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1152.7M11](/packages/patrickbussmann-oauth2-apple)[omines/oauth2-gitlab

GitLab OAuth 2.0 Client Provider for The PHP League OAuth2-Client

37779.2k16](/packages/omines-oauth2-gitlab)[league/oauth2-instagram

Instagram OAuth 2.0 Client Provider for The PHP League OAuth2-Client

781.1M44](/packages/league-oauth2-instagram)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

261.8M1](/packages/mollie-oauth2-mollie-php)

PHPackages © 2026

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