You are here

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

The MiniOrangeAuthnRequest class.

Hierarchy

Expanded class hierarchy of MiniOrangeAuthnRequest

1 file declares its use of MiniOrangeAuthnRequest
miniorange_samlController.php in src/Controller/miniorange_samlController.php
Contains \Drupal\miniorange_saml\Controller\DefaultController.

File

src/MiniOrangeAuthnRequest.php, line 7

Namespace

Drupal\miniorange_saml
View source
class MiniOrangeAuthnRequest {

  /* The function initiateLogin.*/
  public function initiateLogin($acs_url, $sso_url, $issuer, $nameid_format, $relay_state) {
    if ($relay_state == "displaySAMLRequest") {
      $saml_request = Utilities::createAuthnRequest($acs_url, $issuer, $nameid_format, FALSE, TRUE);
      Utilities::Print_SAML_Request($saml_request, $relay_state);
    }
    else {
      $saml_request = Utilities::createAuthnRequest($acs_url, $issuer, $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);
    }
    return $redirect;
  }

}

Members