[WordPress] 外掛分享: WP Cassify

WordPress 外掛 WP Cassify 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「WP Cassify」是 2016-02-04 上架。
  • 目前有 800 個安裝啟用數。
  • 上一次更新是 2025-03-21,距離現在已有 43 天。
  • 外掛最低要求 WordPress 4.4 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 有 15 人給過評分。
  • 論壇上目前有 2 個提問,問題解答率 100% ,不低,算是個很有心解決問題的開發者團隊了!

外掛協作開發者

aaf017 | vbonamy |

外掛標籤

cas | auth | wpCAS | central | authentication |

內容簡介

如果您對這個外掛程式很滿意:
作為我的努力報酬,我希望能夠收到大學或公司贈送的 T 恤(或其他好禮)。
我的尺寸是 L。最好的祝福。

這個 JASIG CAS 認證外掛程式不依賴於 phpCas 庫。它不僅僅是一個認證外掛程式。
您可以根據 cas 使用者屬性建立自定義的授權規則。如果使用者在 WordPress 資料庫中不存在,它可以自動建立。有很多功能。您可以自定義一切。

網站

Plugin overview

要求

至少需要 PHP 7.0 版本
至少需要 PHP CURL 套件

包括的功能

支援 SLO (單一登出) (感謝 dedotombo 和 me)
添加 NCONTAINS 運算元 (感謝 blandman)
修正閘道模式 (自動登入) 的錯誤 (再次感謝 dedotombo)。現在不需要修改佈景主題檔案來執行。
添加身分認證失敗時登出選項,以免打擾使用者
在稍候的階段(在 wp_loaded 而非 init 上),初始化 PHP 會話

添加一些自訂的掛鉤和過濾器。

已經測試了 CAS Server 版本 4.1.4

與 CAS Protocol 版本 2 和 3 相容
如果 WordPress 資料庫中不存在使用者,自動創建使用者。
將 WordPress 使用者元數據與 CAS 使用者屬性同步。
添加對多值 cas 使用者欄位的支援。現在多值欄位可以序列化以存儲在自訂的 WP 使用者元數據中。
備份/還原外掛程式配置選項設置
您可以選擇要填入的 CAS 使用者屬性。然後您可以通過 PHP 會話訪問它們。

請注意,從 1.8.4 開始,要從佈景主題檔案中訪問 CAS 使用者屬性,請使用下面的代碼:

if ( isset($GLOBALS['wp-cassify']) ) {
print_r( $GLOBALS['wp-cassify']->wp_cassify_get_cas_user_datas() );
}
?>

根據 CAS 使用者屬性設定 WordPress 角色給使用者。

如果啟用了外掛程式的網路,您可以定義使用者角色規則範圍(按網誌 ID)。
授權規則編輯器。
與 WordPress 存取控制外掛程式相容。
管理 URL 白名單以跳過特定頁面的 CAS 認證。

非常簡單,使用 Susan Boland 提供的 post 方法來繞過身分驗證(請參閱在線文件)。創建包含 redirect 屬性的 WordPress 身分驗證表單,如下所示:

$args = array(
'echo' => true,
'remember' => true,
'redirect' => site_url( '/?wp_cassify_bypass=bypass' ),
'form_id' => 'loginform',
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'label_username' => __( 'Username' ),
'label_password' => __( 'Password' ),
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'value_username' => '',
'value_remember' => false
);

wp_login_form( $args );
?>

在觸發後收到電子郵件通知(在使用者帳戶創建後、在使用者登入/登出後)。

根據使用者屬性值定義通知規則

原文外掛簡介

If you’re happy with this plugin :
As a reward for my efforts, I would like to receive T-shirts (or other goodies) as gifts from the universities or companies that use it.
My size is L. Best regards.
This Apereo CAS authentication plugin has no phpCas library dependency. This is not only an authentication plugin.
You can build custom authorization rules according to cas user attributes populated. If user don’t exist in WordPress
database, it can be created automatically. There are many features. You can customize everything.
Website

Plugin overview


Development and release environment
This plugin is now developed and tested from a github repository. You can find it here :
https://github.com/WP-Cassify/wp-cassify-develop
Don’t hesitate to contribute to this project. You can fork it and make pull requests !
Requirements

Require at least PHP version 7.0
Require at least PHP CURL package

Features included

