BJ-3: JiraOAuthAuthProvider + JiraModule wiring#
Title: feat(jira): add JiraOAuthAuthProvider and JiraModule (BJ-3)
Problem#
The Atlassian integration epic (#539) requires a concrete OAuth auth provider for Jira Cloud. Without it, no Jira API calls can be authenticated. This is Wave 1 and unblocks all Jira API work in the epic.
Task / Link#
Closes #543 — BJ-3: JiraOAuthAuthProvider
Part of EPIC #539 · Wave 1 · depends on #540 (BJ-0) and #541 (BJ-1)
Changes#
src/jira/jira-oauth-auth.provider.ts— ConcreteJiraOAuthAuthProviderextendingAtlassianOAuthAuthProvider;platform = 'jira'; token endpointhttps://auth.atlassian.com/oauth/token;getBotUsername()readsJIRA_BOT_USERNAMEfrom configsrc/jira/jira-oauth-auth.provider.spec.ts— Unit tests: platform id, bot username happy path, missing-config error, token endpoint forwarded to base constructorsrc/jira/jira.module.ts— NestJS module withuseFactorygated onJIRA_OAUTH_CLIENT_ID; providesPLATFORM_AUTH_PROVIDER; exports itsrc/atlassian/atlassian-oauth-auth.provider.ts— Minimal stub ofAtlassianOAuthAuthProvider(BJ-1 base class) to unblock this PR while #541 is open; remove once BJ-1 is mergedsrc/atlassian/index.ts— Barrel re-exporting the stub types and tokensrc/config/config.schema.ts— Seven optionalJIRA_*Joi entries (feature-gated byJIRA_OAUTH_CLIENT_ID).env.example— Documents the sevenJIRA_*env vars under# Jira (optional)sectionCLAUDE.md— Addsatlassianto the Key modules list
Notes#
- ⚠️
src/atlassian/contains a stub implementation ofAtlassianOAuthAuthProvider. On merge torc/atlassian-integration(which already has the real BJ-1 implementation), the stub files should be replaced by the real ones — expected outcome of the PR merge review. JiraModuleusesPLATFORM_AUTH_PROVIDERtoken as specified in the plan. Note: importing this alongsideGitHubModulein the same DI scope will cause a duplicate-token conflict; keep imports local to Jira-only consumers until Wave 2 resolves multi-platform routing.- The app boots cleanly without any
JIRA_*env vars set;getToken()on the stub throws if called (full implementation in BJ-1).
Testing#
- 4 unit tests added in
jira-oauth-auth.provider.spec.ts: platform id,getBotUsername()happy path, missing-config error, token endpoint forwarding - Full test suite: 838 tests pass, 0 failures
- Lint: 0 errors, 0 warnings