0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Removed authenticateClient usage from v2 api

no-issue

We do not support this authentication mechanism for api v2
This commit is contained in:
Fabien O'Carroll 2019-08-07 14:12:33 +08:00
parent 910e15e643
commit f31e535041
2 changed files with 1 additions and 15 deletions

View file

@ -53,17 +53,3 @@ module.exports.authAdminApi = [
shared.middlewares.prettyUrls,
notImplemented
];
/**
* Authentication for client endpoints
*/
module.exports.authenticateClient = function authenticateClient(client) {
return [
auth.authenticate.authenticateClient,
auth.authenticate.authenticateUser,
auth.authorize.requiresAuthorizedClient(client),
shared.middlewares.api.cors,
shared.middlewares.urlRedirects.adminRedirect,
shared.middlewares.prettyUrls
];
};

View file

@ -159,7 +159,7 @@ module.exports = function apiRoutes() {
);
router.del('/db', mw.authAdminApi, http(apiv2.db.deleteAllContent));
router.post('/db/backup',
mw.authenticateClient('Ghost Backup'),
mw.authAdminApi,
http(apiv2.db.backupContent)
);