Skip to content

Releases: keboola/oauth-v2-php-client

6.1.1

Choose a tag to compare

@MiroCillik MiroCillik released this 15 Oct 07:08

Fixed

  • OAuthErrorMessageResolver reads the reason from the error field when the response has no message. oauth-service returns errors as {"error": "...", "code": ..., "status": "error"}, so callers got the raw HTTP client text (internal URL and a cut-off body) instead of the reason. message still takes precedence when both are set.

Only the exception message changes, for error responses without message. Exception class, getCode() and getStatusCode() are unchanged.

Full Changelog: 6.1.0...6.1.1

6.1.0

Choose a tag to compare

@MiroCillik MiroCillik released this 14 Oct 12:02

New

  • Manager::mintOrganizationToken(string $organizationId, string $projectId, string $componentId, string $repository): array calls oauth-service POST /organization-credentials/token and returns ['#token' => ..., 'expiresAt' => ...]. The #token is a GitHub App installation token for one repository, encrypted for the project and component.
  • It authenticates like the rest of Manager: with the application token when one is given, otherwise with the projected Kubernetes ServiceAccount token. The caller needs the oauth:mint scope.
  • HTTP errors throw ClientException with the original status code; 400/404/412/422 mean the request can't succeed as is (unknown project or host, no connection for the organization, repository not covered by the installation).

No breaking changes.

Full Changelog: 6.0.0...6.1.0

6.0.0

Choose a tag to compare

@pepamartinec pepamartinec released this 20 Jul 13:00

Rebuilt on the shared keboola/php-api-client-base (transport, auth, retry, error handling). The public API still returns raw decoded arrays — the breaking change is how the clients are constructed.

Breaking changes

  • Constructor signature. Credentials and Manager now take the API base URL and token as explicit arguments, followed by named transport options, replacing the old (token, config[]) shape:
    new Credentials($baseUrl, $storageToken, backoffMaxTries: 10, ...);
    new Manager($baseUrl, $applicationToken, ...);
    config['url'] → $baseUrl, config['handler'] → requestHandler, config['backoffMaxTries'] → backoffMaxTries.
  • Minimum PHP is now 8.2.
  • Keboola\OAuthV2Api\Exception\ClientException now extends Keboola\ApiClientBase\Exception\ClientException (still an Exception; gains getStatusCode() / getResponseBody()).
  • Credentials::add() now requires the #data key (encrypted payload) instead of data.

New

  • Manager's application token is now optional — when omitted (or null), the client authenticates via the projected Kubernetes ServiceAccount token instead of X-KBC-ManageApiToken.

Preserved behavior

  • Retries (10 attempts) on 5xx and transport errors, 120s connect/request timeouts, and Accept: application/json on every request — matching the previous client.

Internals

  • Removed the hand-rolled Common transport; retry, timeouts, auth, and error normalization now come from keboola/php-api-client-base ^1.1.1.

5.0.2

Choose a tag to compare

@ondrejhlavacek ondrejhlavacek released this 07 Jan 09:18

What's Changed

  • feat(ST-3451): add timeout settings to prevent stuck connections by @ondrejhlavacek in #15

5.0.1

Choose a tag to compare

@romantmb romantmb released this 22 May 12:50

What's Changed

  • Fix headers in Common::apiPost(), cover in tests by @romantmb in #14

Full Changelog: 5.0.0...5.0.1

5.0.0

Choose a tag to compare

@romantmb romantmb released this 22 May 11:50

What's Changed

  • PST-1750: Replace data with #data in Credentials::add() by @romantmb in #13

New Contributors

Full Changelog: 4.0.1...5.0.0

4.0.1

Choose a tag to compare

@odinuv odinuv released this 23 Mar 11:25

What's Changed

Full Changelog: 4.0.0...4.0.1

4.0.0

Choose a tag to compare

@odinuv odinuv released this 25 Sep 21:30

What's Changed

Full Changelog: 3.0.0...4.0.0

3.0.0

Choose a tag to compare

@ErikZigo ErikZigo released this 08 Jun 15:33
8428074
  • Requires guzzlehttp/guzzle v7.x, dropped support for v6.x

2.3.1

Choose a tag to compare

@MiroCillik MiroCillik released this 06 Nov 14:09
6b19216

Added option to disable ssl verification