Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

DeviantArt Provider for OAuth 2.0 Client

Build Status Latest Stable Version

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

Installation

$ composer require seinopsys/oauth2-deviantart

Usage

You can get your OAuth client credentials here.

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

$accessToken = $provider->getAccessToken('authorization_code', [
	'code' => $_GET['code'],
	'scope' => ['user','browse'] // optional, defaults to ['user']
]);
$actualToken = $accessToken->getToken();
$refreshToken = $accessToken->getRefresh();

// Once it expires

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

About

DeviantArt Provider for OAuth 2.0 Client

Topics

Resources

License

Packages

No packages published

Languages