1
0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-03 08:25:06 +03:00
Ghost/core/server/web/api/v2
Fabien O'Carroll 3db102a776
Added API Key auth middleware to v2 content API ()
* Added API Key auth middleware to v2 content API

refs 

- 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
..
admin Added users ctrl to v2 () 2018-10-12 23:27:30 +02:00
content Added API Key auth middleware to v2 content API () 2018-10-15 16:23:34 +07:00