Skip to content

Commit

Permalink
Merge pull request #90 from tristanbes/feature/discord
Browse files Browse the repository at this point in the history
Change underlying library for discord because it's not compliant with oauth2-client v2.x
  • Loading branch information
weaverryan authored Feb 26, 2018
2 parents 6ccf58e + 349dc78 commit ee11f72
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ via Composer:
| [Clever](https://github.com/schoolrunner/oauth2-clever) | composer require schoolrunner/oauth2-clever |
| [DevianArt](https://github.com/SeinopSys/oauth2-deviantart) | composer require seinopsys/oauth2-deviantart |
| [DigitalOcean](https://github.com/chrishemmings/oauth2-digitalocean) | composer require chrishemmings/oauth2-digitalocean |
| [Discord](https://github.com/teamreflex/oauth2-discord) | composer require team-reflex/oauth2-discord |
| [Discord](https://github.com/wohali/oauth2-discord-new) | composer require wohali/oauth2-discord-new |
| [Dribbble](https://github.com/crewlabs/oauth2-dribbble) | composer require crewlabs/oauth2-dribbble |
| [Dropbox](https://github.com/stevenmaguire/oauth2-dropbox) | composer require stevenmaguire/oauth2-dropbox |
| [Drupal](https://github.com/chrishemmings/oauth2-drupal) | composer require chrishemmings/oauth2-drupal |
Expand Down
6 changes: 3 additions & 3 deletions src/Client/Provider/DiscordClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@

use KnpU\OAuth2ClientBundle\Client\OAuth2Client;
use League\OAuth2\Client\Token\AccessToken;
use Discord\OAuth\Parts\User;
use Wohali\OAuth2\Client\Provider\DiscordResourceOwner;

class DiscordClient extends OAuth2Client
{
/**
* @param AccessToken $accessToken
* @return User
* @return DiscordResourceOwner
*/
public function fetchUserFromToken(AccessToken $accessToken)
{
return parent::fetchUserFromToken($accessToken);
}

/**
* @return User
* @return DiscordResourceOwner
*/
public function fetchUser()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function buildConfiguration(NodeBuilder $node)

public function getProviderClass(array $config)
{
return 'Discord\OAuth\Discord';
return 'Wohali\OAuth2\Client\Provider\Discord';
}

public function getProviderOptions(array $config)
Expand All @@ -34,12 +34,12 @@ public function getProviderOptions(array $config)

public function getPackagistName()
{
return 'team-reflex/oauth2-discord';
return 'wohali/oauth2-discord-new';
}

public function getLibraryHomepage()
{
return 'https://github.com/teamreflex/oauth2-discord';
return 'https://github.com/wohali/oauth2-discord-new';
}

public function getProviderDisplayName()
Expand Down

0 comments on commit ee11f72

Please sign in to comment.