Distauth: PHP

Instructions

This filter has been tested on Windows/Apache and Linux/Apache, though it should work on any OS that runs PHP. The main drawback to using this filter is that it will only secure PHP files. So if you have a mixture of .php and other files (html, images, etc.), anyone who knows the url to the non-php files will be able to access them.

The advantage is that the PHP modules are very easy to set up. So if the site you want to use distauth for is all-PHP, or the non-PHP components don't need to be protected from unauthorized access, this may be the best way to do it.

To use this script in your php3 code, you will need to
include ("/path/to/afsauth_form.inc");
then call da_authenticate($sendback) where $sendback can be the following:

  • Case 1: $sendback = false
    - on auth failure function just returns false
  • Case 2: $sendback = null || true
    - on auth failure function redirects user to secureweb for authentication
    - if $da_redirect = "0" user will be stranded at secureweb
  • Case 3: $sendback = some url
    - on auth failure function redirects user to secureweb for authentication
    with sendback url of $sendback


Note, this client requires the installation of an AFS client as well as submission of the server IP to afs-setup@ucdavis.edu.