-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Package
confluence-sync
What happened?
Hi, I was trying to use your lib for the 1st time but I'm struggling to auth successfully. When checking the logs, I noticed it's passing a header Authorization: Bearer <token> however this way of authenticating doesn't seem to be working for me (Confluence Cloud which I assume is always latest). When doing curl I can auth no problem with Authorization: Basic <email:pat in base64>. I'm not sure if the option with Bearer is no longer supported, but I've seen other folks facing the same situation.
When checking the confluence.js dependency, it seems the option personalAccessToken is no longer supported.
I'm wondering how this is working for you atm - I assume you use with Confluence Enterprise, or what I might be doing wrong...
I reckon you might not want to update confluence.js to v2 but would it be an option for you to relax the auth options and make it accept the basic way? The option does exist in v1.
PS: sorry maybe in the end this was a feat request and not a bug. Thanks!
Version
1.x (Default)
Relevant log output
{
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: true,
socket: [TLSSocket],
_header: 'GET /rest/api/content/redacted?expand=ancestors,version.number,children.page HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Authorization: Bearer redacted\r\n' +
'User-Agent: axios/1.9.0\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: redacted.atlassian.net\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/rest/api/content/redacted?expand=ancestors,version.number,children.page',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'redacted.atlassian.net',
protocol: 'https:',
_redirectable: [Writable],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
data: { error: 'Failed to parse Connect Session Auth Token' }
},
status: 403
}Code of Conduct
- I agree to follow this project's Code of Conduct