phpCAS::setServerServiceValidateURL PHP Method

setServerServiceValidateURL() public static method

Used only in CAS 1.0 validations
public static setServerServiceValidateURL ( string $url = '' ) : void
$url string the serviceValidate URL
return void
    public static function setServerServiceValidateURL($url = '')
    {
        phpCAS::traceBegin();
        phpCAS::_validateClientExists();
        try {
            self::$_PHPCAS_CLIENT->setServerServiceValidateURL($url);
        } catch (Exception $e) {
            phpCAS::error(get_class($e) . ': ' . $e->getMessage());
        }
        phpCAS::traceEnd();
    }

Usage Example

示例#1
0
文件: main.php 项目: Galinijay/PAS
    session_destroy();
}
/**
    Etablis le status de visiteur si non connecté
     **/
if (!isset($_SESSION['rang'])) {
    $_SESSION['rang'] = 0;
}
/**
		Récupération des informations sur la page actuelle
	**/
if ($currentPageData = getCurrentPageData()) {
    if ($currentPageData['fullRight'][$_SESSION['rang']] == 0) {
        // On invite l'utilisateur à se connecter au CAS
        phpCAS::client(CAS_VERSION_2_0, CAS_SERVER_URI, (int) constant('CAS_SERVER_PORT'), '');
        phpCAS::setServerServiceValidateURL(CAS_SERVER_VALIDATEURI);
        if (is_file(CAS_SERVER_CERTIFICATPATH)) {
            phpCAS::setCasServerCACert(CAS_SERVER_CERTIFICATPATH);
        } else {
            phpCAS::setNoCasServerValidation();
        }
        phpCAS::forceAuthentication();
        if (phpCAS::getUser()) {
            //Si l'utilisateur s'est connecté
            // Récupération des données serveur
            $test = phpCAS::checkAuthentication();
            // Récupération des données utilisateur
            $sql = 'SELECT * FROM user WHERE nbEtudiant = :nbEtu LIMIT 1';
            $res = $db->prepare($sql);
            $res->execute(array('nbEtu' => phpCAS::getUser()));
            if ($res_f = $res->fetch()) {
All Usage Examples Of phpCAS::setServerServiceValidateURL