Skip to content
Snippets Groups Projects
Select Git revision
  • 3ed8ed54e7ea1142f9a41ecae2b21f9c4f21fb17
  • main default protected
  • jguzman12
  • jguzman12-main-patch-38455
4 results

store.js

Blame
  • Cas.php 558 B
    <?php
    
    require_once 'CAS/CAS.php';
    
    class Nmc_Auth_Adapter_Cas implements Zend_Auth_Adapter_Interface
    {
        public function __construct($host, $port, $path)
        {
            phpCAS::client(CAS_VERSION_2_0, $host, $port, $path);
            phpCAS::setNoCasServerValidation();
        }
    
        public function authenticate()
        {
            $loggedIn = phpCAS::checkAuthentication();
            if ($loggedIn) {
                return new Zend_Auth_Result(true, phpCAS::getUser());
            }
            return new Zend_Auth_Result(false, null, array('Not signed in to CAS.'));
        }
    }