Skip to content
Snippets Groups Projects
Select Git revision
  • a86768e4676c104b5eec6afbb1aff8cfdc13ad67
  • main default protected
  • step-3263
  • feature/plugins-cli
  • feature/vite
  • step-2484-peerreview
  • biest/issue-5051
  • tests/simplify-jsonapi-tests
  • fix/typo-in-1a70031
  • feature/broadcasting
  • database-seeders-and-factories
  • feature/peer-review-2
  • feature-feedback-jsonapi
  • feature/peerreview
  • feature/balloon-plus
  • feature/stock-images-unsplash
  • tic-2588
  • 5.0
  • 5.2
  • biest/unlock-blocks
  • biest-1514
21 results

cas.php

Blame
  • Forked from Stud.IP / Stud.IP
    4536 commits behind the upstream repository.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    cas.php 1.09 KiB
    <?php
    /**
     * cas.php - CAS single sign on controller
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation; either version 2 of
     * the License, or (at your option) any later version.
     *
     * @author      Elmar Ludwig
     * @license     http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
     * @category    Stud.IP
     */
    
    require_once 'composer/jasig/phpcas/CAS.php';
    require_once 'lib/classes/cas/CAS_PGTStorage_Cache.php';
    
    class CasController extends StudipController
    {
        /**
         * proxy action of this controller: receive and store PGT data
         */
        public function proxy_action()
        {
            $pgt = Request::get('pgtId');
            $pgt_iou = Request::get('pgtIou');
            $cas_config = $GLOBALS['STUDIP_AUTH_CONFIG_CAS'];
            $cas = new CAS_Client(CAS_VERSION_2_0, true, $cas_config['host'], $cas_config['port'], $cas_config['uri'], false);
            $pgt_storage = new CAS_PGTStorage_Cache($cas);
            $pgt_storage->write($pgt, $pgt_iou);
            $this->render_nothing();
        }
    }