1 | <?php |
||
20 | class AuthorizerAccessToken extends BaseAccessToken |
||
21 | { |
||
22 | /** |
||
23 | * @var \EntWeChat\Suite\Authorization |
||
24 | */ |
||
25 | protected $authorization; |
||
26 | |||
27 | /** |
||
28 | * AuthorizerAccessToken constructor. |
||
29 | * |
||
30 | * @param string $corpId |
||
31 | * @param \EntWeChat\Suite\Authorization $authorization |
||
32 | */ |
||
33 | public function __construct($corpId, Authorization $authorization) |
||
39 | |||
40 | /** |
||
41 | * Get token from WeChat API. |
||
42 | * |
||
43 | * @param bool $forceRefresh |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getToken($forceRefresh = false) |
||
57 | |||
58 | /** |
||
59 | * Refresh authorizer access token. |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | protected function refreshToken() |
||
75 | |||
76 | /** |
||
77 | * Return the AuthorizerCorpId. |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | public function getCorpId() |
||
85 | } |
||
86 |