Search by

wingletplatform / identity-client

winglet

PHP client for the supported Winglet Identity session and registration operations.

Package info

github.com/WingletPlatform/php-identity-client-dist

pkg:composer/wingletplatform/identity-client

Statistics

Installs: 3

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-12-04 07:59 UTC

This package is auto-updated.

Last update: 2026-12-04 08:12:12 UTC


README

This client provides PHP 8.4+ (64-bit) callers with Identity session, registration, and target-bound service-authentication operations. Its Composer name is wingletplatform/identity-client; it requires wingletplatform/client:^0.1. Both are planned MIT packages with Eventteri Oy copyright, and this distribution includes the license in LICENSE.

Installation

Neither package is published or has an assigned release version. After both approved releases are available from Packagist, install the Identity client with:

composer require wingletplatform/identity-client:^0.1

Composer will resolve the shared client dependency. This command is conditional on publication and is not currently usable from a public registry. The candidate does not claim compatibility with the historical winglet/authclient or winglet/client packages.

Use

Build an Identity ServiceClient for your endpoint and pass explicit codec limits. The client does not choose production limits for your service:

use Winglet\Client\Core\JsonCodec\CodecLimits;
use Winglet\Client\Core\Http\ServiceClient;
use Winglet\Identity\Client\IdentityClient;

// $identityService is a configured ServiceClient for the Identity endpoint.
$identity = new IdentityClient(
    $identityService,
    new CodecLimits(8192, 16, 128, 64, 4096, 32),
);
$session = $identity->createAnonymousSession();

The public operations are anonymous-session creation, login, renewal, revocation, identity registration, and authenticateServiceForTarget(). Each mutation makes at most one HTTP attempt. The service-authentication operation sends the technical credential in the existing POST /api/v1/service-authentication request body and returns an access token, expiry, and audience. The client does not retry that credential-bearing request, decode the JWT, or log credentials and tokens. It does not change issuer audience policy; the deployed Identity service remains authoritative for issuance.

The shared typed JSON codec requires caller-selected limits, preserves signed Int64 values on 64-bit PHP, and rejects duplicate object keys. Its separate wingletplatform/client archive retains the third-party codec license notice. Renewal returns a rotated renewal token where Identity supplies one. The base HTTP client's bounded HttpException::responseBody() is server response data and should not be logged indiscriminately.

Mock transport tests cover client request and response behavior; they do not prove live service authorization, deployment exposure, or credential custody. The source-owned Composer scripts and test configuration are for this repository's development workflow. The distribution exporter removes scripts, autoload-dev, and require-dev only from the exported Composer manifest, and records the source and output hashes in the candidate manifest. The source composer.json remains unchanged.

The Identity adapter is project-owned code; it is not reconstructed legacy winglet/authclient source. The separate SDK-5X.2d audience-policy proposal is deferred and is not a prerequisite for this adapter.