for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Stevenmaguire\OAuth2\Client\Provider;
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
class MicrosoftResourceOwner implements ResourceOwnerInterface
{
/**
* Raw response
*
* @var array
*/
protected $response;
* Creates new resource owner.
* @param array $response
public function __construct(array $response = array())
$this->response = $response;
}
* Get user id
* @return string|null
public function getId()
return $this->response['id'] ?: null;
* Get user email
public function getEmail()
return $this->response['mail'] ?: null;
* Get user principal name
public function getPrincipalName()
return $this->response['userPrincipalName'] ?: null;
* Get user firstname
public function getFirstname()
return $this->response['givenName'] ?: null;
* Get user lastname
public function getLastname()
return $this->response['surname'] ?: null;
* Get user name
public function getName()
return $this->response['displayName'] ?: null;
* @deprecated To be removed in 3.0
* Get user urls
public function getUrls()
return null;
* Return all of the owner details available as an array.
* @return array
public function toArray()
return $this->response;