@@ -65,7 +65,7 @@ |
||
65 | 65 | /** |
66 | 66 | * Get the services provided by the provider. |
67 | 67 | * |
68 | - * @return array |
|
68 | + * @return string[] |
|
69 | 69 | */ |
70 | 70 | public function provides() { |
71 | 71 | return array('api-proxy.proxy'); |
@@ -18,8 +18,8 @@ |
||
18 | 18 | class ProxyMissingParamException extends ProxyException { |
19 | 19 | |
20 | 20 | public function __construct($parameter) { |
21 | - $this->httpStatusCode = 400; |
|
22 | - $this->errorType = 'proxy_missing_param'; |
|
21 | + $this->httpStatusCode = 400; |
|
22 | + $this->errorType = 'proxy_missing_param'; |
|
23 | 23 | parent::__construct(\Lang::get('api-proxy-laravel::messages.proxy_missing_param', array('param' => $parameter))); |
24 | 24 | } |
25 | 25 |
@@ -18,8 +18,8 @@ |
||
18 | 18 | class CookieInvalidException extends ProxyException { |
19 | 19 | |
20 | 20 | public function __construct($parameter) { |
21 | - $this->httpStatusCode = 500; |
|
22 | - $this->errorType = 'proxy_cookie_invalid'; |
|
21 | + $this->httpStatusCode = 500; |
|
22 | + $this->errorType = 'proxy_cookie_invalid'; |
|
23 | 23 | parent::__construct(\Lang::get('api-proxy-laravel::messages.proxy_cookie_invalid', array('param' => $parameter))); |
24 | 24 | } |
25 | 25 |
@@ -18,8 +18,8 @@ |
||
18 | 18 | class MissingClientSecretException extends ProxyException { |
19 | 19 | |
20 | 20 | public function __construct($parameter) { |
21 | - $this->httpStatusCode = 500; |
|
22 | - $this->errorType = 'missing_client_secret'; |
|
21 | + $this->httpStatusCode = 500; |
|
22 | + $this->errorType = 'missing_client_secret'; |
|
23 | 23 | parent::__construct(\Lang::get('api-proxy-laravel::messages.missing_client_secret', array('client' => $parameter))); |
24 | 24 | } |
25 | 25 |
@@ -18,8 +18,8 @@ |
||
18 | 18 | class CookieExpiredException extends ProxyException { |
19 | 19 | |
20 | 20 | public function __construct() { |
21 | - $this->httpStatusCode = 403; |
|
22 | - $this->errorType = 'proxy_cookie_expired'; |
|
21 | + $this->httpStatusCode = 403; |
|
22 | + $this->errorType = 'proxy_cookie_expired'; |
|
23 | 23 | parent::__construct(\Lang::get('api-proxy-laravel::messages.proxy_cookie_expired')); |
24 | 24 | } |
25 | 25 |
@@ -11,9 +11,9 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | return array( |
14 | - 'access_token_ok' => 'Access token retrieved successfully', |
|
15 | - 'proxy_missing_param' => 'Missing mandatory parameter <b>:param</b> in the request call', |
|
16 | - 'missing_client_secret' => 'Missing secret key for client id <b>:client</b>', |
|
17 | - 'proxy_cookie_expired' => 'Cookie expired or not found. Return to the login form.', |
|
18 | - 'proxy_cookie_invalid' => 'Cookie format not valid. Missing attribute <b>:param</b>.' |
|
14 | + 'access_token_ok' => 'Access token retrieved successfully', |
|
15 | + 'proxy_missing_param' => 'Missing mandatory parameter <b>:param</b> in the request call', |
|
16 | + 'missing_client_secret' => 'Missing secret key for client id <b>:client</b>', |
|
17 | + 'proxy_cookie_expired' => 'Cookie expired or not found. Return to the login form.', |
|
18 | + 'proxy_cookie_invalid' => 'Cookie format not valid. Missing attribute <b>:param</b>.' |
|
19 | 19 | ); |
20 | 20 | \ No newline at end of file |
@@ -11,9 +11,9 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | return array( |
14 | - 'access_token_ok' => 'Access token recuperato correttamente', |
|
15 | - 'proxy_missing_param' => 'Manca il parametro obbligatorio <b>:param</b> nella richiesta', |
|
16 | - 'missing_client_secret' => 'Manca la chiave segreta per il client <b>:client</b>', |
|
17 | - 'proxy_cookie_expired' => 'Cookie scaduto o non trovato. Ritorna al form di login.', |
|
18 | - 'proxy_cookie_invalid' => 'Formato del cookie non valido. Manca l\'attributo <b>:param</b>.' |
|
14 | + 'access_token_ok' => 'Access token recuperato correttamente', |
|
15 | + 'proxy_missing_param' => 'Manca il parametro obbligatorio <b>:param</b> nella richiesta', |
|
16 | + 'missing_client_secret' => 'Manca la chiave segreta per il client <b>:client</b>', |
|
17 | + 'proxy_cookie_expired' => 'Cookie scaduto o non trovato. Ritorna al form di login.', |
|
18 | + 'proxy_cookie_invalid' => 'Formato del cookie non valido. Manca l\'attributo <b>:param</b>.' |
|
19 | 19 | ); |
20 | 20 | \ No newline at end of file |
@@ -27,6 +27,10 @@ discard block |
||
27 | 27 | private $cookieManager = null; |
28 | 28 | private $useHeader = false; |
29 | 29 | |
30 | + /** |
|
31 | + * @param string $callMode |
|
32 | + * @param CookieManager $cookieManager |
|
33 | + */ |
|
30 | 34 | public function __construct($uri, $method, $clientSecrets, $callMode, $cookieManager) { |
31 | 35 | $this->uri = $uri; |
32 | 36 | $this->method = $method; |
@@ -136,7 +140,7 @@ discard block |
||
136 | 140 | } |
137 | 141 | |
138 | 142 | /** |
139 | - * @param $response |
|
143 | + * @param \GuzzleHttp\Message\ResponseInterface $response |
|
140 | 144 | * @return mixed |
141 | 145 | */ |
142 | 146 | private function getResponseContent($response) { |
@@ -155,7 +159,7 @@ discard block |
||
155 | 159 | * @param $method |
156 | 160 | * @param $uriVal |
157 | 161 | * @param $inputs |
158 | - * @return \GuzzleHttp\Message\FutureResponse|\GuzzleHttp\Message\ResponseInterface|\GuzzleHttp\Ring\Future\FutureInterface|mixed|null |
|
162 | + * @return \GuzzleHttp\Message\ResponseInterface |
|
159 | 163 | */ |
160 | 164 | private function sendGuzzleRequest($method, $uriVal, $inputs) { |
161 | 165 | $options = array(); |