Beispiel #1
0
 /**
  * Constructor
  *
  *
  * @access public
  *
  */
 function StudipAuthCAS()
 {
     parent::__construct();
     if (Request::option('sso')) {
         $this->cas = new CASClient(CAS_VERSION_2_0, false, $this->host, $this->port, $this->uri, false);
         if (isset($this->cacert)) {
             $this->cas->setCasServerCACert($this->cacert);
         } else {
             $this->cas->setNoCasServerValidation();
         }
     }
 }
Beispiel #2
0
 /**
  * Constructor: read auth information from remote SP.
  */
 function StudipAuthShib()
 {
     parent::__construct();
     if (Request::option('sso') && isset($this->validate_url) && isset($_REQUEST['token'])) {
         $auth = file_get_contents($this->validate_url . '/' . $_REQUEST['token']);
         $this->userdata = json_decode($auth, true);
         $this->userdata = array_map('utf8_decode', $this->userdata);
         if (isset($this->local_domain)) {
             $this->userdata['username'] = str_replace('@' . $this->local_domain, '', $this->userdata['username']);
         }
     }
 }