Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed signature of methods in AbstractProvider.php #898

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/providers/thirdparty.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Gateway | Composer Package | Maintainer
[Imgur](https://github.com/adam-paterson/oauth2-imgur) | adam-paterson/oauth2-imgur | [Adam Paterson](https://github.com/adam-paterson)
[Jira](https://packagist.org/packages/mrjoops/oauth2-jira) | mrjoops/oauth2-jira | [Alexandre Lahure](https://github.com/mrjoops)
[Keycloak](https://github.com/stevenmaguire/oauth2-keycloak) | stevenmaguire/oauth2-keycloak | [Steven Maguire](https://github.com/stevenmaguire)
[Keycloak](https://github.com/cloudcogsio/oauth2-keycloak) | cloudcogsio/oauth2-keycloak | [Cloudcogs.io](https://github.com/cloudcogsio)
[Linode](https://packagist.org/packages/webinarium/oauth2-linode) | webinarium/oauth2-linode | [Artem Rodygin](https://github.com/webinarium)
[Mailchimp](https://github.com/chadhutchins/oauth2-mailchimp) | chadhutchins/oauth2-mailchimp | [Chad Hutchins](https://github.com/chadhutchins)
[Mail.ru](https://packagist.org/packages/aego/oauth2-mailru) | aego/oauth2-mailru | [Alexey](https://github.com/rakeev)
Expand Down
8 changes: 4 additions & 4 deletions src/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ abstract public function getBaseAccessTokenUrl(array $params);
* @param AccessToken $token
* @return string
*/
abstract public function getResourceOwnerDetailsUrl(AccessToken $token);
abstract public function getResourceOwnerDetailsUrl(AccessTokenInterface $token);

/**
* Returns a new random string to use as the state parameter in an
Expand Down Expand Up @@ -754,15 +754,15 @@ protected function createAccessToken(array $response, AbstractGrant $grant)
* @param AccessToken $token
* @return ResourceOwnerInterface
*/
abstract protected function createResourceOwner(array $response, AccessToken $token);
abstract protected function createResourceOwner(array $response, AccessTokenInterface $token);

/**
* Requests and returns the resource owner of given access token.
*
* @param AccessToken $token
* @return ResourceOwnerInterface
*/
public function getResourceOwner(AccessToken $token)
public function getResourceOwner(AccessTokenInterface $token)
{
$response = $this->fetchResourceOwnerDetails($token);

Expand All @@ -775,7 +775,7 @@ public function getResourceOwner(AccessToken $token)
* @param AccessToken $token
* @return mixed
*/
protected function fetchResourceOwnerDetails(AccessToken $token)
protected function fetchResourceOwnerDetails(AccessTokenInterface $token)
{
$url = $this->getResourceOwnerDetailsUrl($token);

Expand Down