for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Shippinno\Base\OAuth2\Client\Provider;
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
use League\OAuth2\Client\Tool\ArrayAccessorTrait;
class BaseResourceOwner implements ResourceOwnerInterface
{
use ArrayAccessorTrait;
/**
* Raw response
*
* @var array
*/
protected $response;
* @param array $response
public function __construct(array $response)
$this->response = $response;
}
* Returns the identifier of the authorized resource owner.
* @return string
public function getId()
return $this->getValueByKey($this->response, 'user.shop_id');
* Returns the shop name.
public function getShopName()
return $this->getValueByKey($this->response, 'user.shop_name');
* Return all of the owner details available as an array.
* @return array
public function toArray()
return $this->response;