
內容簡介
總結: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」→ 直接安裝(推薦)
原文外掛簡介
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.
