https://github.com/apacheborys/keycloak-php-client
https://github.com/apacheborys/keycloak-php-client
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/apacheborys/keycloak-php-client
- Owner: apacheborys
- License: mit
- Created: 2026-01-31T17:16:11.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-01-31T22:00:24.000Z (4 months ago)
- Last Synced: 2026-02-01T05:27:13.320Z (4 months ago)
- Language: PHP
- Size: 57.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Keycloak PHP Client
Minimal, framework-agnostic Keycloak client.
## Requirements
- PHP 8.4+
## Installation
```bash
composer require apacheborys/keycloak-php-client
```
## Quick start
```php
use Apacheborys\KeycloakPhpClient\Http\KeycloakHttpClientFactory;
use Apacheborys\KeycloakPhpClient\ValueObject\KeycloakClientConfig;
$config = new KeycloakClientConfig(
baseUrl: 'http://localhost:8080',
clientRealm: 'master',
clientId: 'backend',
clientSecret: 'secret',
);
$factory = new KeycloakHttpClientFactory();
$client = $factory->create(
config: $config,
httpClient: $psr18Client,
requestFactory: $psr17RequestFactory,
streamFactory: $psr17StreamFactory,
);
```
## Tests
```bash
composer test
```
## License
MIT. See `LICENSE`.