Skip to content

This package provides Freelancer OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

License

Notifications You must be signed in to change notification settings

bordieris/oauth2-freelancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Freelancer Provider for OAuth 2.0 Client

Freelancer OAuth 2.0 support for the PHP League’s OAuth 2.0 Client.

Installation

$ composer require bordieris/oauth2-freelancer

Usage

You can get your OAuth client credentials here.

$provider = new Bordieris\OAuth2\Client\Provider\FreelancerProvider([
	'clientId' => 'client_id',
	'clientSecret' => 'client_secret',
	'redirectUri' => 'http://example.com/auth',
]);

$accessToken = $provider->getAccessToken('authorization_code', [
	'code' => $_GET['code'],
	'scope' => ['basic', 'fln:project_create', 'fln:project_manage'] // optional, defaults to ['basic']
]);
$actualToken = $accessToken->getToken();
$refreshToken = $accessToken->getRefresh();

// Once it expires

$newAccessToken = $provider->getAccessToken('refresh_token', [
	'refresh_token' => $refreshToken
]);

About

This package provides Freelancer OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages