1 | <?php |
||
10 | class AppleAccessToken extends AccessToken |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $idToken; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $email; |
||
21 | |||
22 | /** |
||
23 | * @var boolean |
||
24 | */ |
||
25 | protected $isPrivateEmail; |
||
26 | |||
27 | /** |
||
28 | * @var ClientInterface |
||
29 | */ |
||
30 | protected $httpClient; |
||
31 | |||
32 | /** |
||
33 | * Constructs an access token. |
||
34 | * |
||
35 | * @param ClientInterface $httpClient the http client to use |
||
36 | * @param array $options An array of options returned by the service provider |
||
37 | * in the access token request. The `access_token` option is required. |
||
38 | * @throws InvalidArgumentException if `access_token` is not provided in `$options`. |
||
39 | * |
||
40 | * @throws \Exception |
||
41 | */ |
||
42 | 2 | public function __construct($httpClient, array $options = []) |
|
90 | |||
91 | /** |
||
92 | * @return array Apple's JSON Web Key |
||
93 | */ |
||
94 | 1 | protected function getAppleKey() |
|
104 | |||
105 | /** |
||
106 | * @return string |
||
107 | */ |
||
108 | 1 | public function getIdToken() |
|
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | public function getEmail() |
||
120 | |||
121 | /** |
||
122 | * @return boolean |
||
123 | */ |
||
124 | public function isPrivateEmail() |
||
128 | } |
||
129 |