[WordPress] 外掛分享: WP REST API Key Authentication

WordPress 外掛 WP REST API Key Authentication 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「WP REST API Key Authentication」是 2025-01-15 上架。
  • 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
  • 上一次更新是 2025-01-16,距離現在已有 107 天。
  • 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.2 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

ikamal |

外掛標籤

API key | rest-api | security | access-control | api authentication |

內容簡介

總結:WP REST API Key Authentication 是一個外掛程式,為 WordPress REST API 新增了一個基於 API 金鑰的簡單驗證方式,適合開發者安全互動而無需複雜的 OAuth 驗證機制。

問題與答案:
1. 這個外掛程式的特色有哪些?
- 提供多個自訂名稱的 API 金鑰。
- 安全存儲 API 金鑰,並以雜湊方式儲存在 WordPress 資料庫中。
- 只顯示 API 金鑰一次,達到安全性。
- 透過在授權標頭中加入 API 金鑰,進行 REST API 存取控制。
- 提供使用者友好的管理介面,可以管理 API 金鑰。
- 可以輕鬆複製生成的 API 金鑰。

2. 如何使用這個外掛程式生成一個 API 金鑰?
- 前往 WordPress 管理選單中的 API 金鑰。
- 輸入一個名稱並點擊「產生 API 金鑰」。
- API 金鑰將會顯示在彈出視窗中,立即複製下來,因為不會再顯示。

3. 如何在 REST API 要求中使用 API 金鑰?
- 在您的 REST API 要求的授權標頭中包含 API 金鑰:
Authorization: Bearer YOUR_API_KEY

4. 如何刪除 API 金鑰?
- 要撤銷存取權,從 API 金鑰管理頁面中刪除一個 API 金鑰。

5. 這個外掛程式的授權是什麼?
- 這個外掛程式根據 GPLv2 或更新版本進行授權,詳細內容請參閱授權 URI。

原文外掛簡介

WP REST API Key Authentication adds a simple API key-based authentication method to the WordPress REST API. This plugin is perfect for developers who want to interact with the REST API securely without relying on complex OAuth authentication mechanisms.
Key Features:

Multiple API Keys: Create and manage multiple API keys with custom names.
Secure API Key Storage: API keys are hashed and securely stored in the WordPress database.
Single Display for Security: API keys are shown only once after creation.
REST API Access Control: Authenticate requests by including an API key in the Authorization header.
Admin Interface: Manage API keys with a user-friendly admin page.
Copy to Clipboard Popup: Easily copy generated API keys with a built-in popup.

The plugin is lightweight and integrates seamlessly with WordPress.
Usage

Generate an API Key:

Go to API Keys in the WordPress admin menu.
Enter a name for the API key and click “Generate API Key”.
The API key will appear in a popup. Copy it immediately, as it will not be displayed again.

Use the API Key:

Include the API key in the Authorization header of your REST API requests:
Authorization: Bearer YOUR_API_KEY

Delete API Keys:

To revoke access, delete an API key from the API Keys admin page.

License
This plugin is licensed under the GPLv2 or later. See the License URI for details.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP REST API Key Authentication」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | trunk |

延伸相關外掛(你可能也想知道)

  • REST API Authentication and Security 》總結:WordPress Rest APIs可用於各種整合,但預設未經安全保護,可能導致安全問題和數據洩漏。加入身份驗證層是確保 API 受到保護免受未經授權訪問的簡單方...。

文章
Filter
Apply Filters
Mastodon