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 array $options An array of options returned by the service provider |
||
36 | * in the access token request. The `access_token` option is required. |
||
37 | * @throws InvalidArgumentException if `access_token` is not provided in `$options`. |
||
38 | * |
||
39 | * @throws \Exception |
||
40 | */ |
||
41 | 3 | public function __construct(array $options = [], $httpClient) |
|
89 | |||
90 | /** |
||
91 | * @return array Apple's JSON Web Key |
||
92 | */ |
||
93 | 2 | protected function getAppleKey() |
|
103 | |||
104 | /** |
||
105 | * @return string |
||
106 | */ |
||
107 | 1 | public function getIdToken() |
|
111 | |||
112 | /** |
||
113 | * @return string |
||
114 | */ |
||
115 | public function getEmail() |
||
119 | |||
120 | /** |
||
121 | * @return boolean |
||
122 | */ |
||
123 | public function isPrivateEmail() |
||
127 | } |
||
128 |