PHPackages                             lenius/laravel-altid - 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. lenius/laravel-altid

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

lenius/laravel-altid
====================

AltID age verification (OID4VP/mdoc) integration for Laravel

00PHPCI passing

Pushed todayCompare

[ Source](https://github.com/Lenius-Technologies/laravel-altid)[ Packagist](https://packagist.org/packages/lenius/laravel-altid)[ RSS](/packages/lenius-laravel-altid/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersionsUsed By (0)

Laravel AltID
=============

[](#laravel-altid)

[![Latest Version on Packagist](https://camo.githubusercontent.com/89736ec4080481938a65b2ace1226f1b643ddc9b0058c8c720dabc3db7e5b82f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c656e6975732f6c61726176656c2d616c7469642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lenius/laravel-altid)[![GitHub Tests Action Status](https://github.com/lenius/laravel-altid/actions/workflows/run-tests.yml/badge.svg)](https://github.com/lenius/laravel-altid/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://github.com/lenius/laravel-altid/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/lenius/laravel-altid/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![codecov](https://camo.githubusercontent.com/95806f0bca91b7a36e1184cf0243c8f44a8df083c18b86fab151fe26606fc216/68747470733a2f2f636f6465636f762e696f2f67682f6c656e6975732f6c61726176656c2d616c7469642f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/lenius/laravel-altid)[![Total Downloads](https://camo.githubusercontent.com/24b23b7e2a31a88f70142e953dbdd7c9e6148092b6e8fd18c5af214c6c827d6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c656e6975732f6c61726176656c2d616c7469642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lenius/laravel-altid)

A Laravel package for integrating with [AltID](https://www.digitaliser.dk/altid) — Danmarks officielle app til digitalt ID og aldersverifikation.

AltID is a digital identity wallet built on the [eIDAS2](https://digst.dk/it-loesninger/altid/) regulation, enabling citizens to securely share verified credentials. This package implements the OID4VP (OpenID for Verifiable Presentations) flow with mdoc/ISO 18013-5 credentials to receive age verification responses from the AltID app.

> **Note:** This package currently only supports **age verification**. Support for full digital ID (identification) is planned for a future release.

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

[](#requirements)

- PHP 8.4+
- Laravel 11, 12 or 13
- A cache driver (Redis recommended for production)

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

[](#installation)

```
composer require lenius/laravel-altid
```

Publish the config file:

```
php artisan vendor:publish --tag="laravel-altid-config"
```

Optionally publish views and assets:

```
php artisan vendor:publish --tag="laravel-altid-views"
php artisan vendor:publish --tag="laravel-altid-assets"
```

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

[](#configuration)

Key environment variables:

```
# The age claim to verify (default: age_over_18)
ALTID_AGE_CLAIM=age_over_18

# Transaction TTL in minutes (default: 15)
ALTID_TRANSACTION_TTL_MINUTES=15

# AltID deep-link scheme (default: av://)
ALTID_SCHEME=av://

# mdoc doctype
ALTID_DOCTYPE=eu.europa.ec.av.1
ALTID_NAMESPACE=eu.europa.ec.av.1

# Trust anchor certificate fingerprint(s), comma-separated
ALTID_TRUST_ANCHOR_FINGERPRINTS=1dc89e870cddac990f5585a0265568522531af678592cc73effd9f8706f55995

# Set true only during development to skip cryptographic verification
ALTID_ACCEPT_UNVERIFIED_RESPONSES=false

# Require device binding in the mdoc proof
ALTID_REQUIRE_DEVICE_BINDING=false

# Disable built-in web demo/info routes (/altid, /alderstjek)
ALTID_REGISTER_WEB_ROUTES=true
```

Supported age claims:

ClaimDescription`age_over_13`13+`age_over_15`15+`age_over_16`16+`age_over_18`18+ (default)`age_over_21`21+`age_over_23`23+`age_over_25`25+`age_over_27`27+`age_over_67`67+Routes
------

[](#routes)

The package registers the following routes automatically:

### API routes (`/api`)

[](#api-routes-api)

MethodURIDescription`POST``/api/altid/age/start`Start an age verification transaction`POST``/api/altid/age/direct-post/{transactionId}`OID4VP callback from the AltID app`GET``/api/altid/age/{transactionId}/status`Poll transaction status### Web routes

[](#web-routes)

URIDescription`/altid`Info page`/alderstjek`Demo pageUsage
-----

[](#usage)

### Start an age verification

[](#start-an-age-verification)

```
use Lenius\LaravelAltid\AltIdAgeVerificationService;

$service = app(AltIdAgeVerificationService::class);

// Start with default claim (age_over_18)
$transaction = $service->start();

// Or specify a claim
$transaction = $service->start('age_over_21');
```

The returned array contains:

```
[
    'transaction_id'        => 'abc123',
    'authorization_url'     => 'av://?response_type=vp_token&...',  // deep-link for AltID app
    'test_app_url'          => 'https://app.test.tegnebog.dk/...',  // for testing
    'status_url'            => 'https://yourapp.com/api/altid/age/abc123/status',
    // ...
]
```

Present the `authorization_url` as a QR code or deep-link button so the user can open it in the AltID app.

### Poll for result

[](#poll-for-result)

```
$transaction = $service->find($transactionId);

// $transaction['status']   => 'pending' | 'approved' | 'failed'
// $transaction['verified'] => true | false
```

Testing
-------

[](#testing)

Request test access by emailing  with subject line `Testadgang til AltID`.

The test tool is available at [test-tool.test.tegnebog.dk](https://test-tool.test.tegnebog.dk/).

Set `ALTID_ACCEPT_UNVERIFIED_RESPONSES=true` in your `.env` during development to bypass cryptographic verification.

```
composer test
```

AltID Resources
---------------

[](#altid-resources)

ResourceURLOfficial AltID page[digitaliser.dk/altid](https://www.digitaliser.dk/altid)Digitaliseringsstyrelsen[digst.dk/it-loesninger/altid](https://digst.dk/it-loesninger/altid/)Technical integration guide (PDF)[Integrating with AltID v1.0.1](https://www.digitaliser.dk/Media/639160005653021879/Integrating%20with%20AltID%20version%201.0.1.pdf)Recipient design scheme (Figma)[figma.com/design/O99M3b5pEf0mTn1xRY9pGo](https://www.figma.com/design/O99M3b5pEf0mTn1xRY9pGo/AltID-modtager---Design-Scheme)Recipient registry[modtager.tegnebog.dk](https://modtager.tegnebog.dk/)Source code (GitLab)[git.govcloud.dk/digitaliseringsstyrelsen-public/altid-source-code](https://git.govcloud.dk/digitaliseringsstyrelsen-public/altid-source-code/altid-kildekode)Technical supportChangelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Carsten Jonstrup](https://github.com/Lenius-Technologies)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

20

↑

LowBetter than 13% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity8

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8539c9af6113bdef769983294e463381bace6566ecc7c8daaa7dcfe1516c19de?d=identicon)[lenius](/maintainers/lenius)

---

Top Contributors

[![cjonstrup](https://avatars.githubusercontent.com/u/576584?v=4)](https://github.com/cjonstrup "cjonstrup (18 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/lenius-laravel-altid/health.svg)

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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