內容簡介
CoSign SSO 是一個 WordPress 的外掛,提供多種選項以替代 WordPress 的驗證方式,也可進一步擴充支援更多 SSO 登入方式。CoSign v2 和 CoSign v3 是前兩個 Single Sign-on(SSO) 的附加元件,也因此得名。其他登入方式是提供 LDAP 驗證的副產品。
啟用此外掛,並將登入方式設為 SSO 後,使用外部 CoSign 單一登入服務登入。使用者點擊登入後,瀏覽器會重新導向至遠端登入網址,在成功登入後將會重新導向回本地。如果將登入方式設為 LDAP,則仍然會使用熟悉的登入畫面,而驗證後端則轉為 LDAP。
無論是使用 SSO 或 LDAP 登入方式,都必須提供 LDAP 選項以取得使用者帳戶資訊。如果登入的使用者帳戶不存在,默認會立即建立新帳號。
設定
CoSign SSO 的設定非常簡單。但在將登入方式更改為 "SSO" 或 "LDAP"之前,必須仔細檢查 cosign 和 ldap 的選項。錯誤的設定將禁止所有使用者的登入,包括你自己!
如果你無法再登入,請不要怪罪我。這個技巧可能會幫助你:
$ touch <PLUGIN_DIR>/cosign-sso/FALLBACK
如果備用文件包含 "ldap"、"cosign2" 或 "cosign3",它將回退到正確的登入方式。
修改設定後,不要忘記刪除 FALLBACK 文件。
CoSign 3.x 的注意事項:
CoSign 3.x 濾器需要將 "/cosign/valid" 路徑添加為 cosign 處理程序。
如果 WordPress 使用 permlink,也就是 .htaccess 中的 RewriteRule 可能與 "/cosign/valid" 處理程序衝突。
你可以修改 wp-includes/rewrite.php,在 "RewriteBase" 指示後立即添加 "RewriteRule ^cosign/valid -[L]"。
本地化
本節介紹如何本地化,也就是讓 cosign-sso 說出你的語言。
POT 文件:cosign-sso/languages/cosign_sso.pot
將 pot 文件複製到你的語言位置,例如 cosign-sso/languages/cosign_sso-zh_CN.pot。
使用你喜歡的編輯器進行翻譯。推薦使用 Lokalize 和 Kbabel。
使用以下命令將 po 轉換為 mo:
$ cd plugins/cosign-sso/languages
$ msgfmt cosign_sso-zh_CN.po -o cosign_sso-zh_CN.mo
已知問題
目前沒有已知的問題。
如果您發現任何錯誤或想要請求未來版本的其他功能,請在我們的興趣項目主頁中的 WordPress 項目上記錄它們。
外掛標籤
開發者團隊
原文外掛簡介
CoSign SSO is a WordPress plugin that provides several alternative authentication methods to WordPress, and it maybe easily extend to support more SSO login methods. CoSign v2 and CoSign v3 are the first two Single Sign-on(SSO) addins, that whay this plugin named. The other login method is just a by-product which provides LDAP authentication.
When this plugin is enabled, and the login method is set to SSO, then using a external CoSign single sign-on login service. When user click login, browser will redirect to remote login url, and will redirect back after successful logged in. If set login method to LDAP, login with the familiar login screen, but authentication backend changed to LDAP.
Whether using SSO or LDAP login method, LDAP options must provided to fetch user account information. If the logged in user account does not exists, create it on the fly by default.
Settings
The settings for CoSign SSO are extremely simple. But before you change the login method to ‘SSO’ or ‘LDAP’, you mast check options for cosign and ldap carefully. Wrong configrations will ban all users including yourself!
If you cannot login any more, don’t blame me. A trick may help you:
$ touch
If the fallback file contains “ldap”, “cosign2”, or “cosign3”, it will fallback to the right login method.
After you correct the settings, not forgot to remove the FALLBACK file.
Notes for CoSign 3.x:
CoSign 3.x filter needs to add a “/cosign/valid” location as cosign handler.
If wordpress uses a permlink, which means the RewriteRule in .htaccess may conflict with the “/cosign/valid” handler.
You can hack wp-includes/rewrite.php, add “RewriteRule ^cosign/valid – [L]” right after “RewriteBase” directive.
Localization
This section describes how to localized, which means let cosign-sso speak in your language.
POT file : cosign-sso/languages/cosign_sso.pot
Copy pot file to your locale, such as cosign-sso/languages/cosign_sso-zh_CN.pot for Chinese.
Translate it using your favorate editor. lokalize and kbabel are recommended.
Convert po to mo using command:
$ cd plugins/cosign-sso/languages
$ msgfmt cosign_sso-zh_CN.po -o cosign_sso-zh_CN.mo
Known Issues
No known issues at this time.
If you find any bugs or want to request some additional features for future releases, please log them on the wordpress project of homepage for our interest projects
