跳到内容

Disable REST API and Require JWT / OAuth Authentication

v1.0

Benjamin Intal · 2017年9月26日 上架

Disables all REST API endpoints and requires JWT or OAuth Authentication.

正在使用
50+
评分
暂无
累计下载
1 万
最近更新
2017年9月26日
需要 WordPress 4.4+已测试到 4.8.35PHP 5.2+

截图

Blocked REST API requests
Blocked REST API requests
Authenticated REST API requests are allowed
Authenticated REST API requests are allowed

When you activate this plugin, all REST API endpoints will be disabled for non-authorized requests.

Best used with any of these plugins:

Blocks ALL REST API endpoints except for:

  • /jwt-auth/v1/token/validate
  • /jwt-auth/v1/token
  • /oauth/authorize
  • /oauth/token
  • /oauth/me

Allows all REST API endpoints if they come with a valid Bearer Token Authentication (authentication via GET URL variables are still blocked)

When used alone in your site, your REST API will essentially be disabled.

Note that this plugin itself doesn’t provide JWT or OAuth authentication, it only whitelists them.

Features

  • No settings page
  • You can whitelist other REST API endpoint via a filter hook (see FAQs below)
  • Blocks all REST API endpoints.. but
  • Allows requests with Bearer Token Authentication.. and
  • Allows JWT Authentication for WP REST API & WP OAuth Server authentication endpoints

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums