[WordPress] 外掛分享: wpCAS Server

前言介紹

  • 這款 WordPress 外掛「wpCAS Server」是 2009-03-29 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2012-07-12,距離現在已有 4678 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 2.8 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

borkweb | misterbisson |

外掛標籤

auth | wpCAS | wpcas-server | authentication | central authentication service |

內容簡介

此外掛保留了一組 URI 集合,可建立、驗證和銷毀 CAS 票券。

/cas/login :: 若使用者未進行身份驗證,將被重定向到登入頁面。否則使用者將被重定向到在 URL 中指定的服務,如果沒有指定服務,使用者將被重定向到 WordPress 實例的首頁。

/cas/logout :: 使用者的 session 將被銷毀、使用者從 WordPress 實例登出,並且被重新導向到 $_GET[‘service’](如果服務未提供則重新導向到部落格首頁)。

/cas/proxyValidate 和 /cas/validate :: 在呼叫 /cas/validate 時,CAS 票券必須被作為 GET 參數傳遞在網址中。系統會驗證票券,並輸出 XML,包含 cas:authenticationSuccess 或 cas:authenticationFailure。

外掛 Hooks & Filters
wpcas_server_login Hook

此 Hook 用於在登入成功後和票券建立之前插入程式碼。此 Hook 的常見用途是使用 site/user 特定的資訊填寫 $_SESSION 變數。

wpcas_server_auth_value Filter

此 Filter(在 /cas/validate 的票券驗證成功時執行)用於覆寫 cas:authenticationSuccess XML 回應中傳回的使用者識別碼。預設情況下,返回的值為驗證的使用者的 $user_ID。使用此 Filter,此值可以更改為適合您的實現的任何值。

原文外掛簡介

This plugin reserves a collection of URIs that create, validate, and destroy CAS tickets.

/cas/login :: If user is not authenticated he/she is redirected to the login page. Otherwise the user is redirected to the service specified as a GET variable in the URL – or if service is not provided, the user is redirected to the WordPress instance’s home.

/cas/logout :: The user’s session is destroyed, user is logged out of the WordPress instance, and redirected to $_GET[‘service’] (or the blog home if service isn’t provided)

/cas/proxyValidate and /cas/validate :: The CAS ticket must be passed as a GET parameter in the URL when calling /cas/validate. The ticket is validated and XML is output with either cas:authenticationSuccess or cas:authenticationFailure

Hooks & Filters
wpcas_server_login Hook
This hook allows for the insertion of code after login has successfully completed and just before the ticket creation. One common use of this hook is to fill out the $_SESSION variable with site/user specific information.
wpcas_server_auth_value Filter
This filter (executed in a successful ticket validation in /cas/validate) is used to override the user identifier returned in the cas:authenticationSuccess XML response. By default, the value returned is the $user_ID of the authenticated user. Using this filter, that value can be altered to whatever suits your implementation.

各版本下載點

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

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


最新版本

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

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon