marshallu / mu-auth
MU Auth is a WordPress plugin that provides a simple way to authenticate users against the Marshall University SSO.
Requires
- php: >=8.3
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.7.1
- php-stubs/acf-pro-stubs: ^6.2
- php-stubs/wordpress-stubs: ^6.9
- php-stubs/wp-cli-stubs: ^2.12
- phpstan/phpstan: ^2.1
- squizlabs/php_codesniffer: @stable
- szepeviktor/phpstan-wordpress: ^2.0
- wp-coding-standards/wpcs: ^3.1
README
A WordPress plugin that provides Single Sign-On (SSO) authentication for Marshall University via CAS (Central Authentication Service).
Requirements
- WordPress
- ACF Pro
- Gravity Forms (optional, required for the Gravity Forms Viewer role)
Installation
Install via Composer:
composer require marshallu/mu-auth
Or place the plugin in your wp-content/plugins/ directory and activate it.
Configuration
The plugin must be enabled via environment variable:
MU_AUTH_ENABLE=true
On Pantheon, the plugin activates automatically when PANTHEON_ENVIRONMENT is set.
Once active, configure access via the Settings > MU Auth Settings page in the WordPress admin. This requires ACF Pro.
Auth Users
Add MU Net IDs and assign each a permissions level:
| Permissions Level | WordPress Role |
|---|---|
| Administrator | administrator |
| Editor | editor |
| Forms | gravity_forms_viewer |
| Profiles | profiles_manager |
Site Visibility
- Public - Site accessible to all visitors
- Admins - Only users listed in Auth Users
- Extras - Admins plus additional view-only users
Super Users
To grant certain MU Net IDs unconditional access across all sites without storing them in version control, add a filter in a mu-plugin (e.g. wp-content/mu-plugins/super-users.php):
add_filter( 'mu_auth_super_users', function( $users ) { return array( 'netid1', 'netid2' ); } );
Custom Roles
Gravity Forms Viewer
Can view, export, and annotate Gravity Forms entries. Restricted to Gravity Forms pages only in the admin.
Profiles Manager
Can create and edit Employee posts and Department taxonomy terms. Restricted to those post types in the admin.
Development
composer lint # Check coding standards composer format # Auto-fix formatting composer analyse # Run PHPStan static analysis