PHP Classes

File: web/SSO/modules/casserver/www/cas.php

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/modules/casserver/www/cas.php   Download  
File: web/SSO/modules/casserver/www/cas.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 1,158 bytes
 

Contents

Class file image Download
<?php

/*
 * Frontend for login.php, proxy.php, validate.php and serviceValidate.php. It allows them to be called
 * as cas.php/login, cas.php/validate and cas.php/serviceValidate and is meant for clients
 * like phpCAS which expects one configured prefix which it appends login, validate and
 * serviceValidate to.
 *
 * This version supports CAS proxying. As SSP controls the user session (TGT in CAS parlance)
 * and the CASServer as a backend/proxy server is not aware of termination of the session the Proxy-
 * Granting-Tickets (PGT) issued have a very short ttl - pt. 60 secs.
 *
 * ServiceTickets (SP) and ProxyTickets (PT) now have a 5 secs ttl.
 *
 * Proxyed services (targetService) shall be present in the legal_service_urls config.
 *
 */
 
 
$validFunctions = array(
   
'login' => 'login',
   
'proxy' => 'proxy',
   
'validate' => 'serviceValidate',
   
'serviceValidate' => 'serviceValidate',
   
'proxyValidate' => 'serviceValidate'
);

$function = substr($_SERVER['PATH_INFO'], 1);

if (!isset(
$validFunctions[$function])) {
    throw new
SimpleSAML_Error_NotFound('Not a valid function for cas.php.');
}

include(
$validFunctions[$function].".php");

?>