[WordPress] 外掛分享: JWT Single Sign On

首頁外掛目錄 › JWT Single Sign On
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
20+
安裝啟用
★★★★
4/5 分(1 則評價)
2505 天前
最後更新
問題解決
WordPress 3.0.1+ PHP 5.2+ v1.2.0 上架:2019-05-03

內容簡介

這個外掛讓你可以透過 JSON Web Token (JWT) 在 WordPress 中登錄使用者。它被用來讓來自其他網站、服務等的使用者安全地使用他們的憑證登錄到 WordPress 網站。
範例使用案例:現有使用者資料庫(例如內部環境中)中的使用者應該能夠登錄到由 WordPress 推動的外部網站中,而無需記住另一個密碼。這種機制也稱為單一登錄(SSO)。
請注意,當使用者透過 SSO 登錄時,使用者資訊和角色映射會每次更新。如果您不想同步從現有系統到 WordPress 的角色,您可以通過設定頁面禁用此功能。

JWT Server

你需要在你的網站/應用程式上實作一個端點,該端點可以存取已登入使用者(通過登入表單或類似 Kerberos 認證等)。該端點需要使用 HS256 演算法創建和簽署 JWT,以及在有效負載(payload)中包含以下描述的資訊。接下來它必須將使用者重新導向回 WordPress 站點 https://example.org/?auth=jwt&code={jwt},其中 {jwt} 是簽署的 JWT 字串表示形式。

{
“iat”: 1516239022,
“iss”: “issuer_name”,
“user_info”: {
“user_login”: “johndoe”,
“user_name”: “John Doe”,
“first_name”: “John”,
“last_name”: “Doe”,
“user_email”: “[email protected]”,
“user_roles”: [“role1”]
}
}

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「JWT Single Sign On」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin allows signing in users via JSON Web Token (JWT) in WordPress. It is used to allow users from another website/service/etc. to securely use their credentials for the WordPress site.
Sample use case: There is an existing user database (e.g. in an intranet environment) and the users should be able to login to an external site that is powered by wordpress, without having to remember another password. This mechanism is also called Single Sign On (SSO).
Please note that the user information and role mappings are updated each time the user logs in via SSO. If you do not want to sync the roles from your existing system to wordpress, you can disable the functionality via the settings page.
JWT Server
You will need to implement an endpoint on your website/app that has access to the logged
in user (via login form or Kerberos-like authentication etc). That endpoint needs to create
and sign a JWT with the HS256 algorithm and the below described information in the payload.
It then has to redirect the user back to the WordPress site https://example.org/?auth=jwt&code={jwt}
where {jwt} is the signed JWT as string representation.
{
“iat”: 1516239022,
“iss”: “issuer_name”,
“user_info”: {
“user_login”: “johndoe”,
“user_name”: “John Doe”,
“first_name”: “John”,
“last_name”: “Doe”,
“user_email”: “[email protected]”,
“user_roles”: [“role1”]
}
}

延伸相關外掛

文章
Filter
Apply Filters
Mastodon