PHPackages                             bigbank/digidoc - 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. bigbank/digidoc

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

bigbank/digidoc
===============

Library to interface with the Estonian national identification platform (DigiDocService)

0.3.1(9y ago)6423.7k—8.7%2Apache-2.0PHPPHP &gt;=5.6

Since Nov 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/bigbank-as/digidoc)[ Packagist](https://packagist.org/packages/bigbank/digidoc)[ RSS](/packages/bigbank-digidoc/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (6)Used By (0)

PHP Library for Estonian Digital ID (DigiDocService)
====================================================

[](#php-library-for-estonian-digital-id-digidocservice)

[![Latest Stable Version on Packagist](https://camo.githubusercontent.com/4c005084d95fa118fc8a9b01d82b25afa9ff58ab4a57e6ad24f3fd013142b165/68747470733a2f2f706f7365722e707567782e6f72672f62696762616e6b2f64696769646f632f762f737461626c65)](https://packagist.org/packages/bigbank/digidoc)[![Software License](https://camo.githubusercontent.com/9f8d4e996bddb412067051554a39753f5a85c5876896b1c31209006e39583eab/68747470733a2f2f706f7365722e707567782e6f72672f62696762616e6b2f64696769646f632f6c6963656e7365)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/570260808adc39f8336bee007a7162f273c051b051b64918dd1c8562057f3d7f/68747470733a2f2f6170692e7472617669732d63692e6f72672f62696762616e6b2d61732f64696769646f632e737667)](https://travis-ci.org/bigbank-as/digidoc)[![Total Downloads](https://camo.githubusercontent.com/bf221741fcb8e62632794c93a2ae6db154370fb12611edc8f92aee1cce58a5e3/68747470733a2f2f706f7365722e707567782e6f72672f62696762616e6b2f64696769646f632f646f776e6c6f616473)](https://packagist.org/packages/bigbank/digidoc)

This is a PHP library for communicating with the [Certification Centre](https://sk.ee/en)'s [DigiDocService API](https://www.sk.ee/en/services/validity-confirmation-services/digidoc-service/). The API is SOAP-based, documentation is available [here](http://www.sk.ee/upload/files/DigiDocService_spec_eng.pdf).

Install
-------

[](#install)

Via Composer

```
$ composer require bigbank/digidoc
```

The library requires PHP `>=5.6`, `curl`, `soap`, `xml`, `mbstring` and `openssl` extensions.

Usage
-----

[](#usage)

```
// Instantiate the main class
$digiDoc = new DigiDoc(DigiDoc::URL_TEST);

// Ask for a service (see: Services)
/** @var AuthenticatorInterface $authenticator */
$authenticator = $digiDoc->getService(AuthenticatorInterface::class);

// Start mobile ID authentication
$userDetails = $authenticator->authenticate('14212128025', '+37200007', 'Testimine', 'My Test App', false);

// Wait for the user to complete the process
$authenticator->waitForAuthentication(function ($authResult) {
 return $authResult === 'USER_AUTHENTICATED' ? 'welcome!' : 'not authenticated';
});
```

More detailed usage examples are provided in the [examples](examples) directory.

To use a HTTP proxy, set `HTTP_PROXY` environment variable.

Services
--------

[](#services)

The library provides access to the following services:

### Authentication With Mobile ID

[](#authentication-with-mobile-id)

Authenticate the user with his mobile ID.

- Interface Name: `AuthenticatorInterface`
- DigiDocService: `7. Queries and Responses for Authentication / 7.1 MobileAuthenticate`

#### Usage

[](#usage-1)

See [examples/mobile/authentication.php](examples/mobile/authentication.php).

### Digital Signature With Mobile ID

[](#digital-signature-with-mobile-id)

Allow users to digitally sign files using mobile ID.

- Interface Name: `FileSignerInterface`
- DigiDocService: `8. Queries and Responses for Digital Signature`

#### Usage

[](#usage-2)

See [examples/mobile/signing.php](examples/mobile/signing.php).

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Known Issues
------------

[](#known-issues)

- Challenge verification is not done for authentication queries (see `Challenge` and `SPChallenge` parameters for `MobileAuthenticate` query). This is planned in future versions.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email :author\_email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Bigbank's developers](https://github.com/orgs/bigbank-as/people)
- [All Contributors](../../contributors)

License
-------

[](#license)

The Apache 2 License. Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~100 days

Total

4

Last Release

3546d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f267873a540e16814c50059c78ea147a168ed0940827d5004ed4146b8f9bca1c?d=identicon)[bigbank](/maintainers/bigbank)

---

Top Contributors

[![karmenk-zz](https://avatars.githubusercontent.com/u/12150757?v=4)](https://github.com/karmenk-zz "karmenk-zz (10 commits)")[![Lauriy](https://avatars.githubusercontent.com/u/592465?v=4)](https://github.com/Lauriy "Lauriy (2 commits)")[![Waldz](https://avatars.githubusercontent.com/u/2713911?v=4)](https://github.com/Waldz "Waldz (2 commits)")[![marguslaak](https://avatars.githubusercontent.com/u/9860121?v=4)](https://github.com/marguslaak "marguslaak (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bigbank-digidoc/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[dflydev/hawk

Hawk

672.0M12](/packages/dflydev-hawk)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)

PHPackages © 2026

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