mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Fix another digest auth issue (#2898)
This commit is contained in:
@@ -500,6 +500,9 @@ function digestAuthAxiosConfig(
|
|||||||
const realm: string = authDetails
|
const realm: string = authDetails
|
||||||
.find((el: any) => el[0].toLowerCase().indexOf('realm') > -1)[1]
|
.find((el: any) => el[0].toLowerCase().indexOf('realm') > -1)[1]
|
||||||
.replace(/"/g, '');
|
.replace(/"/g, '');
|
||||||
|
const opaque: string = authDetails
|
||||||
|
.find((el: any) => el[0].toLowerCase().indexOf('opaque') > -1)[1]
|
||||||
|
.replace(/"/g, '');
|
||||||
const nonce: string = authDetails
|
const nonce: string = authDetails
|
||||||
.find((el: any) => el[0].toLowerCase().indexOf('nonce') > -1)[1]
|
.find((el: any) => el[0].toLowerCase().indexOf('nonce') > -1)[1]
|
||||||
.replace(/"/g, '');
|
.replace(/"/g, '');
|
||||||
@@ -519,7 +522,7 @@ function digestAuthAxiosConfig(
|
|||||||
const authorization =
|
const authorization =
|
||||||
`Digest username="${auth?.username as string}",realm="${realm}",` +
|
`Digest username="${auth?.username as string}",realm="${realm}",` +
|
||||||
`nonce="${nonce}",uri="${path}",qop="auth",algorithm="MD5",` +
|
`nonce="${nonce}",uri="${path}",qop="auth",algorithm="MD5",` +
|
||||||
`response="${response}",nc="${nonceCount}",cnonce="${cnonce}"`;
|
`response="${response}",nc="${nonceCount}",cnonce="${cnonce}",opaque="${opaque}"`;
|
||||||
if (axiosConfig.headers) {
|
if (axiosConfig.headers) {
|
||||||
axiosConfig.headers.authorization = authorization;
|
axiosConfig.headers.authorization = authorization;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user