1 | <?php |
||
6 | class AccessToken extends \League\OAuth2\Client\Token\AccessToken |
||
7 | { |
||
8 | /** |
||
9 | * @var string |
||
10 | */ |
||
11 | protected $sessionKey; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $openId; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $unionId; |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $values = []; |
||
27 | |||
28 | /** |
||
29 | * Constructs an access token. |
||
30 | * |
||
31 | * @param array $options An array of options returned by the service provider |
||
32 | * in the access token request. The `access_token` option is required. |
||
33 | * @throws \InvalidArgumentException if `access_token` is not provided in `$options`. |
||
34 | */ |
||
35 | public function __construct(array $options = []) |
||
64 | |||
65 | /** |
||
66 | * Returns the session key string of this instance. |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | public function getSessionKey() |
||
74 | |||
75 | /** |
||
76 | * Returns the resource owner identifier, if defined. |
||
77 | * |
||
78 | * @return string|null |
||
79 | */ |
||
80 | public function getOpenId() |
||
84 | |||
85 | /** |
||
86 | * Returns the resource owner identifier, if defined. |
||
87 | * |
||
88 | * @return string|null |
||
89 | */ |
||
90 | public function getUnionId() |
||
94 | |||
95 | /** |
||
96 | * Returns additional vendor values stored in the token. |
||
97 | * |
||
98 | * @return array |
||
99 | */ |
||
100 | public function getValues() |
||
104 | |||
105 | /** |
||
106 | * Returns the token key. |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | public function __toString() |
||
114 | |||
115 | /** |
||
116 | * Returns an array of parameters to serialize when this is serialized with |
||
117 | * json_encode(). |
||
118 | * |
||
119 | * @return array |
||
120 | */ |
||
121 | public function jsonSerialize() |
||
139 | } |
||
140 |