function SAML_Response_Generator in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7
Show SAML Response
1 string reference to 'SAML_Response_Generator'
File
- ./
miniorange_saml.module, line 256 - Module file for miniOrange SAML Module.
Code
function SAML_Response_Generator() {
$b_url = Utilities::miniorange_get_baseURL();
$sendRelayState = "showSamlResponse";
$ssoUrl = variable_get("miniorange_saml_idp_login_url", "");
$acsUrl = $b_url . "/?q=samlassertion";
$issuer = $b_url;
$nameid_format = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified";
$samlRequest = Utilities::createAuthnRequest($acsUrl, $issuer, $nameid_format, FALSE);
$redirect = $ssoUrl;
if (strpos($ssoUrl, '?') !== false) {
$redirect .= '&';
}
else {
$redirect .= '?';
}
$redirect .= 'SAMLRequest=' . $samlRequest . '&RelayState=' . urlencode($sendRelayState);
drupal_goto($redirect);
exit;
}