Beispiel #1
0
/**
 * Sets the standard SAML domain cookie that is also used to preselect
 * the right entry on the local wayf
 *
 * @param IdP identifiere
 */
function set_saml_cookie($selectedIDP)
{
    if (isset($_COOKIE['_saml_idp'])) {
        $IDPArray = generate_cookie_array($_COOKIE['_saml_idp']);
    } else {
        $IDPArray = array();
    }
    $IDPArray = appendCookieValue($selectedIDP, $IDPArray);
    setcookie('_saml_idp', generate_cookie_value($IDPArray), time() + 100 * 24 * 3600);
}
function set_login_cookie($salt, $ip)
{
    $cookie = generate_cookie_value($salt, $ip);
    setcookie(COOKIE_NAME, $cookie, 0, '/XXXXX/', 'XXXXX.com', true, true);
    //Replace with domain name and directory path
}