Support » Plugin: SAML 2.0 Single Sign-On » Excellent – Works with Multisite and Standalone

  • SAML is hard. Most of the people here saying it doesn’t work probably don’t know how to do SAML properly.

    I tested this plugin on 4.7 in multisite and standalone mode and it works great! There are some neat debugging strategies that simpleSAMLphp provides. Look into enabling the simpleSAMLphp admin dashboard for assistance with troubleshooting.

Viewing 1 replies (of 1 total)
  • Thanks for the response. SAML authentication is working ok, I can succesfully login and it is pulling attributes from ADFS. I have the admin dashboard setup in simplesaml already. I found where in the code it is failing, but am unable to troubleshoot this-

    private function new_user($attrs)
    {
    if( array_key_exists($this->settings->get_attribute(‘username’),$attrs) )
    {
    $login = (array_key_exists($this->settings->get_attribute(‘username’),$attrs)) ? $attrs[$this->settings->get_attribute(‘username’)][0] : ‘NULL’;
    $email = (array_key_exists($this->settings->get_attribute(’email’),$attrs)) ? $attrs[$this->settings->get_attribute(’email’)][0] : ”;
    $first_name = (array_key_exists($this->settings->get_attribute(‘firstname’),$attrs)) ? $attrs[$this->settings->get_attribute(‘firstname’)][0] : ”;
    $last_name = (array_key_exists($this->settings->get_attribute(‘lastname’),$attrs)) ? $attrs[$this->settings->get_attribute(‘lastname’)][0] : ”;
    $display_name = $first_name . ‘ ‘ . $last_name;
    }
    else
    {
    die(‘A username was not provided.’);
    }

    $role = $this->update_role();

    if( $role !== false )
    {
    $user_opts = array(
    ‘user_login’ => $login ,
    ‘user_pass’ => $this->random_password(),
    ‘user_email’ => $email ,
    ‘first_name’ => $first_name ,
    ‘last_name’ => $last_name ,
    ‘display_name’ => $display_name ,
    ‘role’ => $role
    );
    wp_insert_user($user_opts);
    $this->simulate_signon($login);
    }
    else
    {
    die(‘The website administrator has not given you permission to log in.’);
    }
    }

    Thanks in advance for any help!!

Viewing 1 replies (of 1 total)
  • The topic ‘Excellent – Works with Multisite and Standalone’ is closed to new replies.