Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

asu-ke-web-services/gios-cas-maestro

Repository files navigation

GIOS CAS Maestro plugin

NOTE: This package is deprecated. It has been replaced by the ASU CAS Maestro WordPress Plugin.


This is a customized and updated version of the CAS Maestro plugin. It has been updated with:

  • default settings configured to connect to the ASU CAS authentication service,
  • support for pre-populating new user accounts with information retrieved from the ASU iSearch directory, and
  • new Wordpress hooks to inject custom logic into the user registration and logout processes.

Installation Instructions

  • Clone this repo into your WordPress plugins directory (/wp-content/plugins/). [NOTE: When you download or clone the master branch directly from our repo, you must run composer install in the plugin folder in order to download and install the ASU Public Directory Service library that this plugin requires to function correctly.) Running composer update may be necessary to update the plugin for the version of PHP running on your webserver.
  • Activate the plugin in the Wordpress 'Plugins' menu.
  • Configure the plugin for specific settings on your site.

Note that the plugin is already configured to work with the ASU CAS service. However, you will want to adjust other settings, such as whether new users are automatically registered using the Subscriber role, whether to use the ASU Directory service to pre-populate the user profile fields, and so on.

Troubleshooting

If for some reason you are unable to access the administrator panel, you can disable the CAS Maestro behavior in one of two ways:

  1. The following URL bypasses the plugin in favor of the regular WordPress login screen. /wp-login.php?wp
  2. Adding the code line define('WPCAS_BYPASS',true); to wp-config.php file will also bypass the plugin.

Once signed in, you can access the plugin's settings at wp-admin/options-general.php?page=wpcas_settings to make further adjustments.

If you happen to leave empty fields in CAS Maestro configuration, the plugin will ask you to fill fields before final activation. Therefore you can continue to use the normal WordPress login screen until all settings have been completed, even if the plugin is active.

Action and Filter hooks used and provided by the GIOS CAS Maestro plugin

GIOS CAS Maestro overrides the following WordPress filters:

  • authenticate
  • login_url
  • show_password_fields
  • site_url

It also overrides the following WordPress actions:

  • admin_init
  • admin_notices
  • admin_menu
  • lost_password
  • password_reset
  • profile_update
  • retrieve_password
  • wp_logout

Additionally, CAS Maestro now offers the following action hooks for extra processing during login and logout:

  • casmaestro_before_register_user()
  • casmaestro_multisite_before_register_user()
  • casmaestro_after_register_user( int|WP_User )
  • casmaestro_multisite_after_register_user( int|WP_User )
  • casmaestro_before_logout_redirect()

The "_register_user" actions allow for extra actions to be inserted before and after a new user account is created in Wordpress. "_after_register_user" requires the user id or WP_User object to be passed in the arguments.

Separate hooks are registered for multisite configurations, since new user registration can be a different process when they already have an account and only need to be added as a member of this specific blog).


Additional Documentation

This project is a public fork of the CAS Maestro plugin written by Direção de Serviços de Informática (DSI) at the Instituto Superior Técnico, Portugal. More information about the original plugin can be found here:

The original plugin and this current fork include the phpCAS library from Jasig. More details about that library:

About

DEPRECATED - Custom version of the CAS Maestro WordPress plugin

Resources

License

Stars

Watchers

Forks

Languages