phpCAS  version 1.4.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CAS_ProxyChain Class Reference
Inheritance diagram for CAS_ProxyChain:
CAS_ProxyChain_Interface CAS_ProxyChain_Trusted

Public Member Functions

 __construct (array $chain)
 
 matches (array $list)
 
- Public Member Functions inherited from CAS_ProxyChain_Interface
 matches (array $list)
 

Protected Member Functions

 isSizeValid (array $list)
 

Protected Attributes

 $chain = array()
 

Detailed Description

A normal proxy-chain definition that lists each level of the chain as either a string or regular expression.

Examples:
example_service.php, example_service_POST.php, and example_service_that_proxies.php.

Definition at line 42 of file ProxyChain.php.

Constructor & Destructor Documentation

◆ __construct()

CAS_ProxyChain::__construct ( array  $chain)

A chain is an array of strings or regexp strings that will be matched against. Regexp will be matched with preg_match and strings will be matched from the beginning. A string must fully match the beginning of an proxy url. So you can define a full domain as acceptable or go further down. Proxies have to be defined in reverse from the service to the user. If a user hits service A get proxied via B to service C the list of acceptable proxies on C would be array(B,A);

Parameters
array$chainA chain of proxies

Definition at line 60 of file ProxyChain.php.

Member Function Documentation

◆ isSizeValid()

CAS_ProxyChain::isSizeValid ( array  $list)
protected

Validate the size of the the list as compared to our chain.

Parameters
array$listList of proxies
Returns
bool

Definition at line 123 of file ProxyChain.php.

Referenced by matches().

◆ matches()

CAS_ProxyChain::matches ( array  $list)

Match a list of proxies.

Parameters
array$listThe list of proxies in front of this service.
Returns
bool

Definition at line 73 of file ProxyChain.php.

References isSizeValid(), and phpCAS\trace().

Member Data Documentation

◆ $chain

CAS_ProxyChain::$chain = array()
protected

Definition at line 46 of file ProxyChain.php.