PHPackages                             dencel/laravel-eparaksts - 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. dencel/laravel-eparaksts

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

dencel/laravel-eparaksts
========================

Use Latvian eParaksts in your Laravel app.

0.4.4(3w ago)034MITPHPPHP ^8.4CI passing

Since Feb 10Pushed 3w agoCompare

[ Source](https://github.com/denissceluiko/laravel-eparaksts)[ Packagist](https://packagist.org/packages/dencel/laravel-eparaksts)[ Docs](https://github.com/denissceluiko/laravel-eparaksts)[ RSS](/packages/dencel-laravel-eparaksts/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (24)Versions (20)Used By (0)

laravel-eparaksts
=================

[](#laravel-eparaksts)

Laravel package for integrating the Latvian **eParaksts** e-signature and identity platform into your Laravel 12/13 application.

Wraps [dencel/eparaksts](https://github.com/denissceluiko/eparaksts) and provides:

- Fluent document-signing service with per-request session state
- OAuth identification and authentication flow
- Lifecycle callback hooks
- Blade logo components

Requirements
------------

[](#requirements)

- PHP ≥ 8.4
- Laravel 12 or 13
- eParaksts API credentials ([test environment](https://www.eparaksts.lv/en/for_developers/Application_test_environment))

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

[](#installation)

```
composer require dencel/laravel-eparaksts
php artisan eparaksts:install
php artisan migrate
```

Add to `.env`:

```
EPARAKSTS_USERNAME=your-client-id
EPARAKSTS_PASSWORD=your-client-secret
EPARAKSTS_HOST=https://eidas-demo.eparaksts.lv
SIGNAPI_HOST=https://signapi-prep.eparaksts.lv
EPARAKSTS_REDIRECT=/eparaksts/callback

```

`EPARAKSTS_REDIRECT` must exactly match the callback URI registered for your client in the eParaksts developer portal. The default `/eparaksts/callback` is pre-registered for the test and/or production environment.

For production:

```
EPARAKSTS_HOST=https://eidas.eparaksts.lv
SIGNAPI_HOST=https://signapi.eparaksts.lv

```

Quick start
-----------

[](#quick-start)

### Document signing

[](#document-signing)

```
use Dencel\LaravelEparaksts\Facades\Eparaksts;

// In your controller — upload file(s) and redirect the user into the signing flow.
return Eparaksts::upload('/path/to/document.pdf')
    ->redirectAfter(route('documents.show', $doc))
    ->sign();
```

After signing completes the user is redirected back to your `redirectAfter` URL. Download the signed document:

```
$path = Eparaksts::session($sessionId)
    ->download(storage_path('signed/'));
```

Or save to a named disk:

```
$path = Eparaksts::session($sessionId)
    ->disk('s3')
    ->download('signed/', name: 'contract-signed.pdf');
```

### Identity verification / login

[](#identity-verification--login)

Point a login button to:

```

    Log in with eParaksts Mobile

```

Available `flow` values: `mobile`, `eid`, `sc`, `cross`.

On success the user is matched against the `authentication_match` fields in `config/eparaksts.php` and logged in via `Auth::login()`. Flash variable `ep_error` is set to `user_not_found` if no match.

Set `registration_enabled => true` in config to auto-create users on first login.

### Logout

[](#logout)

```
Log out
```

This redirects through eParaksts logout, then flushes the local session.

Lifecycle callbacks
-------------------

[](#lifecycle-callbacks)

Hook into any point of the signing flow:

```
use Dencel\LaravelEparaksts\Callbacks\Callback;

class AuditSigningComplete extends Callback
{
    public function handle(): void
    {
        AuditLog::create([
            'session' => $this->eparaksts->getSession(),
            'user_id' => auth()->id(),
        ]);
    }
}
```

Register on the service:

```
Eparaksts::upload($path)
    ->afterSigningFinalized(AuditSigningComplete::class)
    ->redirectAfter(route('done'))
    ->sign();
```

Available hooks: `before/afterSignFlowSessionEstablished`, `before/afterIdentificationObtained`, `before/afterSigningIdentityObtained`, `afterDigestCalculated`, `beforeSignatureAuthorizationRedirect`, `before/afterSigningDigest`, `afterSigningFinalized`, `beforeFinalRedirect`, `onIdentificationReceived`, `onError`.

Container format
----------------

[](#container-format)

By default documents are wrapped in an `.edoc` container. Override:

```
Eparaksts::upload($path)->edoc()->sign();    // .edoc (default)
Eparaksts::upload($path)->asice()->sign();   // .asice
Eparaksts::upload($path)->pdf()->sign();     // PAdES (single PDF only)
```

Advanced signing
----------------

[](#advanced-signing)

### eZīmogs+ / qualified eSeal

[](#ezīmogs--qualified-eseal)

For server-side signing with a qualified certificate (`CERT_QSEAL`):

```
Eparaksts::upload($path)->qseal()->sign();
```

### Archive timestamp (LTV)

[](#archive-timestamp-ltv)

Add a long-term validation (LTV) archive timestamp after signing:

```
Eparaksts::upload($path)->withArchive()->sign();
```

Timestamp failure is non-fatal — signing completes, the error is logged internally.

### Batch signing

[](#batch-signing)

Sign documents from multiple sessions in a single OAuth authorization. Each session must already have files uploaded.

```
// Upload to separate sessions first.
$sessionA = Eparaksts::upload($pathA)->getSession();
$sessionB = Eparaksts::upload($pathB)->getSession();

// Redirect the user into the signing flow for both sessions at once.
return Eparaksts::session($sessionA)
    ->batch([$sessionB])
    ->redirectAfter(route('documents.index'))
    ->sign();
```

After signing, download each session's file independently:

```
Eparaksts::session($sessionA)->download(storage_path('signed/'));
Eparaksts::session($sessionB)->download(storage_path('signed/'));
```

### File validation

[](#file-validation)

Validate a signed file's signatures after `finalizeSigning()` completes, while still attached to the session:

```
$validation = Eparaksts::session($sessionId)->getFileValidation();
// or for a specific file:
$validation = Eparaksts::session($sessionId)->getFileValidation($fileId);
```

Returns the raw validation response from the SignAPI, or `null` if the session or file ID is missing. The shape and interpretation of the result is application-specific — there is no automatic pass/fail handling.

### Age-gated identification

[](#age-gated-identification)

Require users to confirm they meet a minimum age during the identification flow:

```

    Log in (18+ only)

```

Supported values: `14`, `16`, `18`, `21`. Omitting `age` performs standard identification with no age assertion.

Blade components
----------------

[](#blade-components)

```
                        {{-- eParaksts logo --}}
          {{-- eParaksts Mobile logo --}}
```

Available logo types: `eparaksts`, `mobile`, `mobile-full`, `mobile-small`, `eid`, `eid-scan`, `eid-scan-small`, `karte`, `ezimogs`, `api`.

Configuration
-------------

[](#configuration)

Publish the config:

```
php artisan vendor:publish --tag=eparaksts-config
```

See `config/eparaksts.php` for all options with inline documentation.

Development
-----------

[](#development)

```
composer test      # run PHPUnit tests
composer lint      # check code style (dry-run)
composer fix       # apply code style fixes
composer analyse   # run PHPStan
composer rector    # check for deprecations (dry-run)
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance94

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Recently: every ~0 days

Total

19

Last Release

27d ago

PHP version history (2 changes)v0.1PHP ^8.2

0.4.0PHP ^8.4

### Community

Maintainers

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

---

Top Contributors

[![denissceluiko](https://avatars.githubusercontent.com/u/12938632?v=4)](https://github.com/denissceluiko "denissceluiko (20 commits)")

---

Tags

laravelsignatureAuthenticationeidaseparakstsSignAPI

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dencel-laravel-eparaksts/health.svg)

```
[![Health](https://phpackages.com/badges/dencel-laravel-eparaksts/health.svg)](https://phpackages.com/packages/dencel-laravel-eparaksts)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725172.4k14](/packages/tallstackui-tallstackui)

PHPackages © 2026

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