Note : this message is also posted to: http://www.cakephpforum.net

I want to implement the following scenario:

1) User request for information about his account
--> http://localhost/users/view/stef

2) Because this is a protected page, my php code forwards to the
http://localhost/users/login page.

3) The login action from my user_controller.php initializes CAS :
<?php
// initialize phpCAS
phpCAS::client(CAS_VERSION_2_0,
  Configure::read('CAS.Hostname'),
  Configure::read('CAS.Port'),
  Configure::read('CAS.URI'), false);

// no SSL validation for the CAS server
phpCAS::setNoCasServerValidation();

phpCAS::forceAuthentication();
?>


4) The phpCAS code forwards to the SSL CAS login page:
https://localhost:9443/cas/login;service=http%3A%2F%2Flocalhost%2Fusers%2Flogin

5) I fill in a valid username and password which CAS validates with
MySQL.

6) After the authentication, the php code tries to retrieve user
information (via REST) from an other server (SRV) which is configured
to use CAS for authentication.

7) The problem is that I cannot use a normal HTTP call like:
<?php
$this->req =& new HTTP_Request("http://localhost:8080/SERVICE/user/
stef.user");
$this->response = $this->req->sendRequest();
?>


Because the server will return a 302 and forward me to the login page.
So somehow I need to provide the correct ticket (which was provided
when I logged in to CAS) to the request ?

Or maybe I should use
<?php
phpCAS::proxy(...)
?>
in step 3 ?

Does anyone have experience with integrating CAS with CakePHP and
calling an external service?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to