Ghost/core/server/services/auth
Fabien O'Carroll 3db102a776
Added API Key auth middleware to v2 content API (#10005)
* Added API Key auth middleware to v2 content API

refs #9865

- add `auth.authenticate.authenticateContentApiKey` middleware
  - accepts `?key=` query param, sets `req.api_key` if it's a known Content API key
- add `requiresAuthorizedUserOrApiKey` authorization middleware
  - passes if either `req.user` or `req.api_key` exists
- update `authenticatePublic` middleware stack for v2 content routes

* Fixed functional content api tests

no-issue

This fixes the functional content api tests so they use the content api
auth.

* Fixed context check and removed skip

* Updated cors middleware for content api

* Removed client_id from frame.context

no-issue

The v2 api doesn't have a notion of clients as we do not use oauth for it

* Fixed tests for posts input serializer
2018-10-15 16:23:34 +07:00
..
api-key Added API Key auth middleware to v2 content API (#10005) 2018-10-15 16:23:34 +07:00
session 🐛 Fixed session auth for blogs running on sub dir (#9986) 2018-10-11 14:11:24 +07:00
auth-strategies.js Sorted out the mixed usages of include and withRelated (#9425) 2018-02-15 10:53:53 +01:00
authenticate.js Added API Key auth middleware to v2 content API (#10005) 2018-10-15 16:23:34 +07:00
authorize.js Added API Key auth middleware to v2 content API (#10005) 2018-10-15 16:23:34 +07:00
index.js Session auth service (#9910) 2018-10-02 15:35:23 +07:00
oauth.js Refactored how we require shared middlewares from web/ (#9893) 2018-09-21 16:17:11 +05:30
passport.js Moved labs, auth, permissions, settings, mail, themes to services (#9339) 2017-12-14 03:01:23 +01:00
utils.js Replace knex.transaction by models.Base.transaction 2018-05-03 11:44:32 +02:00