Skip to content

Commit 55fe0a2

Browse files
committed
Add SensitiveParameter attribute to all sensitive parameters
1 parent fea2744 commit 55fe0a2

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGELOG.md

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

3-
## [0.6.x (unreleased)](https://github.com/onlime/bexio-api-client/compare/0.6.1...main)
3+
## [0.6.x (unreleased)](https://github.com/onlime/bexio-api-client/compare/0.6.2...main)
4+
5+
## [0.6.2 (2024-12-05)](https://github.com/onlime/bexio-api-client/compare/0.6.1...0.6.2)
6+
7+
- Fix token refresh for new Bexio OpenID Connect provider URL `https://auth.bexio.com/realms/bexio`: Always store scopes in tokens file, as they are also used in `refreshToken()`.
8+
- Add `SensitiveParameter` attribute to all sensitive parameters to avoid logging/leaking them.
49

510
## [0.6.1 (2024-10-09)](https://github.com/onlime/bexio-api-client/compare/0.6.0...0.6.1)
611

src/Bexio/AbstractClient.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ abstract class AbstractClient
3131

3232
public function __construct(
3333
public string $clientId,
34+
#[\SensitiveParameter]
3435
public string $clientSecret
3536
) {}
3637

37-
public function setAccessToken(string $accessToken): self
38+
public function setAccessToken(#[\SensitiveParameter] string $accessToken): self
3839
{
3940
$this->accessToken = $accessToken;
4041
return $this;
@@ -45,7 +46,7 @@ public function getAccessToken(): ?string
4546
return $this->accessToken;
4647
}
4748

48-
public function setRefreshToken(string $refreshToken): self
49+
public function setRefreshToken(#[\SensitiveParameter] string $refreshToken): self
4950
{
5051
$this->refreshToken = $refreshToken;
5152
return $this;

0 commit comments

Comments
 (0)