@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 10 hours ago
examples Initial auth client package scaffold 10 hours ago
src Initial auth client package scaffold 10 hours ago
tests Initial auth client package scaffold 10 hours ago
.gitignore Initial auth client package scaffold 10 hours ago
EXTRACTION.md Initial auth client package scaffold 10 hours ago
README.md Initial auth client package scaffold 10 hours ago
composer.json Initial auth client package scaffold 10 hours ago
phpunit.xml.dist Initial auth client package scaffold 10 hours ago
README.md

gnexus/auth-client

Private framework-agnostic PHP client library for integrating services with gnexus-auth.

Status

Early scaffold with working core pieces.

Current scaffold includes:

  • package metadata;
  • PSR-oriented dependency boundaries;
  • high-level GAuthClient;
  • configuration object;
  • DTO set;
  • storage and service contracts;
  • exception family;
  • PKCE and authorization URL helpers.
  • HTTP token endpoint client;
  • HTTP userinfo client;
  • webhook HMAC verifier;
  • webhook JSON parser;
  • package-level unit tests;
  • plain PHP integration example.

This package is intended to be extracted into a separate private repository.

Current Path

Temporary local development path:

packages/auth-client

Usage Shape

The package is designed around one high-level client:

GNexus\GAuth\Client\GAuthClient

It expects:

  • GAuthConfig
  • token endpoint implementation
  • runtime user provider
  • webhook verifier
  • webhook parser
  • state store
  • PKCE store

Example

A plain PHP integration example is included at:

examples/plain-php

It shows:

  • redirect to gnexus-auth
  • callback exchange
  • userinfo fetch
  • webhook verification and parsing
  • session-backed example stores

A Composer consumer example is included at:

examples/consumer-template

It shows:

  • private vcs repository wiring
  • package requirement
  • one practical set of PSR implementations for HTTP and message factories

Extraction

This package is meant to be moved into a dedicated private repository.

See:

  • examples/plain-php/README.md
  • EXTRACTION.md