| 1 | <?php namespace League\OAuth2\Client\Provider; |
||
| 9 | class AppleResourceOwner extends GenericResourceOwner |
||
| 10 | { |
||
| 11 | use ArrayAccessorTrait; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Raw response |
||
| 15 | * |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $response = []; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string|null |
||
| 22 | */ |
||
| 23 | private $email; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var boolean true when its private relay from apple else the user mail address |
||
| 27 | */ |
||
| 28 | private $isPrivateEmail; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Gets resource owner attribute by key. The key supports dot notation. |
||
| 32 | * |
||
| 33 | * @param string $key |
||
| 34 | * |
||
| 35 | * @return mixed |
||
| 36 | */ |
||
| 37 | 1 | public function getAttribute($key) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Get user first name |
||
| 44 | * |
||
| 45 | * @return string|null |
||
| 46 | */ |
||
| 47 | 1 | public function getFirstName() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * Get user user id |
||
| 58 | * |
||
| 59 | * @return string|null |
||
| 60 | */ |
||
| 61 | 1 | public function getId() |
|
| 65 | |||
| 66 | /** |
||
| 67 | * Get user last name |
||
| 68 | * |
||
| 69 | * @return string|null |
||
| 70 | */ |
||
| 71 | 1 | public function getLastName() |
|
| 79 | |||
| 80 | /** |
||
| 81 | * Get user email, if available |
||
| 82 | * |
||
| 83 | * @return string|null |
||
| 84 | */ |
||
| 85 | 1 | public function getEmail() |
|
| 89 | |||
| 90 | /** |
||
| 91 | * @return bool |
||
| 92 | */ |
||
| 93 | 1 | public function isPrivateEmail() |
|
| 97 | |||
| 98 | /** |
||
| 99 | * Return all of the owner details available as an array. |
||
| 100 | * |
||
| 101 | * @return array |
||
| 102 | */ |
||
| 103 | 1 | public function toArray() |
|
| 107 | } |
||
| 108 |