mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-01 20:03:30 +02:00
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:
parent
982b9ceb76
commit
bf8c3bfcf7
4 changed files with 27 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue