compwright/oauth2-fieldedge

FieldEdge OAuth 2.0 Client Provider for The PHP League OAuth2-Client

Maintainers

Package info

github.com/compwright/oauth2-fieldedge

pkg:composer/compwright/oauth2-fieldedge

Transparency log

Fund package maintenance!

compwright

Statistics

Installs: 9 139

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.0 2026-07-24 20:28 UTC

This package is auto-updated.

Last update: 2026-07-24 20:30:07 UTC


README

Latest Version Total Downloads

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();

Example: Client Credentials Flow (Legacy Partner API)

$provider = new Compwright\OAuth2\FieldEdge\ProviderFactory()->newLegacy(
    clientId: '{fieldedge-client-id}',
    apiKey: '{fieldedge-api-key}',
);

// Get an access token
$token = $provider->getAccessToken('client_credentials');

// Use the token to interact with an API on the users behalf
echo $token->getToken();

Testing

$ make test

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.