Skip to content
Snippets Groups Projects
Commit 5d11968b authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

fix usage of phpCAS::proxy(), re #1573

Merge request studip/studip!1074
parent 9af058a8
No related branches found
No related tags found
No related merge requests found
......@@ -24,9 +24,11 @@ class CasController extends StudipController
$pgt = Request::get('pgtId');
$pgt_iou = Request::get('pgtIou');
$cas_config = $GLOBALS['STUDIP_AUTH_CONFIG_CAS'];
$cas = phpCAS::proxy(CAS_VERSION_2_0, $cas_config['host'], $cas_config['port'], $cas_config['uri'], false);
$pgt_storage = new CAS_PGTStorage_Cache($cas);
phpCAS::proxy(CAS_VERSION_2_0, $cas_config['host'], $cas_config['port'], $cas_config['uri'], false);
$pgt_storage = new CAS_PGTStorage_Cache(phpCAS::getCasClient());
$pgt_storage->write($pgt, $pgt_iou);
$this->render_nothing();
}
}
......@@ -33,8 +33,8 @@ class StudipAuthCAS extends StudipAuthSSO
if (Request::get('sso') === $this->plugin_name) {
if ($this->proxy) {
URLHelper::setBaseUrl($GLOBALS['ABSOLUTE_URI_STUDIP']);
$cas = phpCAS::proxy(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, false);
phpCAS::setPGTStorage(new CAS_PGTStorage_Cache($cas));
phpCAS::proxy(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, false);
phpCAS::setPGTStorage(new CAS_PGTStorage_Cache(phpCAS::getCasClient()));
phpCAS::setFixedCallbackURL(URLHelper::getURL('dispatch.php/cas/proxy'));
} else {
phpCAS::client(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, false);
......
......@@ -26,13 +26,13 @@ class CAS_PGTStorage_Cache extends CAS_PGTStorage_AbstractStorage
/**
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
* parameters of the storage (used for debugging purposes).
*
* @return an informational string.
*/
public function getStorageInfo()
{
return 'cache_class_file=' . Config::get()->cache_class_file;
return 'type=' . Config::get()->SYSTEMCACHE['type'];
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment