fix: do not create OAuth client when setting up with OIDC auth method#1049
Draft
saw-jan wants to merge 6 commits into
Draft
fix: do not create OAuth client when setting up with OIDC auth method#1049saw-jan wants to merge 6 commits into
saw-jan wants to merge 6 commits into
Conversation
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
9020e38 to
5e5350b
Compare
There was a problem hiding this comment.
Pull request overview
This PR adjusts the /setup integration endpoint so that OAuth client creation only happens when the OAuth2 authorization method is used, and not when configuring the integration via OIDC (matching the API behavior described in NEX-628).
Changes:
- Update
ConfigController::setUpIntegration()to only recreate/create a Nextcloud OAuth client whenauthorization_methodis OAuth2, and always include astatusfield in responses. - Add/adjust controller tests to cover successful setup responses for both OAuth2 and OIDC.
- Update static analysis config (Psalm) and document the fix in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
lib/Controller/ConfigController.php |
Gate OAuth client recreation behind the OAuth2 auth method; include status in both success and error responses. |
tests/lib/Controller/ConfigControllerTest.php |
Add provider-driven tests to validate /setup responses for OAuth2 vs OIDC, plus minor test refactors. |
psalm.xml |
Ignore tests/stub during Psalm analysis. |
CHANGELOG.md |
Add an Unreleased “Fixed” entry for the OIDC setup behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5e5350b to
4f58c5f
Compare
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
4f58c5f to
d4e6b70
Compare
PHP Code CoverageCoverage after merging fix/conditional-oauth-client into release/2.11 will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Do not create OAuth client when setting up integration with oidc method.
Request:
Related Issue or Workpackage
Types of changes
Checklist:
CHANGELOG.mdfile