mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-05 05:42:39 +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
|
|
@ -24,7 +24,7 @@ from app.db import (
|
|||
User,
|
||||
get_async_session,
|
||||
)
|
||||
from app.schemas.jira_auth_credentials import JiraAuthCredentialsBase
|
||||
from app.schemas.atlassian_auth_credentials import AtlassianAuthCredentialsBase
|
||||
from app.users import current_active_user
|
||||
from app.utils.oauth_security import OAuthStateManager, TokenEncryption
|
||||
|
||||
|
|
@ -392,7 +392,7 @@ async def refresh_jira_token(
|
|||
try:
|
||||
logger.info(f"Refreshing Jira token for connector {connector.id}")
|
||||
|
||||
credentials = JiraAuthCredentialsBase.from_dict(connector.config)
|
||||
credentials = AtlassianAuthCredentialsBase.from_dict(connector.config)
|
||||
|
||||
# Decrypt tokens if they are encrypted
|
||||
token_encryption = get_token_encryption()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue