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:
parent
910e15e643
commit
f31e535041
2 changed files with 1 additions and 15 deletions
|
@ -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
|
||||
];
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue