Skip to content

Conversation

@StanBarrows
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 13, 2025 09:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces OAuth 2.0 support for Bexio by implementing a new OAuth service, token store, and associated controller along with updates to the connector, routes, configuration and documentation.

  • Added tests to cover OAuth token storage, refreshing, userinfo fetching and verification.
  • Implemented new classes such as BexioOAuthService, BexioOAuthTokenStore, BexioOAuthExceptionHandler, and BexioOAuthViewBuilder.
  • Updated the BexioConnector to leverage OAuth2 flows and refresh logic, and adjusted configuration/routes/README accordingly.

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Support/BexioTokenStoreTest.php Added tests for caching, retrieving, overwriting, and forgetting the authenticator.
tests/Services/BexioOAuthServiceTest.php Ensured proper behavior for exchanging codes, token refreshes, and userinfo fetching.
tests/Requests/OpenID/FetchUserinfoRequestTest.php Validated proper mapping of the userinfo response to the DTO.
tests/Controllers/BexioOAuthControllerTest.php Added comprehensive tests for the OAuth redirect and callback flows.
src/Support/* New support classes for OAuth view building, token storage, and exception handling.
src/Services/BexioOAuthService.php Implements code exchange, token refresh, userinfo fetching, and verification logic.
src/Http/Controllers/BexioOAuthController.php New controller handling the OAuth redirect and callback logic.
src/BexioConnector.php Updated connector to support OAuth2, including token refresh within the request boot.
routes/bexio.php, config/bexio.php, README.md Added/updated OAuth-specific routes, settings, and documentation.
Comments suppressed due to low confidence (2)

src/BexioConnector.php:50

  • Consider adding a comment explaining why you are specifically checking for instances of GetRefreshTokenRequest to prevent recursive token refresh calls.
if ($pendingRequest->getRequest() instanceof GetRefreshTokenRequest) {

README.md:19

  • [nitpick] The markdown table formatting was updated; please ensure it remains consistent with the project's style guidelines.
| ------- | ----------- | ------- |

@StanBarrows StanBarrows requested review from a team and RhysLees and removed request for RhysLees June 13, 2025 10:02
@codebar-ag codebar-ag deleted a comment from Copilot AI Jun 30, 2025
@StanBarrows StanBarrows closed this Jul 2, 2025
@StanBarrows StanBarrows deleted the feature-oauth2-support branch November 10, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants