mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Extend Confluence Document Loader to Support Server/Data Center with PAT (#1998)
* Extend Confluence Document Loader to Support Server/Data Center with PAT - Update authentication to use Personal Access Token (PAT) - Expand compatibility to include both Confluence Cloud and Server/Data Center * Update ConfluenceServerDCApi.credential.ts * use the same confluence loader with different connection logic * use the same confluence loader with different connection logic * Apply Prettier formatting
This commit is contained in:
@@ -28,7 +28,7 @@ class Confluence_DocumentLoaders implements INode {
|
||||
label: 'Connect Credential',
|
||||
name: 'credential',
|
||||
type: 'credential',
|
||||
credentialNames: ['confluenceApi']
|
||||
credentialNames: ['confluenceCloudApi', 'confluenceServerDCApi']
|
||||
}
|
||||
this.inputs = [
|
||||
{
|
||||
@@ -77,16 +77,24 @@ class Confluence_DocumentLoaders implements INode {
|
||||
|
||||
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
||||
const accessToken = getCredentialParam('accessToken', credentialData, nodeData)
|
||||
const personalAccessToken = getCredentialParam('personalAccessToken', credentialData, nodeData)
|
||||
const username = getCredentialParam('username', credentialData, nodeData)
|
||||
|
||||
const confluenceOptions: ConfluencePagesLoaderParams = {
|
||||
username,
|
||||
accessToken,
|
||||
let confluenceOptions: ConfluencePagesLoaderParams = {
|
||||
baseUrl,
|
||||
spaceKey,
|
||||
limit
|
||||
}
|
||||
|
||||
if (accessToken) {
|
||||
// Confluence Cloud credentials
|
||||
confluenceOptions.username = username
|
||||
confluenceOptions.accessToken = accessToken
|
||||
} else if (personalAccessToken) {
|
||||
// Confluence Server/Data Center credentials
|
||||
confluenceOptions.personalAccessToken = personalAccessToken
|
||||
}
|
||||
|
||||
const loader = new ConfluencePagesLoader(confluenceOptions)
|
||||
|
||||
let docs = []
|
||||
|
||||
Reference in New Issue
Block a user