for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Preview Technologies OAuth2 Resource Owner PHP class
*
* @author Shaharia Azam <[email protected]>
* @url https://www.previewtechs.com
*/
namespace Previewtechs\Oauth2\Client;
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
* Class ResourceOwner
* @package Previewtechs\Oauth2\Client
class ResourceOwner implements ResourceOwnerInterface
{
* @var array
protected $response;
* ResourceOwner constructor.
* @param array $response
public function __construct(array $response = array())
$this->response = $response;
}
* @return null
public function getId()
return $this->response['id'] ?: null;
public function getEmail()
return $this->response['email_address'] ?: null;
public function getFirstName()
return $this->response['profile']['first_name'] ?: null;
public function getLastName()
return $this->response['profile']['last_name'] ?: null;
public function getFullName()
return $this->response['profile']['full_name'] ?: null;
public function getPicture()
return $this->response['profile']['picture'] ?: null;
public function getGender()
return $this->response['profile']['gender'] ?: null;
* @return array
public function toArray()
return $this->response;