當前位置: 首頁>>代碼示例>>PHP>>正文


PHP phpCAS::serviceWeb方法代碼示例

本文整理匯總了PHP中phpCAS::serviceWeb方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpCAS::serviceWeb方法的具體用法?PHP phpCAS::serviceWeb怎麽用?PHP phpCAS::serviceWeb使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在phpCAS的用法示例。


在下文中一共展示了phpCAS::serviceWeb方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getConnexionBar

 function getConnexionBar()
 {
     if (CASUser::checkAuth()) {
         $service = SITE_CAS_CONNEXIONBAR_URL;
         phpCAS::serviceWeb($service, $err_code, $output);
         $xml = simplexml_load_string($output);
         $result = $xml->xpath('/reportoutput/reportdata');
         return html_entity_decode($result[0]->asXML());
     } else {
         return "";
     }
 }
開發者ID:andrewroth,項目名稱:ccc_connexion_bar_php,代碼行數:12,代碼來源:CASUser.php

示例2: getConnexionBar

 function getConnexionBar()
 {
     if (CASUser::checkAuth()) {
         $service = SITE_CAS_CONNEXIONBAR_URL;
         phpCAS::serviceWeb($service, $err_code, $output);
         $xml = simplexml_load_string($output);
         $result = $xml->xpath('/reportoutput/reportdata');
         return str_replace("https://signin.mygcx.org/cas/logout", "https://intranet.campusforchrist.org/index.php?p_Mod=Logout", html_entity_decode($result[0]->asXML()));
     } else {
         return "";
     }
 }
開發者ID:andrewroth,項目名稱:c4c_intranet,代碼行數:12,代碼來源:CASUser.php

示例3: example

    <title>phpCAS proxied proxy example (with sessioning)</title>
    <link rel="stylesheet" type='text/css' href='example.css'/>
  </head>
  <body>
    <h1>phpCAS proxied proxy example (with sessioning)</h1>
    <?php 
include 'script_info.php';
?>
    <p>the user's login is <b><?php 
echo phpCAS::getUser();
?>
</b>.</p>
    <h2>Response from service <?php 
echo $serviceUrl;
?>
</h2>
<?php 
flush();
// call a service and change the color depending on the result
if (phpCAS::serviceWeb($serviceUrl, $err_code, $output)) {
    echo '<div class="success">';
} else {
    echo '<div class="error">';
}
echo $output;
echo '</div>';
?>
  </body>
</html>

開發者ID:adamfranco,項目名稱:phpcas-old-svn-tracking,代碼行數:29,代碼來源:example_proxy_serviceWeb.php

示例4: array

        $_SESSION['phpCAS']['service_cookies'] = array();
    }
    $sm = $_SESSION['ovd-client']['sessionmanager'];
    foreach ($sm->get_cookies() as $k => $v) {
        $cookie = array('domain' => parse_url($sm->get_base_url(), PHP_URL_HOST), 'path' => '/', 'secure' => false, 'name' => $k, 'value' => $v);
        $_SESSION['phpCAS']['service_cookies'][] = $cookie;
    }
}
$port = parse_url($CAS_server_url, PHP_URL_PORT);
if (is_null($port)) {
    if (parse_url($CAS_server_url, PHP_URL_SCHEME) == 'https') {
        $port = 443;
    } else {
        $port = 80;
    }
}
$path = !parse_url($CAS_server_url, PHP_URL_PATH) ? '' : parse_url($CAS_server_url, PHP_URL_PATH);
phpCAS::proxy(CAS_VERSION_2_0, parse_url($CAS_server_url, PHP_URL_HOST), $port, $path, false);
phpCAS::setNoCasServerValidation();
phpCAS::setPGTStorageFile(CAS_PGT_STORAGE_FILE_FORMAT_PLAIN, session_save_path());
phpCAS::setFixedCallbackURL($CAS_callback_url);
//HTTPS required, and Apache's CRT must be added in Tomcat's keystore (CAS server)
phpCAS::forceAuthentication();
if (!phpCAS::serviceWeb($_SESSION['ovd-client']['sessionmanager_url'] . '/start', $errno, $output)) {
    $_SESSION['ovd-client']['from_SM_start_XML'] = 'ERROR';
    finish();
    die;
}
$_SESSION['ovd-client']['from_SM_start_XML'] = $output;
finish();
die;
開發者ID:bloveing,項目名稱:openulteo,代碼行數:31,代碼來源:login.php


注:本文中的phpCAS::serviceWeb方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。