[WordPress] 外掛分享: wpCAS Server

首頁外掛目錄 › wpCAS Server
10+
安裝啟用
尚無評分
4996 天前
最後更新
問題解決
WordPress 2.8+ v1.0 上架:2009-03-29

內容簡介

此外掛保留了一組 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,此值可以更改為適合您的實現的任何值。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「wpCAS Server」→ 直接安裝(推薦)

原文外掛簡介

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.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon