| @@ 81-90 (lines=10) @@ | ||
| 78 | * |
|
| 79 | * @return \EasyWeChat\Support\Collection |
|
| 80 | */ |
|
| 81 | public function getAuthorizationToken($appId, $refreshToken) |
|
| 82 | { |
|
| 83 | $data = [ |
|
| 84 | 'component_appid' => $this->getComponentAppId(), |
|
| 85 | 'authorizer_appid' => $appId, |
|
| 86 | 'authorizer_refresh_token' => $refreshToken, |
|
| 87 | ]; |
|
| 88 | ||
| 89 | return $this->parseJSON('json', [self::AUTHORIZATION_TOKEN, $data]); |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * Get authorizer info. |
|
| @@ 99-107 (lines=9) @@ | ||
| 96 | * |
|
| 97 | * @return \EasyWeChat\Support\Collection |
|
| 98 | */ |
|
| 99 | public function getAuthorizerInfo($authorizerAppId) |
|
| 100 | { |
|
| 101 | $data = [ |
|
| 102 | 'component_appid' => $this->getComponentAppId(), |
|
| 103 | 'authorizer_appid' => $authorizerAppId, |
|
| 104 | ]; |
|
| 105 | ||
| 106 | return $this->parseJSON('json', [self::GET_AUTHORIZER_INFO, $data]); |
|
| 107 | } |
|
| 108 | ||
| 109 | /** |
|
| 110 | * Get options. |
|
| @@ 117-126 (lines=10) @@ | ||
| 114 | * |
|
| 115 | * @return \EasyWeChat\Support\Collection |
|
| 116 | */ |
|
| 117 | public function getAuthorizerOption($authorizerAppId, $optionName) |
|
| 118 | { |
|
| 119 | $data = [ |
|
| 120 | 'component_appid' => $this->getComponentAppId(), |
|
| 121 | 'authorizer_appid' => $authorizerAppId, |
|
| 122 | 'option_name' => $optionName, |
|
| 123 | ]; |
|
| 124 | ||
| 125 | return $this->parseJSON('json', [self::GET_AUTHORIZER_OPTION, $data]); |
|
| 126 | } |
|
| 127 | ||
| 128 | /** |
|
| 129 | * Set authorizer option. |
|
| @@ 137-147 (lines=11) @@ | ||
| 134 | * |
|
| 135 | * @return \EasyWeChat\Support\Collection |
|
| 136 | */ |
|
| 137 | public function setAuthorizerOption($authorizerAppId, $optionName, $optionValue) |
|
| 138 | { |
|
| 139 | $data = [ |
|
| 140 | 'component_appid' => $this->getComponentAppId(), |
|
| 141 | 'authorizer_appid' => $authorizerAppId, |
|
| 142 | 'option_name' => $optionName, |
|
| 143 | 'option_value' => $optionValue, |
|
| 144 | ]; |
|
| 145 | ||
| 146 | return $this->parseJSON('json', [self::SET_AUTHORIZER_OPTION, $data]); |
|
| 147 | } |
|
| 148 | ||
| 149 | /** |
|
| 150 | * Get component appId. |
|