[Confluence] Add support for OAuth 2.0 #493
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's being changed:
This PR adds support the OAuth 2.0 authentication method to the Confluence connector. Currently the connector only supports the "Service Auth" authentication method when configured in Cohere Dashboard. With this PR, users will be able to connect their own accounts to Confluence with the OAuth flow from Cohere Dashboard.
How did you test this change (include any code snippets, API requests, screenshots, or gifs):
To test this change, I set the connector up in local environment, with only
CONFLUENCE_SEARCH_LIMIT=10
in the.env
file. I created a connector in Cohere Dashboard, and I configured it to access the connector in my local environment through a ngrok tunnel. I set the connector up with the OAuth authentication method option in Cohere Dashboard, and from the personal connectors page I connected my account to Confluence.I enabled the connector in Coral, asked several questions, and observed that there were no connector errors being shown in the UI, and that it could answers questions with references in the sidebar that came from the connector.
I had temporary debug logging during development which gave me additional info letting me know that it was working correctly, but I have removed the debug logging prior to creating the PR.
The following screenshot was taking from Coral, with it using the test connector that I created using OAuth: