You are here

class MiniOrangeAuthnRequest in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

The MiniOrangeAuthnRequest class.

Hierarchy

Expanded class hierarchy of MiniOrangeAuthnRequest

File

includes/AuthnRequest.php, line 18
The AuthnRequest.php file for the miniorange_samlauth module.

View source
class MiniOrangeAuthnRequest {

  /**
   * The function initiateLogin.
   */
  public function initiateLogin($acs_url, $sso_url, $issuer) {
    $nameid_format = variable_get('miniorange_nameid_format', "");
    $relay_state = $_SERVER['HTTP_REFERER'];
    $saml_request = Utilities::createAuthnRequest($acs_url, $issuer, $sso_url, $nameid_format);
    if (strpos($sso_url, '?') > 0) {
      $redirect = $sso_url . '&SAMLRequest=' . $saml_request . '&RelayState=' . urlencode($relay_state);
    }
    else {
      $redirect = $sso_url . '?SAMLRequest=' . $saml_request . '&RelayState=' . urlencode($relay_state);
    }
    header('Location: ' . $redirect);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MiniOrangeAuthnRequest::initiateLogin public function The function initiateLogin.