PHPackages                             putheakhem/laravel-camdigi-key - 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. putheakhem/laravel-camdigi-key

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

putheakhem/laravel-camdigi-key
==============================

A Laravel wrapper for the CamDigiKey Node.js client library

v1.0.1(3mo ago)0442MITPHPPHP ^8.2

Since Apr 4Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/putheakhem/laravel-camdigi-key)[ Packagist](https://packagist.org/packages/putheakhem/laravel-camdigi-key)[ RSS](/packages/putheakhem-laravel-camdigi-key/feed)WikiDiscussions master Synced 1mo ago

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

[![Latest Stable Version](https://camo.githubusercontent.com/8083b3aa27a0d4180416c53289e6b148ab075ac137e46c5261acd018565884f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7075746865616b68656d2f6c61726176656c2d63616d646967692d6b65792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/putheakhem/laravel-camdigi-key)[![Total Downloads](https://camo.githubusercontent.com/012f43686f062983adb649bde8b73b76a1f9cf305ef0c000acb455d15a672903/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7075746865616b68656d2f6c61726176656c2d63616d646967692d6b65792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/putheakhem/laravel-camdigi-key)

Laravel CamDigiKey Package
==========================

[](#laravel-camdigikey-package)

> ⚠️ **DISCLAIMER**: This is an **unofficial community package** and is **not affiliated with, endorsed by, or supported by the official CamDigiKey Platform** or the Cambodian government. This package is maintained independently. For official support, please contact the official CamDigiKey Platform directly. A Laravel wrapper for the [CamDigiKey Node.js Client](https://github.com/Techo-Startup-Center/camdigikey-client-library-node).

This package integrates Cambodia’s national digital identity authentication (CamDigiKey) system with your Laravel application via Node.js.

---

🇰🇭 Stand with Cambodia • កម្ពុជា
--------------------------------

[](#-stand-with-cambodia--កម្ពុជា)

### 🕊️ Cambodia Needs Peace 🕊️

[](#️-cambodia-needs-peace-️)

With heavy hearts, we stand with our brave soldiers defending Cambodia’s land and dignity.
We seek no conflict—only peace, justice, and respect for our sovereignty.

**🙏 កម្ពុជាត្រូវការសន្តិភាព • Together to protect Cambodia’s sovereignty.**

---

📦 Installation
--------------

[](#-installation)

You can install the package via [Packagist](https://packagist.org/packages/putheakhem/laravel-camdigi-key):

```
composer require putheakhem/laravel-camdigi-key
```

---

⚙️ Setup
--------

[](#️-setup)

After installation:

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

This will publish the `config/camdigikey.php` file.

Run `php artisan camdigikey:setup`. The package also automatically clones the Node.js SDK into:

```
vendor/putheakhem/laravel-camdigi-key/node-lib/

```

---

🌐 .env Configuration
--------------------

[](#-env-configuration)

Set your CamDigiKey credentials in `.env`:

```
CAMDIGIKEY_CLIENT_ID=your_client_id
CAMDIGIKEY_HMAC_KEY=your_hmac_key
CAMDIGIKEY_AES_SECRET_KEY=your_aes_secret
CAMDIGIKEY_AES_IV_PARAMS=your_iv
CAMDIGIKEY_CLIENT_DOMAIN=https://your-app.test
CAMDIGIKEY_SERVER_BASED_URL=https://camdigikey.serveo.net
CAMDIGIKEY_CLIENT_KEYSTORE_FILE=storage/app/camdigi-key/client_keystore.p12
CAMDIGIKEY_CLIENT_KEYSTORE_FILE_PASSWORD=your_password
CAMDIGIKEY_CLIENT_TRUST_STORE_FILE=storage/app/camdigi-key/trust_keystore.p12
CAMDIGIKEY_CLIENT_TRUST_STORE_FILE_PASSWORD=your_password
CAMDIGIKEY_REDIRECT_URI=https://your-app.test/callback
```

> ✅ Store `.p12` files securely in `storage/app/camdigi-key/`

---

🧪 Usage
-------

[](#-usage)

Example route to get a login token:

```
Route::get('/camdigikey/login-token', function () {
    return CamDigiKey::getLoginToken();
});
```

Or in a controller:

```
$token = CamDigiKey::getLoginToken();
$access = CamDigiKey::getUserAccessToken($authToken);
```

All supported methods:

- `getLoginToken()`
- `getUserAccessToken($authToken)`
- `refreshUserAccessToken($accessToken)`
- `logoutAccessToken($accessToken)`
- `validateJwt($accessToken)`
- `lookupUserProfile($accessToken, $personalCode)`
- `verifyAccountToken($accountToken)`
- `getOrganizationAccessToken()`
- `getUserFace($accessToken)`

---

🧹 Artisan Setup Command (Optional)
----------------------------------

[](#-artisan-setup-command-optional)

Automatically run during install:

```
php artisan camdigikey:setup
```

This clones the CamDigiKey Node.js SDK into the expected path.

---

🔐 Security
----------

[](#-security)

- Never expose `.p12` files in public directories
- `.gitignore` all private keystores
- If you discover any security issues, please email puthea.khem at gmail.com instead of using the issue tracker.

---

Support Me
----------

[](#support-me)

If you find this package useful, consider supporting my work:

- [Buy me a coffee](https://www.buymeacoffee.com/iamputhea)

📄 License
---------

[](#-license)

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

---

Built with ❤️ by [Puthea khem](mailto:puthea.khem@gmail.com)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance79

Regular maintenance activity

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

3

Last Release

111d ago

Major Versions

v0.0.1 → v1.0.02025-05-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/764935335a012f6477a36e9bf81144d2c887becfbd0dea300426a27f7677ab93?d=identicon)[putheakhem](/maintainers/putheakhem)

---

Top Contributors

[![putheakhem](https://avatars.githubusercontent.com/u/8064772?v=4)](https://github.com/putheakhem "putheakhem (6 commits)")

---

Tags

laravelAuthenticationnodecamdigikeydigital identity

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/putheakhem-laravel-camdigi-key/health.svg)

```
[![Health](https://phpackages.com/badges/putheakhem-laravel-camdigi-key/health.svg)](https://phpackages.com/packages/putheakhem-laravel-camdigi-key)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

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