ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
AllowedList.php
Go to the documentation of this file.
1
<?
php
2
43
class
CAS_ProxyChain_AllowedList
44
{
45
private
$_chains
= array();
46
52
public
function
isProxyingAllowed
()
53
{
54
return
(count($this->_chains) > 0);
55
}
56
64
public
function
allowProxyChain
(
CAS_ProxyChain_Interface
$chain)
65
{
66
$this->_chains[] = $chain;
67
}
68
76
public
function
isProxyListAllowed
(array $proxies)
77
{
78
phpCAS::traceBegin
();
79
if
(empty($proxies)) {
80
phpCAS::trace
(
"No proxies were found in the response"
);
81
phpCAS::traceEnd
(
true
);
82
return
true
;
83
} elseif (!$this->
isProxyingAllowed
()) {
84
phpCAS::trace
(
"Proxies are not allowed"
);
85
phpCAS::traceEnd
(
false
);
86
return
false
;
87
}
else
{
88
$res
= $this->
contains
($proxies);
89
phpCAS::traceEnd
(
$res
);
90
return
$res
;
91
}
92
}
93
102
public
function
contains
(array
$list
)
103
{
104
phpCAS::traceBegin
();
105
$count = 0;
106
foreach
($this->_chains as $chain) {
107
phpCAS::trace
(
"Checking chain "
. $count++);
108
if
($chain->matches($list)) {
109
phpCAS::traceEnd
(
true
);
110
return
true
;
111
}
112
}
113
phpCAS::trace
(
"No proxy chain matches."
);
114
phpCAS::traceEnd
(
false
);
115
return
false
;
116
}
117
}
CAS_ProxyChain_AllowedList
ProxyChain is a container for storing chains of valid proxies that can be used to validate proxied re...
Definition:
AllowedList.php:43
$list
if(isset($_REQUEST['delete'])) $list
Definition:
registry.php:41
CAS_ProxyChain_Interface
An interface for classes that define a list of allowed proxies in front of the current application...
Definition:
Interface.php:41
CAS_ProxyChain_AllowedList\isProxyingAllowed
isProxyingAllowed()
Check whether proxies are allowed by configuration.
Definition:
AllowedList.php:52
phpCAS\traceEnd
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition:
CAS.php:658
phpCAS\trace
static trace($str)
This method is used to log something in debug mode.
Definition:
CAS.php:599
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
CAS_ProxyChain_AllowedList\isProxyListAllowed
isProxyListAllowed(array $proxies)
Check if the proxies found in the response match the allowed proxies.
Definition:
AllowedList.php:76
CAS_ProxyChain_AllowedList\$_chains
$_chains
Definition:
AllowedList.php:45
phpCAS\traceBegin
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition:
CAS.php:611
CAS_ProxyChain_AllowedList\allowProxyChain
allowProxyChain(CAS_ProxyChain_Interface $chain)
Add a chain of proxies to the list of possible chains.
Definition:
AllowedList.php:64
php
CAS_ProxyChain_AllowedList\contains
contains(array $list)
Validate the proxies from the proxy ticket validation against the chains that were definded...
Definition:
AllowedList.php:102
Services
CAS
lib
CAS
ProxyChain
AllowedList.php
Generated on Thu Jan 16 2025 19:02:18 for ILIAS by
1.8.13 (using
Doxyfile
)