Skip to content

Conversation

@StanBarrows
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 13, 2025 09:49
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

Adds first-class OAuth2 support for Bexio integration, including token storage, service logic, connector enhancements, routes, controller/views, and documentation updates.

  • Introduce BexioOAuthTokenStore, BexioOAuthService, and exception handler for OAuth2 flows
  • Extend BexioConnector with OAuth2 boot logic and default OAuth config
  • Add controller/routes/views for the OAuth2 redirect/callback flow and update README/config

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Support/BexioOAuthTokenStore.php Cache-encrypted token storage logic
src/Services/BexioOAuthService.php Exchange, fetch, verify and refresh logic
src/BexioConnector.php OAuth2 boot middleware and default config
src/Http/Controllers/BexioOAuthController.php Redirect/callback handling
src/Support/BexioOAuthExceptionHandler.php Map exceptions to user-friendly views
routes/bexio.php OAuth2 routes definitions
config/bexio.php New use_oauth2 and related settings
resources/views/oauth-result.blade.php Generic result view for OAuth outcomes
src/BexioServiceProvider.php Publish routes/views and config
README.md Document OAuth2 setup and flow
tests/Support/BexioTokenStoreTest.php Token store unit tests
tests/Services/BexioOAuthServiceTest.php OAuth2 service unit tests
tests/Controllers/BexioOAuthControllerTest.php Controller integration tests
tests/Requests/OpenID/FetchUserinfoRequestTest.php Request DTO mapping test
tests/Fixtures/Saloon/OpenID/fetch-userinfo.json Fixture for userinfo response
Comments suppressed due to low confidence (4)

config/bexio.php:13

  • [nitpick] The commented-out alternative auth block is outdated and may confuse users. Consider removing or updating it to reflect the current config structure.
/*	'auth' => [

README.md:19

  • [nitpick] The table header separators use placeholder dashes and don't match column alignment. Update them to proper header separators (e.g., | Package | PHP | Laravel | then |---------|-----|---------|).
| ------- | ----------- | ------- |

src/Services/BexioOAuthService.php:20

  • The method has no return type hint but the docblock says @return mixed. Consider adding a concrete return type or updating the docblock to keep signature and docs in sync.
public function exchangeCodeForAuthenticator(string $code, string $state, string $expectedState)

src/BexioServiceProvider.php:21

  • [nitpick] The autogenerated TODO comment can be removed now that booting logic is implemented. Cleaning it up improves readability.
parent::bootingPackage(); // TODO: Change the autogenerated stub

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