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.
https://wpcassify.wordpress.com/
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 !
Adding some customs hooks and filters.
Tested with CAS Server version 4.1.4
Be careful, to access to CAS User Attributes from your theme file (from 1.8.4), use code below :
<?php
if ( isset($GLOBALS['wp-cassify']) ) {
print_r( $GLOBALS['wp-cassify']->wp_cassify_get_cas_user_datas() );
}
?>
Set up WordPress Roles to User according to CAS User attributes.
Much simpler bypass authentication with post method provided by Susan Boland (See online documentation). Create wordpress authentication form with redirect attribute like this :
<?php
$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 );
?>
Receive email notifications when trigger is fired (after user account creation, after user login/logout).
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")