PHPackages                             lan-software/lancore-client - 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. [API Development](/categories/api)
4. /
5. lan-software/lancore-client

ActiveLibrary[API Development](/categories/api)

lan-software/lancore-client
===========================

Canonical LanCore Integration API client for Lan\* satellite applications

v0.2.0(3w ago)0298[1 PRs](https://github.com/lan-software/lancore-client/pulls)MITPHPPHP ^8.3CI passing

Since Apr 9Pushed yesterdayCompare

[ Source](https://github.com/lan-software/lancore-client)[ Packagist](https://packagist.org/packages/lan-software/lancore-client)[ RSS](/packages/lan-software-lancore-client/feed)WikiDiscussions main Synced 1w ago

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

lancore-client
==============

[](#lancore-client)

The shared Composer package that every Lan\* satellite application uses to talk to LanCore — HTTP transport, SSO authorization-code flow, webhook signature verification, and (opt-in) JWKS-backed ticket-validation.

Environment contract
--------------------

[](#environment-contract)

Every satellite reads the same set of environment variables (defaults in `config/lancore.php`):

VariablePurpose`LANCORE_ENABLED`Master kill-switch (`true` / `false`)`LANCORE_BASE_URL`Browser-facing LanCore URL (SSO redirects)`LANCORE_INTERNAL_URL`Server-to-server URL; falls back to `LANCORE_BASE_URL``LANCORE_TOKEN`Bearer token minted by LanCore`LANCORE_APP_SLUG`Satellite identity (e.g. `lanbrackets`)`LANCORE_CALLBACK_URL`OAuth callback URL registered on LanCore`LANCORE_WEBHOOK_SECRET`HMAC-SHA256 key for incoming-webhook verification`LANCORE_ENTRANCE_ENABLED`LanEntrance-only opt-in for the JWKS sub-client`LANCORE_SIGNING_KEYS_ENDPOINT`JWKS endpoint URL`LANCORE_SIGNING_KEYS_CACHE_TTL`JWKS cache TTL in secondsThese env vars are stable across provisioning paths — the package itself does not care how they were populated.

Declarative provisioning via LanCore config
-------------------------------------------

[](#declarative-provisioning-via-lancore-config)

When LanCore is deployed with the [`lan-software` Helm umbrella chart](https://github.com/lan-software/LanChart), every satellite's `LANCORE_TOKEN` and `LANCORE_WEBHOOK_SECRET` are provisioned automatically from a **shared seed Secret** the umbrella emits (`-integrations-seed`). The umbrella chart:

1. Auto-generates a per-slug token + webhook secrets (via Helm `lookup`, stable across upgrades), OR honours operator overrides in `global.integrations..{token,announcementWebhookSecret,rolesWebhookSecret}`.
2. Mounts the full seed Secret into LanCore so `config/integrations.php`can read each slug's `_LANCORE_TOKEN` env var via `env()`.
3. Mounts each satellite's slice of the same Secret — LanCore's `_LANCORE_TOKEN` becomes the satellite's `LANCORE_TOKEN`, and `_ROLES_WEBHOOK_SECRET` becomes its `LANCORE_WEBHOOK_SECRET`.
4. Runs `php artisan integrations:sync` as a pre-install/pre-upgrade Helm hook Job against LanCore, which reconciles `config/integrations.php`into the database — creating or updating each `IntegrationApp` row, seeding the config-seeded token (SHA-256-hashed), and refreshing the subscribed `Webhook` rows.

**Operator effect:** `helm install lan-software` produces a working fleet with no admin-UI clickthrough, no `kubectl exec`, no per-satellite token paste. Hostnames derive from `global.domain` + `global.satelliteHostStyle`(flat / prefixed / custom) so the whole fleet is hostname-agile.

See:

- [LanChart `docs/adr/0008-declarative-integration-config.md`](https://github.com/lan-software/LanChart/blob/main/docs/adr/0008-declarative-integration-config.md)
- [LanCore MIL-STD-498 SSDD §5.4.5](https://github.com/lan-software/LanCore/blob/main/docs/mil-std-498/SSDD.md#545-integration-declarative-config-reconciler)
- [LanCore MIL-STD-498 IRS §3.5a IF-INTCFG](https://github.com/lan-software/LanCore/blob/main/docs/mil-std-498/IRS.md#35a-integration-declarative-configuration-if-intcfg)

Local development (Docker Compose / Sail)
-----------------------------------------

[](#local-development-docker-compose--sail)

For local dev without the Helm chart, set the env vars directly in the satellite's `.env` file. LanCore ships an `integration:setup-dev `Artisan command that mints a dev token and prints the `.env` snippet to copy. Alternatively, run `php artisan integrations:sync` against LanCore with `LANCORE_INTEGRATIONS_RECONCILE_ON_BOOT=true` to pick up `config/integrations.php` at LanCore boot.

Using the client from a satellite
---------------------------------

[](#using-the-client-from-a-satellite)

```
use LanSoftware\LanCoreClient\LanCoreClient;

$client = app(LanCoreClient::class);

// Resolve a user by LanCore id:
$user = $client->user($lancoreUserId);

// Exchange an SSO code:
$user = $client->exchangeCode($authorizationCode);

// (LanEntrance only) Validate a signed ticket token:
$result = $client->entrance()->validate($plainToken);
```

See the package source under `src/` + tests under `tests/` for the full API surface.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance98

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Total

6

Last Release

21d ago

### Community

Maintainers

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

---

Top Contributors

[![Mawiguk0](https://avatars.githubusercontent.com/u/17619897?v=4)](https://github.com/Mawiguk0 "Mawiguk0 (15 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/lan-software-lancore-client/health.svg)

```
[![Health](https://phpackages.com/badges/lan-software-lancore-client/health.svg)](https://phpackages.com/packages/lan-software-lancore-client)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76318.2M110](/packages/laravel-mcp)[illuminate/auth

The Illuminate Auth package.

9327.9M1.2k](/packages/illuminate-auth)[illuminate/routing

The Illuminate Routing package.

1239.0M2.8k](/packages/illuminate-routing)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)

PHPackages © 2026

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