Wired up Members auth to the Content API auth (#10129)

closes #10113
This commit is contained in:
Fabien O'Carroll 2018-11-08 16:57:42 +07:00 committed by GitHub
parent 8739749fd0
commit f660b6a77b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ const models = require('../../models');
const common = require('../../lib/common');
const session = require('./session');
const apiKeyAuth = require('./api-key');
const members = require('./members');
const authenticate = {
// ### Authenticate Client Middleware
@ -103,7 +104,7 @@ const authenticate = {
// ### v2 API auth middleware
authenticateAdminAPI: [session.safeGetSession, session.getUser],
authenticateContentApi: apiKeyAuth.content.authenticateContentApiKey
authenticateContentApi: [apiKeyAuth.content.authenticateContentApiKey, members.authenticateMembersToken]
};
module.exports = authenticate;