[WordPress] 外掛分享: Disable REST API and Require JWT / OAuth Authentication

首頁外掛目錄 › Disable REST API and Require JWT / OAuth Authentication
WordPress 外掛 Disable REST API and Require JWT / OAuth Authentication 的封面圖片
60+
安裝啟用
尚無評分
3095 天前
最後更新
問題解決
WordPress 4.4+ PHP 5.2+ v1.0 上架:2017-09-25

內容簡介

啟用此外掛後,所有非授權請求的 REST API 端點將被禁用。

最好與以下任何一個外掛一起使用:

JWT Authentication for WP REST API
WP OAuth Server

除以下幾個端點外,將封鎖所有 REST API 端點:

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

如果使用有效的 Bearer Token 身分驗證(仍會封鎖通過 GET URL 變數進行身分驗證的請求),允許所有 REST API 端點。

在您的網站中獨立使用此外掛時,您的 REST API 基本上將被禁用。

請注意,此外掛本身不提供 JWT 或 OAuth 身分驗證,它只白名單它們。

功能

無設置頁面
您可以通過過濾鉤子白名單其他 REST API 端點(請參見下面的常見問題解答)
封鎖所有 REST API 端點... 但是
允許帶有 Bearer Token 身分驗證的請求... 還有
允許 JWT Authentication for WP REST API 和 WP OAuth Server 的身分驗證端點

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Disable REST API and Require JWT / OAuth Authentication」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

When you activate this plugin, all REST API endpoints will be disabled for non-authorized requests.
Best used with any of these plugins:

JWT Authentication for WP REST API
WP OAuth Server

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

延伸相關外掛

文章
Filter
Apply Filters
Mastodon