Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
   1  <?php
   2  
   3  /**
   4   * Licensed to Jasig under one or more contributor license
   5   * agreements. See the NOTICE file distributed with this work for
   6   * additional information regarding copyright ownership.
   7   *
   8   * Jasig licenses this file to you under the Apache License,
   9   * Version 2.0 (the "License"); you may not use this file except in
  10   * compliance with the License. You may obtain a copy of the License at:
  11   *
  12   * http://www.apache.org/licenses/LICENSE-2.0
  13   *
  14   * Unless required by applicable law or agreed to in writing, software
  15   * distributed under the License is distributed on an "AS IS" BASIS,
  16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17   * See the License for the specific language governing permissions and
  18   * limitations under the License.
  19   *
  20   * PHP Version 5
  21   *
  22   * @file     CAS/ProxyChain/Any.php
  23   * @category Authentication
  24   * @package  PhpCAS
  25   * @author   Adam Franco <afranco@middlebury.edu>
  26   * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
  27   * @link     https://wiki.jasig.org/display/CASC/phpCAS
  28   */
  29  
  30  /**
  31   * A proxy-chain definition that will match any list of proxies.
  32   *
  33   * Use this class for quick testing or in certain production screnarios you
  34   * might want to allow allow any other valid service to proxy your service.
  35   *
  36   * THIS CLASS IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY
  37   * IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER
  38   * ON THIS SERVICE.
  39   *
  40   * @class    CAS_ProxyChain_Any
  41   * @category Authentication
  42   * @package  PhpCAS
  43   * @author   Adam Franco <afranco@middlebury.edu>
  44   * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
  45   * @link     https://wiki.jasig.org/display/CASC/phpCAS
  46   */
  47  class CAS_ProxyChain_Any
  48  implements CAS_ProxyChain_Interface
  49  {
  50  
  51      /**
  52       * Match a list of proxies.
  53       *
  54       * @param array $list The list of proxies in front of this service.
  55       *
  56       * @return bool
  57       */
  58      public function matches(array $list)
  59      {
  60          phpCAS::trace("Using CAS_ProxyChain_Any. No proxy validation is performed.");
  61          return true;
  62      }
  63  
  64  }