humanmade/mercator-sso

Single Sign On component for Mercator.

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 10

Watchers: 28

Forks: 2

Open Issues: 0

Type:wordpress-muplugin

dev-master 2018-12-04 17:16 UTC

This package is auto-updated.

Last update: 2024-11-05 09:22:54 UTC


README

Single Sign-On component for Mercator.

Allows you to share cookies between all sites on the same subdomain.

Requirements

Mercator requires WordPress 3.9 or newer for the new sunrise processes. Mercator also requires PHP 5.3+ due to the use of namespaced code.

Installation

Include the file sso.php from your sunrise.php in the same way you include Mercator itself.

For example:

<?php
// Default mu-plugins directory if you haven't set it
defined( 'WPMU_PLUGIN_DIR' ) or define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' );

require WPMU_PLUGIN_DIR . '/mercator-sso/sso.php';
require WPMU_PLUGIN_DIR . '/mercator-sso/sso-multinetwork.php';
require WPMU_PLUGIN_DIR . '/mercator/mercator.php';

Optionally you can use sso-multinetwork.php as well if you're running a multinetwork site.

Filters

You can modify SSO behaviour for example in a local environment with the following filters in sunrise.php:

mercator.sso.enabled

// Disable SSO
add_filter( 'mercator.sso.enabled', '__return_false' );

mercator.sso.multinetwork.enabled

// Disable Multinetwork SSO
add_filter( 'mercator.sso.multinetwork.enabled', '__return_false' );

License

Mercator is licensed under the GPLv3 or later.

Credits

Created by Human Made for high volume and large-scale sites, such as Happytables. We run Mercator SSO on sites with millions of monthly page views, and thousands of sites.

Written and maintained by Ryan McCue. Thanks to all our contributors.

Mercator builds on concepts from WPMU Domain Mapping, written by Donncha O'Caoimh, Ron Rennick, and contributors.

Mercator relies on WordPress core, building on core functionality added in WP27003. Thanks to all involved in the overhaul, including Andrew Nacin and Jeremy Felt.

Interested in joining in on the fun? Join us, and become human!