Skip to content

Extract AbstractAuthenticationService to share logic between jira and confluence#477

Merged
pathob merged 1 commit into
mainfrom
refactor/extract-abstract-authentication-service
May 13, 2026
Merged

Extract AbstractAuthenticationService to share logic between jira and confluence#477
pathob merged 1 commit into
mainfrom
refactor/extract-abstract-authentication-service

Conversation

@pathob
Copy link
Copy Markdown
Contributor

@pathob pathob commented May 13, 2026

The shared service plumbing (bulk set with declarative null-model and map-key fallback semantics, single-entity set, find-by-name, get/set SSO) lives in a new AbstractAuthenticationService in commons. Host-specific subclasses provide abstract hooks that delegate to their existing per-host model utils.

Add tests for the null-model and null-name semantics in both AuthenticationServiceTests.

… confluence

The shared service plumbing (bulk set with declarative null-model and map-key
fallback semantics, single-entity set, find-by-name, get/set SSO) lives in a new
AbstractAuthenticationService in commons. Host-specific subclasses provide
abstract hooks that delegate to their existing per-host model utils.

Add tests for the null-model and null-name semantics in both
AuthenticationServiceTests.
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
15.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link
Copy Markdown

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 extracts shared authentication IdP/SSO service logic into a new AbstractAuthenticationService in commons, allowing Jira and Confluence implementations to reuse the same bulk/set/find plumbing while delegating host-specific model conversions to abstract hooks.

Changes:

  • Introduced AbstractAuthenticationService in commons to centralize IdP and SSO get/set behaviors.
  • Updated Jira and Confluence AuthenticationServiceImpl classes to extend the new abstract service and provide conversion hook implementations.
  • Added new tests in both Jira and Confluence to cover map-key fallback for null IdP names and declarative null-model semantics.

Reviewed changes

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

Show a summary per file
File Description
commons/src/main/java/com/deftdevs/bootstrapi/commons/service/AbstractAuthenticationService.java New shared base service implementing common IdP/SSO operations and bulk semantics.
jira/src/main/java/com/deftdevs/bootstrapi/jira/service/AuthenticationServiceImpl.java Refactored to extend the new abstract service and provide Jira-specific conversions.
confluence/src/main/java/com/deftdevs/bootstrapi/confluence/service/AuthenticationServiceImpl.java Refactored to extend the new abstract service and provide Confluence-specific conversions.
jira/src/test/java/com/deftdevs/bootstrapi/jira/service/AuthenticationServiceTest.java Added tests for null-model and null-name (map key fallback) semantics.
confluence/src/test/java/com/deftdevs/bootstrapi/confluence/service/AuthenticationServiceTest.java Added tests for null-model and null-name (map key fallback) semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pathob pathob merged commit f296a1d into main May 13, 2026
12 of 14 checks passed
@pathob pathob deleted the refactor/extract-abstract-authentication-service branch May 13, 2026 15:04
Copilot stopped work on behalf of pathob due to an error May 13, 2026 15:04
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.

2 participants