fix http vs. https for CAS service (redirection)

This commit is contained in:
Adrien Marquès 2018-06-09 15:08:46 +02:00
parent 047efa100c
commit 782d2084ca
1 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ class casController{
/* (2) Check ticket (validate)
---------------------------------------------------------*/
/* (1) Build useful variables */
$service = ($_SERVER['SERVER_NAME'] == 'ptut.com' ) ? 'http' : 'https';
$service = ($_SERVER['SERVER_PORT'] == 80) ? 'http' : 'https';
$service .= '://'.$_SERVER['HTTP_HOST'].'/api/v/1.0/cas/'.$popup_mode;
$ticket = urlencode($_GET['ticket']);
$validate_url = "https://sso.univ-pau.fr/cas/serviceValidate?ticket=$ticket&service=$service";