/** * Creates or returns an instance of this class. * @since 0.2.1 * @return AADSSO_Profile A single instance of this class. */ public static function get_instance($aadsso) { if (null === self::$single_instance) { self::$single_instance = new self($aadsso); } return self::$single_instance; }
protected function __construct() { AADSSO_Profile::get_instance($this); $this->settings = AADSSO_Settings::load_settings(); // Set the redirect urls self::$redirect_uri = wp_login_url(); self::$logout_redirect_uri = wp_login_url(); // If plugin is not configured, we shouldn't proceed. if (!$this->plugin_is_configured()) { return; } // The authenticate filter add_filter('authenticate', array($this, 'authenticate'), 1, 3); // Some debugging locations // Add the <style> element to the login page add_action('login_enqueue_scripts', array($this, 'printLoginCss')); // Add the link to the organization's sign-in page add_action('login_form', array($this, 'printLoginLink')); add_action('login_init', array($this, 'maybeBypassLogin')); }