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