Automattic / Automattic/jetpack
Jetpack REST API: Site based authentication migration
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
This is a master issue in order to keep track of our efforts to migrate REST API and XMLRPC endpoints to use blog token.
## Make REST API endpoints accept blog tokens on the plugin side:
- [x] [Base PR](https://github.com/Automattic/jetpack/pull/17331) that will allow us to accept a blog token in endpoints with `$needed_capabilities` defined. Those capabilities will be only checked if a user token is used.
### Technical Debt:
https://github.com/Automattic/jetpack/pull/17460
- [ ] Sync: Revert `$needed_capabilities` to `manage_options` and add `allow_jetpack_site_auth` in endpoint definition
- [ ] Options: Revert `$needed_capabilities` to `manage_options` and add `allow_jetpack_site_auth` in endpoint definition (`WPCOM_JSON_API_Get_Option_Endpoint`)
## Make XMLRPC methods accept blog tokens on the plugin side:
https://github.com/Automattic/jetpack/pull/17291
- [x] jetpack.idcUrlValidation
- [x] jetpack.unlinkUser
- [x] jetpack.testConnection
- [x] jetpack.featuresAvailable
- [x] jetpack.featuresEnabled
- [x] jetpack.syncObject
- [x] jetpack.getHeartbeatData
- [x] jetpack.getBlog (stats)
- [x] jetpack.updatePublicizeConnections
### Evaluate whether we want to migrate
- [x] createMediaItem (VideoPress)
- [x] updateVideoPressMediaItem
- [x] updateVideoPressPosterImage
- [x] jetpack.testAPIUserCode (Should not be migrated)
- [ ] disconnectBlog
Contributor guide
Assessment
This issue has not been assessed yet.