feat: add Atlassian OAuth support for Jira and Confluence

- Introduced a shared schema for Atlassian OAuth 2.0 credentials, accommodating both Jira and Confluence.
- Updated Jira connector routes to utilize the new AtlassianAuthCredentialsBase for handling OAuth tokens.
- Enhanced configuration to include new environment variables for Jira OAuth integration.
- Refactored token handling in Jira indexing logic to support the new shared credential structure.
This commit is contained in:
Anish Sarkar 2026-01-06 01:27:29 +05:30
parent 982b9ceb76
commit bf8c3bfcf7
4 changed files with 27 additions and 7 deletions

View file

@ -131,8 +131,8 @@ async def index_jira_issues(
return 0, f"Failed to decrypt Jira tokens: {e!s}"
try:
from app.schemas.jira_auth_credentials import JiraAuthCredentialsBase
credentials = JiraAuthCredentialsBase.from_dict(config_data)
from app.schemas.atlassian_auth_credentials import AtlassianAuthCredentialsBase
credentials = AtlassianAuthCredentialsBase.from_dict(config_data)
except Exception as e:
await task_logger.log_task_failure(
log_entry,
@ -160,7 +160,7 @@ async def index_jira_issues(
config_data["access_token"] = token_encryption.decrypt_token(
config_data["access_token"]
)
credentials = JiraAuthCredentialsBase.from_dict(config_data)
credentials = AtlassianAuthCredentialsBase.from_dict(config_data)
except Exception as e:
await task_logger.log_task_failure(
log_entry,