PHPackages                             andydixon/blackwall-auth-sdk - 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. andydixon/blackwall-auth-sdk

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

andydixon/blackwall-auth-sdk
============================

PHP SDK for integrating with BlackWall OAuth 2.1 and OpenID Connect

1.1.3(2mo ago)010GPL-3.0-or-laterPHPPHP &gt;=8.1

Since Feb 23Pushed 2mo agoCompare

[ Source](https://github.com/andydixon/blackwall-auth-sdk)[ Packagist](https://packagist.org/packages/andydixon/blackwall-auth-sdk)[ RSS](/packages/andydixon-blackwall-auth-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (8)Used By (0)

BlackWall Auth SDK (PHP)
========================

[](#blackwall-auth-sdk-php)

A distributable PHP SDK for integrating applications with BlackWall OAuth 2.1 and OpenID Connect.

This package provides:

- OAuth authorisation URL generation with PKCE (`S256`)
- Code-for-token exchange
- Refresh token exchange
- UserInfo retrieval
- UserInfo normalisation (`email`, `privilege_level`, `role`)
- Unified callback handling helper (`handleCallback`)
- First-class OIDC nonce generation, session persistence, and validation helpers
- Session helpers for `state`, `code_verifier`, and `nonce`
- Typed API (`AuthClient`, `TokenSet`) and specific exception classes

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

[](#requirements)

- PHP 8.1+
- cURL extension (`ext-curl`)

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

[](#installation)

### 1. Install as a Composer package

[](#1-install-as-a-composer-package)

If this repository is published and tagged:

```
composer require andydixon/blackwall-auth-sdk
```

### 2. Install from local path (during development)

[](#2-install-from-local-path-during-development)

In the consuming application's `composer.json`:

```
{
  "repositories": [
    {
      "type": "path",
      "url": "../test.dixon.cx"
    }
  ],
  "require": {
    "andydixon/blackwall-auth-sdk": "*"
  }
}
```

Then run:

```
composer update andydixon/blackwall-auth-sdk
```

Quick start
-----------

[](#quick-start)

```
