I am hoping you can help me. I'm unable to get CAS to validate and pass
anything back. I only validate when going directly to the CAS screen but
not when using the ?service=URL ... I get:

*Warning*: DOMDocument::loadXML()
[domdocument.loadxml<https://localhost/moodle/CAS/domdocument.loadxml>]:
Empty string supplied as input in *
C:\websites\moodle\CAS\source\CAS\Client.php* on line *2769*
 CAS Authentication failed!

You were not authenticated.

You may submit your request again by clicking
here<https://localhost/moodle/CAS/examplecas.php>
.

If the problem persists, you may contact the administrator of this
site<webmaster@localhost>
.
------------------------------
phpCAS 1.3.1+ using server https://192.168.0.107:8443/cas/login/ (CAS 2.0)
*Fatal error*: Uncaught exception 'CAS_AuthenticationException' in
C:\websites\moodle\CAS\source\CAS\Client.php:2771 Stack trace: #0
C:\websites\moodle\CAS\source\CAS\Client.php(1224):
CAS_Client->validateCAS20('https://192.168...', '', NULL) #1
C:\websites\moodle\CAS\source\CAS\Client.php(1083):
CAS_Client->isAuthenticated() #2
C:\websites\moodle\CAS\source\CAS.php(1100):
CAS_Client->forceAuthentication() #3
C:\websites\moodle\CAS\examplecas.php(43): phpCAS::forceAuthentication() #4
{main} thrown in *C:\websites\moodle\CAS\source\CAS\Client.php* on line *
2771

And the phpCAS log says this:
*89B1 .START phpCAS-1.3.1+ ****************** [CAS.php:450]
89B1 .=> phpCAS::client('2.0', '192.168.0.107', 8443, '/cas/login')
[examplecas.php:31]
89B1 .|    => CAS_Client::__construct('2.0', false, '192.168.0.107', 8443,
'/cas/login', true) [CAS.php:347]
89B1 .|    |    Starting a new session [Client.php:792]
89B1 .|    |    Ticket 'ST-3-WPFPfpQjyeaFslfC2MvZ-cas' found
[Client.php:870]
89B1 .|    <= ''
89B1 .<= ''
89B1 .=> phpCAS::setNoCasServerValidation() [examplecas.php:40]
89B1 .|    You have configured no validation of the legitimacy of the cas
server. This is not recommended for production use. [CAS.php:1663]
89B1 .<= ''
89B1 .=> phpCAS::forceAuthentication() [examplecas.php:43]
89B1 .|    => CAS_Client::forceAuthentication() [CAS.php:1100]
89B1 .|    |    => CAS_Client::isAuthenticated() [Client.php:1083]
89B1 .|    |    |    => CAS_Client::_wasPreviouslyAuthenticated()
[Client.php:1189]
89B1 .|    |    |    |    no user found [Client.php:1375]
89B1 .|    |    |    <= false
89B1 .|    |    |    CAS 2.0 ticket `ST-3-WPFPfpQjyeaFslfC2MvZ-cas' is
present [Client.php:1223]
89B1 .|    |    |    => CAS_Client::validateCAS20('', NULL, NULL)
[Client.php:1224]
89B1 .|    |    |    |     [Client.php:2738]
89B1 .|    |    |    |    => CAS_Client::getServerServiceValidateURL()
[Client.php:2744]
89B1 .|    |    |    |    |    => CAS_Client::getURL() [Client.php:417]
89B1 .|    |    |    |    |    |    Final URI:
https://localhost/moodle/CAS/examplecas.php [Client.php:3062]
89B1 .|    |    |    |    |    <= '
https://localhost/moodle/CAS/examplecas.php'
89B1 .|    |    |    |    <= '
https://192.168.0.107:8443/cas/login/serviceValidate?service=https%3A%2F%2Flocalhost%2Fmoodle%2FCAS%2Fexamplecas.php
'
89B1 .|    |    |    |    => CAS_Client::_readURL('
https://192.168.0.107:8443/cas/login/serviceValidate?service=https%3A%2F%2Flocalhost%2Fmoodle%2FCAS%2Fexamplecas.php&ticket=ST-3-WPFPfpQjyeaFslfC2MvZ-cas',
NULL, NULL, NULL) [Client.php:2753]
89B1 .|    |    |    |    |    => CAS_Request_CurlRequest::sendRequest()
[AbstractRequest.php:218]
89B1 .|    |    |    |    |    |    Response Body:
89B1 .|    |    |    |    |    |
89B1 .|    |    |    |    |    |     [CurlRequest.php:82]
89B1 .|    |    |    |    |    <= true
89B1 .|    |    |    |    <= true
89B1 .|    |    |    |    =>
CAS_AuthenticationException::__construct(CAS_Client, 'Ticket not
validated', '
https://192.168.0.107:8443/cas/login/serviceValidate?service=https%3A%2F%2Flocalhost%2Fmoodle%2FCAS%2Fexamplecas.php&ticket=ST-3-WPFPfpQjyeaFslfC2MvZ-cas',
false, true, '') [Client.php:2774]
89B1 .|    |    |    |    |    => CAS_Client::getURL()
[AuthenticationException.php:76]
89B1 .|    |    |    |    |    <= '
https://localhost/moodle/CAS/examplecas.php'
89B1 .|    |    |    |    |    CAS URL:
https://192.168.0.107:8443/cas/login/serviceValidate?service=https%3A%2F%2Flocalhost%2Fmoodle%2FCAS%2Fexamplecas.php&ticket=ST-3-WPFPfpQjyeaFslfC2MvZ-cas[AuthenticationException.php:79]
89B1 .|    |    |    |    |    Authentication failure: Ticket not validated
[AuthenticationException.php:80]
89B1 .|    |    |    |    |    Reason: bad response from the CAS server
[AuthenticationException.php:85]
89B1 .|    |    |    |    |    CAS response:
[AuthenticationException.php:100]
89B1 .|    |    |    |    |    exit()
89B1 .|    |    |    |    |    -
89B1 .|    |    |    |    -
89B1 .|    |    |    -
89B1 .|    |    -
89B1 .|    -

I'm authenticating against the
"org.jasig.cas.adaptors.generic.AcceptUsersAuthenticationHandler" and can
login locally and remotely by going to the url and I get a successful login
. I tried signing up on the Jasiq list but never received a signup message.
I'm running CAS on Ubuntu 10.04 and phpCAS on Win7. Both run SSL

I have opened up the local inside network firewall and can see other
servers on my network without problems. The url:

https://192.168.0.100/ is the Win7 I'm running phpCAS and the Tomcat6 is on
192.168.0.107 and am using the simple CAS example as shown:

// Load the settings from the central config file
//require_once 'config.php';
$cas_host = '192.168.0.107';
$cas_port = 8443;
$cas_context = '/cas/login';
$phpcas_path = 'moodle/CAS';

// Load the CAS lib
require_once 'CAS.php';

// Uncomment to enable debugging
phpCAS::setDebug();

// Initialize phpCAS
phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);

// For production use set the CA certificate that is the issuer of the cert
// on the CAS server and uncomment the line below
// phpCAS::setCasServerCACert($cas_server_ca_cert_path);

// For quick testing you can disable SSL validation of the CAS server.
// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
phpCAS::setNoCasServerValidation();

// force CAS authentication
phpCAS::forceAuthentication();

// at this step, the user has been authenticated by the CAS server
// and the user's login name can be read with phpCAS::getUser().

// logout if desired
if (isset($_REQUEST['logout'])) {
phpCAS::logout();
}

// for this test, simply print that the authentication was successfull
?>
<html>
<head>
<title>phpCAS simple client</title>
</head>
<body>
<h1>Successfull Authentication!</h1>
<?php require 'script_info.php' ?>
<p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
<p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
<p><a href="?logout=">Logout</a></p>
</body>
</html>

On the tomcat side I went into WEB-INF/classes/log4j.xml and had success in
catalina.out except for the cas.log and perfStats.log they are not creating
to give me more to go on. The file is rather large from previous attempts
at getting a better log to show me  what needs to happen.

My question is what is the value of $text_response and how is it populated.
_readURL($validate_url, $headers, $text_response, $err_msg) (line 2771)

Please let me know if you need any more information.

Any help would be appreciated

Thanks,
Mark

-- 
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