compwright / oauth2-fieldedge
FieldEdge OAuth 2.0 Client Provider for The PHP League OAuth2-Client
Fund package maintenance!
v3.0.0
2026-08-24 17:34 UTC
Requires
- php: ^8.3 || ^8.4 || ^8.5
- league/oauth2-client: ^2.5
- psr/http-message: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- guzzlehttp/guzzle: ^7.15
- guzzlehttp/psr7: ^2.13
- league/oauth2-client: ^2.5
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^12.5 || ^13.3
This package is auto-updated.
Last update: 2026-08-24 18:18:34 UTC
README
This package provides FieldEdge OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Installation
To install, use composer:
composer require compwright/oauth2-fieldedge league/oauth2-client
Usage
Usage is the same as The League's OAuth client, using \Compwright\OAuth2\FieldEdge\ProviderFactory to create the provider instance.
Example: Client Credentials Flow
$provider = new Compwright\OAuth2\FieldEdge\ProviderFactory()->new( clientId: '{fieldedge-client-id}', clientSecret: '{fieldedge-client-secret}', ); // Get an access token $token = $provider->getAccessToken('client_credentials', ['target_id' => 'my_target_id']); // Use the token to interact with an API on the users behalf echo $token->getToken();
Testing
$ make test
Upgrading
Please see UPGRADING for instructions on upgrading from previous versions (1.x, 2.x).
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.