Thanks for fast your answer!

Unfortunately, I get the same output with that code as going directly to 
/cas/clearPass in browser:

Response from service https://server/cas/clearPass

No authentication information provided.

Log file:

FE3C .START ****************** [CAS.php:471]
FE3C .=> phpCAS::proxy('2.0', 'cas-server', 443, 'cas') 
[example_proxy2.php:14]
FE3C .|    => CASClient::CASClient('2.0', true, 'cas-server', 443, 
'cas', true) [CAS.php:423]
FE3C .|    |    Starting session handling [client.php:561]
FE3C .|    |    Ticket found [client.php:571]
FE3C .|    |    Starting possible old session to copy variables 
[client.php:579]
FE3C .|    |    Session ID: ST604311qOvkShLefThK7yffqbRfculpt
FE3C .|    |    Restoring old session vars [client.php:590]
FE3C .|    |    ST or PT 'ST-60431-1qOvkShLefThK7yffqbR-fc.ul.pt' found 
[client.php:671]
FE3C .| <= ''
FE3C .<= ''
FE3C .=> phpCAS::setNoCasServerValidation() [example_proxy2.php:17]
FE3C .<= ''
FE3C .=> phpCAS::forceAuthentication() [example_proxy2.php:20]
FE3C .|    => CASClient::forceAuthentication() [CAS.php:969]
FE3C .|    |    => CASClient::isAuthenticated() [client.php:812]
FE3C .|    |    |    => CASClient::wasPreviouslyAuthenticated() 
[client.php:917]
FE3C .|    |    |    |    user = `[email protected]', PGT = 
`TGT-50427-eR5SrXBVf6ipIpPeTIAI40QFUVh2Lm0z5K6CUENnfE0Cz1n5Yg-fc.ul.pt' 
[client.php:1011]
FE3C .|    |    | <= true
FE3C .|    |    |    user was already authenticated, no need to look for 
tickets [client.php:920]
FE3C .|    | <= true
FE3C .|    |    no need to authenticate [client.php:814]
FE3C .| <= true
FE3C .|    no need to authenticate (user `[email protected]' is 
already authenticated) [CAS.php:983]
FE3C .<= ''
FE3C .=> phpCAS::serviceWeb('https://cas-server/cas/clearPass', NULL, 
NULL) [example_proxy2.php:46]
FE3C .|    => CASClient::serviceWeb('https://cas-server/cas/clearPass', 
NULL, NULL) [CAS.php:846]
FE3C .|    |    => 
CASClient::retrievePT('https://cas-server/cas/clearPass', NULL, NULL) 
[client.php:2236]
FE3C .|    |    |    => 
CASClient::readURL('https://cas-server:443/cas/proxy?targetService=https%3A%2F%2Fcas-server%2Fcas%2FclearPass&pgt=TGT-50427-eR5SrXBVf6ipIpPeTIAI40QFUVh2Lm0z5K6CUENnfE0Cz1n5Yg-fc.ul.pt',
 
'', NULL, NULL, '') [client.php:2002]
FE3C .|    |    | <= true
FE3C .|    |    |    original PT: ST-60454-sILwoM6kLfHQjkigormM-fc.ul.pt 
[client.php:2046]
FE3C .|    | <= 'ST-60454-sILwoM6kLfHQjkigormM-fc.ul.pt'
FE3C .|    |    reading 
URL`https://cas-server/cas/clearPass?ticket=ST-60454-sILwoM6kLfHQjkigormM-fc.ul.pt'
 
[client.php:2260]
FE3C .|    |    => 
CASClient::readURL('https://cas-server/cas/clearPass?ticket=ST-60454-sILwoM6kLfHQjkigormM-fc.ul.pt',
 
NULL, NULL, '', NULL) [client.php:2261]
FE3C .|    | <= true
FE3C .|    |    
URL`https://cas-server/cas/clearPass?ticket=ST-60454-sILwoM6kLfHQjkigormM-fc.ul.pt'
 
has been read, storing cookies: [client.php:2271]
FE3C .| <= true
FE3C .<= true

Francisco

Em 22-11-2010 16:53, Cary, Kim escreveu:
> Here is one way:
>
> $services = 
> array('https://mycasclearpassserver.pepperdine.edu:8443/cas/clearPass');
>
>     foreach ( $services as $service ) {
>       echo '<h2>Response from service '.$service.'</h2><ul><hr>';
>       flush();
>       // call the service and change the color depending on the result
>       if ( phpCAS::serviceWeb($service,$err_code,$output) ) {
>         echo '<font color="#00FF00">';
>       } else {
>       echo '<font color="#FF0000">';
>       }
>       echo $output;
>       echo '</font><hr></ul>';
>
>
> phpCAS::serviceWeb will take the URL for a service (in this case 
> /cas/clearPass) from the specified variable, GET it, grab the output 
> (or error) and return that in the specified variable.
>
> I think I took this from the CASPHP examples.
>
> Hope that helps!
> KC
>
> On Nov 22, 2010, at 7:58 AM, Francisco Estanqueiro wrote:
>
>> Hi everyone,
>>
>> I have clearPass working (I'm sure) but now I need to obtain 
>> the password in a php file. I was trying to understand this steps:
>>
>> https://wiki.jasig.org/display/CAS/Proxy+CAS+Walkthrough
>>
>> and the phpCAS proxy example files  but I cant figure how to obtain 
>> the actual password in a php file.
>>
>> Help me please! (I'm guessing its pretty easy..)
>>
>> Francisco
>>
>>
>>
>> -- 
>> You are currently subscribed to [email protected] as: 
>> [email protected]
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
> -- 
> You are currently subscribed to [email protected] as: 
> [email protected]
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/cas-user


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to