PluginProbe
Authorizer / 3.15.3
Authorizer v3.15.3
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / vendor / apereo / phpcas / source / CAS / ProxyChain / Trusted.php

Trusted.php in Authorizer 3.15.3, at vendor/apereo/phpcas/source/CAS/ProxyChain/Trusted.php

60 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 7
21 *
22 * @file CAS/ProxyChain/Trusted.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 defines a chain up to a trusted proxy and
32 * delegates the resposibility of validating the rest of the chain to that
33 * trusted proxy.
34 *
35 * @class CAS_ProxyChain_Trusted
36 * @category Authentication
37 * @package PhpCAS
38 * @author Adam Franco <afranco@middlebury.edu>
39 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
40 * @link https://wiki.jasig.org/display/CASC/phpCAS
41 */
42 class CAS_ProxyChain_Trusted
43 extends CAS_ProxyChain
44 implements CAS_ProxyChain_Interface
45 {
46
47 /**
48 * Validate the size of the the list as compared to our chain.
49 *
50 * @param array $list list of proxies
51 *
52 * @return bool
53 */
54 protected function isSizeValid (array $list)
55 {
56 return (sizeof($this->chain) <= sizeof($list));
57 }
58
59 }
60