When you want to use the phpCAS functions serviceMail oder serviceWeb (for example in another module using an IMAP service) you have to initialize CAS as a proxy. This has to be done in the CAS module because the drupal service is called in background during the proxy ticket validation.

I have attached a patch that adds configuration options and calls phpCAS::proxy().

CommentFileSizeAuthor
cas_proxy.patch2.38 KBacidtalks

Comments

redndahead’s picture

Status: Active » Needs review
metzlerd’s picture

Status: Needs review » Fixed

I commited this patch, but it's very difficult to test. I'd love to see some more configuration descriptions on how this is set. Maybe an EG that puts proxy tickets in a reasonable place.

I would've loved to deal with with this as tickets stored in drupal, but I'm guessing that is pretty hard.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bfroehle’s picture

Category: feature » support
Status: Closed (fixed) » Active

I'm trying to clean up the settings form, and would like to know more about the description for CAS as proxy --

When using a proxy it is required to set the option "Require CAS login for:" to "specific pages" with "node/*" as a specific page or "all pages except specific pages" on the "Redirection settings".

I understand what this is saying, but I have no idea why that conforms to the description in the original post.

bfroehle’s picture

Status: Active » Fixed

I've changed the CAS proxy description to

Initialize phpCAS as a proxy rather than a client. The proxy ticket returned by the CAS server allows access to external services as the CAS user.

This is descriptive about what the option entails, without mentioning other settings that are obscure and never explained.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

zulfierken’s picture

Component: Code » CAS

I am trying to use proxy but I cannot.
I set a file for pgt and debug. debug is written but pgt.txt is not.

I receive

Error message
CAS_AuthenticationException: in CAS_Client->_validatePGT() (line 2248 of /var/www/demo/CAS/CAS/Client.php). error.

proxy ticket is not saved in file.

What I am trying to do is;

using code to retrieve a page from site B withing site A where both site A and site B use CAS module for authentication.

Help/ tutorial / guideline about using Proxy ticket (CAS) to get data from site B is really appreciated.

  • Commit eaa07ea on 6.x-2.x, 6.x-3.x, 7.x-1.x, master, 8.x-1.x by metzlerd:
    #303373 Intialize cas as proxy.
    
    
  • Commit f582bab on 7.x-1.x, 8.x-1.x by bfroehle:
    Issue #303373: Change wording on CAS as proxy.