equal
deleted
inserted
replaced
178 'Content-Type' => 'application/json;charset=UTF-8', |
178 'Content-Type' => 'application/json;charset=UTF-8', |
179 'Authorization' => $this->createAuthorisationHeaderFromJson($jsonResp) |
179 'Authorization' => $this->createAuthorisationHeaderFromJson($jsonResp) |
180 ]; |
180 ]; |
181 # Send the request again with a valid correctly signed Authorization header |
181 # Send the request again with a valid correctly signed Authorization header |
182 $sessionResp = $this->httpClient->put($url.'this', ['headers' => $pkheaders, 'verify' => false]); |
182 $sessionResp = $this->httpClient->put($url.'this', ['headers' => $pkheaders, 'verify' => false]); |
183 Log::debug('Create session with auth: '.$sessionResp->getStatusCode().' : '.$sessionResp->getReasonPhrase()); |
183 |
184 |
184 |
185 $jsonResp = json_decode($sessionResp->getBody(), true); |
185 $jsonResp = json_decode($sessionResp->getBody(), true); |
|
186 Log::debug('Create session with auth: '.$sessionResp->getStatusCode().' : '.$sessionResp->getReasonPhrase(). " with body : \n".$sessionResp->getBody()); |
186 |
187 |
187 $this->session = $jsonResp['authenticated']?$jsonResp['sessionId']:""; |
188 $this->session = $jsonResp['authenticated']?$jsonResp['sessionId']:""; |
188 $headers['Authorization'] = "Handle version=\"0\", sessionId=\"$this->session\""; |
189 $headers['Authorization'] = "Handle version=\"0\", sessionId=\"$this->session\""; |
189 |
190 |
190 } |
191 } |