@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | protected function getAuthUrl(): string |
| 18 | 18 | { |
| 19 | - return $this->buildAuthUrlFromBase($this->baseUrl . 'authen/v1/index'); |
|
| 19 | + return $this->buildAuthUrlFromBase($this->baseUrl.'authen/v1/index'); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | protected function getCodeFields(): array |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | protected function getTokenUrl(): string |
| 31 | 31 | { |
| 32 | - return $this->baseUrl . 'authen/v1/access_token'; |
|
| 32 | + return $this->baseUrl.'authen/v1/access_token'; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -84,9 +84,9 @@ discard block |
||
| 84 | 84 | protected function getUserByToken(string $token): array |
| 85 | 85 | { |
| 86 | 86 | $response = $this->getHttpClient()->get( |
| 87 | - $this->baseUrl . '/authen/v1/user_info', |
|
| 87 | + $this->baseUrl.'/authen/v1/user_info', |
|
| 88 | 88 | [ |
| 89 | - 'headers' => ['Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $token], |
|
| 89 | + 'headers' => ['Content-Type' => 'application/json', 'Authorization' => 'Bearer '.$token], |
|
| 90 | 90 | 'query' => array_filter( |
| 91 | 91 | [ |
| 92 | 92 | 'user_access_token' => $token, |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $response = \json_decode($response->getBody(), true) ?? []; |
| 99 | 99 | |
| 100 | 100 | if (empty($response['data'])) { |
| 101 | - throw new \InvalidArgumentException('You have error! ' . json_encode($response, JSON_UNESCAPED_UNICODE)); |
|
| 101 | + throw new \InvalidArgumentException('You have error! '.json_encode($response, JSON_UNESCAPED_UNICODE)); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | return $response['data']; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | protected function getAppAccessToken($isInternal = 1) { |
| 131 | 131 | if ($isInternal) { |
| 132 | - $url = $this->baseUrl . 'auth/v3/app_access_token/internal'; |
|
| 132 | + $url = $this->baseUrl.'auth/v3/app_access_token/internal'; |
|
| 133 | 133 | $params = [ |
| 134 | 134 | 'json' => [ |
| 135 | 135 | 'app_id' => $this->config->get('client_id'), |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | ], |
| 138 | 138 | ]; |
| 139 | 139 | } else { |
| 140 | - $url = $this->baseUrl . 'auth/v3/app_access_token'; |
|
| 140 | + $url = $this->baseUrl.'auth/v3/app_access_token'; |
|
| 141 | 141 | $params = [ |
| 142 | 142 | 'json' => [ |
| 143 | 143 | 'app_id' => $this->config->get('client_id'), |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | protected function getTenantAccessToken($isInternal = 1) { |
| 164 | 164 | if ($isInternal) { |
| 165 | - $url = $this->baseUrl . 'auth/v3/tenant_access_token/internal'; |
|
| 165 | + $url = $this->baseUrl.'auth/v3/tenant_access_token/internal'; |
|
| 166 | 166 | $params = [ |
| 167 | 167 | 'json' => [ |
| 168 | 168 | 'app_id' => $this->config->get('client_id'), |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | ], |
| 171 | 171 | ]; |
| 172 | 172 | } else { |
| 173 | - $url = $this->baseUrl . 'auth/v3/tenant_access_token'; |
|
| 173 | + $url = $this->baseUrl.'auth/v3/tenant_access_token'; |
|
| 174 | 174 | $params = [ |
| 175 | 175 | 'json' => [ |
| 176 | 176 | 'app_id' => $this->config->get('client_id'), |