Initial Commit

This commit is contained in:
Andy Dixon
2026-02-10 09:17:22 +00:00
commit 57637840a5
23 changed files with 2837 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# Migration Guide
## Moving from `BlackWallSDK\BlackWallAuth` to `BlackWall\Auth\AuthClient`
### Before
```php
$auth = new BlackWallSDK\BlackWallAuth($config);
$authData = $auth->getAuthorizationUrl();
$tokens = $auth->exchangeCodeForTokens($code);
$user = $auth->getUserInfo($tokens['access_token']);
```
### After
```php
use BlackWall\Auth\AuthClient;
use BlackWall\Auth\Config;
$client = new AuthClient(Config::fromArray($config));
$authData = $client->buildAuthorisationUrl();
$tokens = $client->exchangeCodeForTokens($code);
$user = $client->getUserInfo($tokens->accessToken);
```
## Key differences
- Method spelling uses British English in the new API: `buildAuthorisationUrl()`.
- Token responses are strongly typed via `TokenSet`.
- Errors are represented by specific exception classes.
- HTTP transport is swappable via `HttpClientInterface`.
## Compatibility status
`BlackWallSDK\BlackWallAuth` remains available and delegates to the new client. Existing applications can upgrade gradually.