Skip to content

Commit fea2744

Browse files
committed
Merge branch 'main' of github.com:onlime/bexio-api-client
2 parents 02fc40f + 6919712 commit fea2744

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# CHANGELOG
22

3-
## [0.5.x (unreleased)](https://github.com/onlime/bexio-api-client/compare/0.5.0...main)
3+
## [0.6.x (unreleased)](https://github.com/onlime/bexio-api-client/compare/0.6.1...main)
4+
5+
## [0.6.1 (2024-10-09)](https://github.com/onlime/bexio-api-client/compare/0.6.0...0.6.1)
6+
7+
- Fix for `jumbojett/openid-connect-php` v1.0: Only set accessToken if already loaded in `Bexio\Client` instance.
8+
9+
## [0.6.0 (2024-10-08)](https://github.com/onlime/bexio-api-client/compare/0.5.0...0.6.0)
10+
11+
- Updated `jumbojett/openid-connect-php` to v1.0
12+
- Updated Bexio OpenID Connect provider URL to `https://auth.bexio.com/realms/bexio`
413

514
## [0.5.0 (2023-09-27)](https://github.com/onlime/bexio-api-client/compare/0.4.1...0.5.0)
615

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
"require": {
2323
"php": "^8.2",
2424
"ext-json": "*",
25-
"jumbojett/openid-connect-php": "^0.9.10",
26-
"guzzlehttp/guzzle": "^7.8"
25+
"jumbojett/openid-connect-php": "^1.0",
26+
"guzzlehttp/guzzle": "^7.9"
2727
},
2828
"require-dev": {
29-
"laravel/pint": "^1.13"
29+
"laravel/pint": "^1.18"
3030
},
3131
"suggest": {
3232
"onlime/laravel-bexio-api-client": "To use Laravel HTTP Client instead of Guzzle"

src/Bexio/AbstractClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
abstract class AbstractClient
99
{
10-
const PROVIDER_URL = 'https://idp.bexio.com';
10+
const PROVIDER_URL = 'https://auth.bexio.com/realms/bexio';
1111

1212
const API_URL = 'https://api.bexio.com';
1313

@@ -104,7 +104,7 @@ public function getOpenIDConnectClient(): OpenIDConnectClient
104104
$this->clientSecret
105105
);
106106
$oidc->addScope($this->scopes);
107-
$oidc->setAccessToken($this->accessToken);
107+
$this->accessToken && $oidc->setAccessToken($this->accessToken);
108108
return $oidc;
109109
}
110110

src/Bexio/Bexio.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ class Bexio
66
{
77
public function __construct(
88
protected AbstractClient $client
9-
) {
10-
}
9+
) {}
1110
}

src/Bexio/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function request(
5656
}
5757

5858
try {
59-
$response = (new GuzzleClient())->request($method, $this->getFullApiUrl($path), $options);
59+
$response = (new GuzzleClient)->request($method, $this->getFullApiUrl($path), $options);
6060
} catch (ClientException $e) {
6161
// transform Guzzle ClientException into some more readable form, so that body content does not get truncated
6262
$body = json_decode($e->getResponse()->getBody()->getContents());

src/Bexio/Exception/BexioClientException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44

55
use Exception;
66

7-
class BexioClientException extends Exception
8-
{
9-
}
7+
class BexioClientException extends Exception {}

0 commit comments

Comments
 (0)