phpCAS::setFixedServiceURL PHP Method

setFixedServiceURL() public static method

Set the fixed URL that will be set as the CAS service parameter. When this method is not called, a phpCAS script uses its own URL.
public static setFixedServiceURL ( string $url ) : void
$url string the URL
return void
    public static function setFixedServiceURL($url)
    {
        phpCAS::traceBegin();
        phpCAS::_validateProxyExists();
        try {
            self::$_PHPCAS_CLIENT->setURL($url);
        } catch (Exception $e) {
            phpCAS::error(get_class($e) . ': ' . $e->getMessage());
        }
        phpCAS::traceEnd();
    }

Usage Example

示例#1
0
function toggle_auth_checked_in_redirect()
{
    $url = phpCAS::getServiceURL();
    $without_auth_checked = removeParameterFromUrl('auth_checked', $url);
    if ($url == $without_auth_checked) {
        $url .= (strpos($url, '?') === false ? '?' : '&') . 'auth_checked=true';
    } else {
        $url = $without_auth_checked;
        debug_msg("removing auth_checked from url to have a clean final url: {$url}");
    }
    phpCAS::setFixedServiceURL($url);
}
All Usage Examples Of phpCAS::setFixedServiceURL