Skip to content

Commit cdcdeca

Browse files
committed
Remove verify peer flag from HttpClient and related configurations
This was a leftover from SBS integration development and is no longer needed.
1 parent 1cdd470 commit cdcdeca

5 files changed

Lines changed: 1 addition & 8 deletions

File tree

config/packages/parameters.yml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ parameters:
323323
sram.authz_location: authz
324324
sram.attributes_location: attributes
325325
sram.interrupt_location: interrupt
326-
sram.verify_peer: false
327326
sram.allowed_attributes:
328327
- 'urn:mace:dir:attribute-def:eduPersonEntitlement'
329328
- 'urn:mace:dir:attribute-def:eduPersonPrincipalName'

config/services/services.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ services:
358358
- "%sram.attributes_location%"
359359
- "%sram.interrupt_location%"
360360
- "%sram.api_token%"
361-
- "%sram.verify_peer%"
362361

363362
engineblock.sbs.http_client:
364363
class: OpenConext\EngineBlock\Http\HttpClient

src/OpenConext/EngineBlock/Http/HttpClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,13 @@ public function read($path, array $parameters = [], array $headers = [])
8989
* @param array $headers
9090
* @return mixed
9191
*/
92-
public function post($data, $path, $parameters = [], array $headers = [], bool $verify = true)
92+
public function post($data, $path, $parameters = [], array $headers = [])
9393
{
9494
$resource = ResourcePathFormatter::format($path, $parameters);
9595
$response = $this->httpClient->request('POST', $resource, [
9696
'http_errors' => false,
9797
'body' => $data,
9898
'headers' => $headers,
99-
'verify' => $verify,
10099
]);
101100
$statusCode = $response->getStatusCode();
102101

src/OpenConext/EngineBlockBundle/Sbs/SbsClient.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public function __construct(
3333
private readonly string $attributesLocation,
3434
private readonly string $interruptLocation,
3535
private readonly string $apiToken,
36-
private readonly bool $verifyPeer
3736
) {
3837
}
3938

@@ -44,7 +43,6 @@ public function authz(AuthzRequest $request): AuthzResponse
4443
$this->buildUrl($this->authzLocation),
4544
[],
4645
$this->requestHeaders(),
47-
$this->verifyPeer
4846
);
4947

5048
if (!is_array($jsonData)) {
@@ -61,7 +59,6 @@ public function requestAttributesFor(AttributesRequest $request): AttributesResp
6159
$this->buildUrl($this->attributesLocation),
6260
[],
6361
$this->requestHeaders(),
64-
$this->verifyPeer
6562
);
6663

6764
if (!is_array($jsonData)) {

tests/unit/OpenConext/EngineBlockBundle/Sbs/SbsClientTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ protected function setUp(): void
4545
'/authz',
4646
'/interrupt',
4747
'Bearer test_token',
48-
true
4948
);
5049
}
5150

0 commit comments

Comments
 (0)