@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | protected function getAuthUrl(): string |
29 | 29 | { |
30 | - return $this->buildAuthUrlFromBase($this->baseUrl . '/authen/v1/index'); |
|
30 | + return $this->buildAuthUrlFromBase($this->baseUrl.'/authen/v1/index'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | protected function getCodeFields(): array |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | protected function getTokenUrl(): string |
42 | 42 | { |
43 | - return $this->baseUrl . '/authen/v1/access_token'; |
|
43 | + return $this->baseUrl.'/authen/v1/access_token'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | protected function getUserByToken(string $token): array |
96 | 96 | { |
97 | 97 | $response = $this->getHttpClient()->get( |
98 | - $this->baseUrl . '/authen/v1/user_info', |
|
98 | + $this->baseUrl.'/authen/v1/user_info', |
|
99 | 99 | [ |
100 | - 'headers' => ['Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $token], |
|
100 | + 'headers' => ['Content-Type' => 'application/json', 'Authorization' => 'Bearer '.$token], |
|
101 | 101 | 'query' => array_filter( |
102 | 102 | [ |
103 | 103 | 'user_access_token' => $token, |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $response = \json_decode($response->getBody(), true) ?? []; |
110 | 110 | |
111 | 111 | if (empty($response['data'])) { |
112 | - throw new \InvalidArgumentException('You have error! ' . json_encode($response, JSON_UNESCAPED_UNICODE)); |
|
112 | + throw new \InvalidArgumentException('You have error! '.json_encode($response, JSON_UNESCAPED_UNICODE)); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | return $response['data']; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | protected function configAppAccessToken() |
167 | 167 | { |
168 | - $url = $this->baseUrl . '/auth/v3/app_access_token/'; |
|
168 | + $url = $this->baseUrl.'/auth/v3/app_access_token/'; |
|
169 | 169 | $params = [ |
170 | 170 | 'json' => [ |
171 | 171 | 'app_id' => $this->config->get('client_id'), |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | ]; |
176 | 176 | |
177 | 177 | if ($this->isInternalApp) { |
178 | - $url = $this->baseUrl . '/auth/v3/app_access_token/internal/'; |
|
178 | + $url = $this->baseUrl.'/auth/v3/app_access_token/internal/'; |
|
179 | 179 | $params = [ |
180 | 180 | 'json' => [ |
181 | 181 | 'app_id' => $this->config->get('client_id'), |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | protected function configTenantAccessToken() |
207 | 207 | { |
208 | - $url = $this->baseUrl . '/auth/v3/tenant_access_token/'; |
|
208 | + $url = $this->baseUrl.'/auth/v3/tenant_access_token/'; |
|
209 | 209 | $params = [ |
210 | 210 | 'json' => [ |
211 | 211 | 'app_id' => $this->config->get('client_id'), |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | ]; |
216 | 216 | |
217 | 217 | if ($this->isInternalApp) { |
218 | - $url = $this->baseUrl . '/auth/v3/tenant_access_token/internal/'; |
|
218 | + $url = $this->baseUrl.'/auth/v3/tenant_access_token/internal/'; |
|
219 | 219 | $params = [ |
220 | 220 | 'json' => [ |
221 | 221 | 'app_id' => $this->config->get('client_id'), |