Skip to content

Commit

Permalink
Merge pull request #594 from nodemailer/ZMS-118
Browse files Browse the repository at this point in the history
ZMS-118 addition
  • Loading branch information
NickOvt committed Jan 2, 2024
2 parents fae91d1 + 5165f3e commit 299cc37
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions lib/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -1097,25 +1097,26 @@ module.exports = {

const finalObj = { paths: mapPathToMethods };

components.components.securitySchemes = {
AccessTokenAuth: {
name: 'X-Access-Token',
type: 'apiKey',
in: 'header',
description: `If authentication is enabled in the WildDuck configuration, you will need to supply an access token in the \`X-Access-Token\` header.\n
\`\`\`json
{
"X-Access-Token": "59fc66a03e54454869460e45"
}
\`\`\`
`
}
};

docs = { ...docs, ...finalObj };
docs = { ...docs, ...components };

docs = {
...docs,
securitySchemes: {
AccessTokenAuth: {
name: 'X-Access-Token',
type: 'apiKey',
in: 'header',
description: `If authentication is enabled in the WildDuck configuration, you will need to supply an access token in the \`X-Access-Token\` header.
\`\`\`json
{
"X-Access-Token": "59fc66a03e54454869460e45"
}
\`\`\`
`
}
},
security: [{ AccessTokenAuth: [] }]
};

Expand Down

0 comments on commit 299cc37

Please sign in to comment.