SLO (Single Log Out) support (thanks to dedotombo and me)
Adding NCONTAINS operator (thanks to blandman)
Fix bug on Gateway mode (autologin) (thanks to dedotombo again). Now it’s now necessary to hack theme files to fire it.
Adding option logout on authentication failure to not disturb users
Initialize PHP session at a later stage (on wp_loaded not on init)

Adding some customs hooks and filters.

Tested with CAS Server version 4.1.4

Compatible with CAS Protocol version 2 and 3
Automatic user creation if not exist in WordPress database.
Synchronize WordPress User metas with CAS User attributes.
Add support for multivaluate cas user fields. Now multivaluate fields can be serialized to be stored in custom WP User meta.
Backup / Restore plugin configuration options settings
You can choose CAS User attributes you want to populate. Then you can access them via PHP Session.

Be careful, to access to CAS User Attributes from your theme file (from 1.8.4), use code below :
wp_cassify_get_cas_user_datas() );
}
?>

Set up WordPress Roles to User according to CAS User attributes.

If plugin is network activated, you can define User Role Rule scope by blog id.
Authorization rule editor.
Compatible with WordPress Access Control Plugin.
Manage URL White List to bypass CAS Authentication on certain pages.

Much simpler bypass authentication with post method provided by Susan Boland (See online documentation). Create wordpress authentication form with redirect attribute like this :
true,
'remember' => true,
'redirect' => site_url( '/?wp_cassify_bypass=bypass' ),
'form_id' => 'loginform',
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'label_username' => __( 'Username' ),
'label_password' => __( 'Password' ),
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'value_username' => '',
'value_remember' => false
);

wp_login_form( $args );
?>

Receive email notifications when trigger is fired (after user account creation, after user login/logout).

Define notifications rules based on user attributes values.
Purge user roles before applying user role rules.
Define user account expiration rules bases on CAS User attributes.
Network activation allowed
You can set Service Logout URL (Needs to have CAS Server with followServiceRedirects option configured).
Add support for web application hosted behind a reverse proxy. (Thanks to franck86)
Add custom hooks : wp_cassify_after_cas_authentication, wp_cassify_before_auth_user_wordpress, wp_cassify_before_redirect, wp_cassify_after_redirect. (See online documentation)
Custom filter to perform custom cas server response parsing. Hook name : wp_cassify_custom_parsing_cas_xml_response (See online documentation)
Custom shortcode to generate CAS login/logout link into your blog. (See online documentation)
Debug settings, dump last xml cas server response.
Detect if user has already authenticated by CAS from your public pages and perform auto-login with gateway mode

Add ‘-IN’ and ‘-NOTIN’ operators to process array attributes values returned from CAS.
When you have :
$cas_user_datas['title'] = array( 'Student', 'Professor' );

Then you can use :
(CAS{title} -IN "professor")

各版本下載點

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

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


2.3.0 | 2.3.1 | 2.3.2 | 2.3.3 | 2.3.4 | 2.3.5 | 2.3.6 | 2.3.7 | trunk |

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

  • Authorizer 》Authorizer 外掛可以讓您限制 WordPress 網站只有特定使用者能夠進入,通常是已註冊於某個大學課程的學生。它維護一個經過批准的使用者清單,您可以編輯以確...。
  • CAS Maestro 》如果您有一個CAS服務並想要使用相同的憑證在WordPress上驗證您的使用者,您可以使用此外掛來完成任務。, 嘗試在WordPress中啟動會話的使用者將被重新導向到CA...。
  • wpCAS 》wpCAS 將 WordPress 整合到一個已建立的 CAS 架構中,允許在異質環境中集中管理和驗證用戶憑證。, Wikipedia 上說明:, 中央身分驗證服務(CAS)是用於 Web ...。
  • Cassava CAS Server 》Cassava 是一個 WordPress 外掛,使用中央認證服務(CAS)協議,讓 WordPress 可以作為單一登錄驗證器。因此,在您的 WordPress 安裝中,用戶可以通過提供一...。
  • UTHSC WPCAS 》此外掛使用phpCAS函式庫,將CAS單一登入整合至WordPress。, , 提供使用者在多個WordPress網站上熟悉且安全的登入方式,無需額外購買昂貴的SSL憑證。, phpCAS...。
  • SoJ CAS/LDAP Login 》這個外掛只是開發用途,並不適合在正式網站上使用。, 這個外掛是為了提供參考而開發的。我曾和許多有類似設置的人交流,並想分享一些程式碼。, 該外掛允許使...。

文章
Filter
Apply Filters
Mastodon