19 declare(strict_types=1);
43 $cmd = (string) ($this->httpRequest->getQueryParams()[
'cmd'] ??
'');
45 $cmd = (string) ($this->httpRequest->getParsedBody()[
'cmd'] ??
'');
48 if ($cmd ===
'force_login') {
52 if (!$this->
getSettings()->get(
'apache_enable_auth',
'0')) {
56 if (!$this->
getSettings()->get(
'apache_auth_authenticate_on_login_page',
'0')) {
61 (defined(
'IL_CERT_SSO') && (
int) IL_CERT_SSO === 1) ||
63 isset($this->httpRequest->getQueryParams()[
'passed_sso'])
68 $path = (string) ($this->httpRequest->getServerParams()[
'REQUEST_URI'] ??
'');
69 if (str_starts_with(
$path,
'/')) {
73 if (!str_starts_with(
$path,
'http')) {
74 $parts = parse_url(ILIAS_HTTP_PATH);
78 $this->
ctrl->redirectToURL(
80 './public/sso/index.php?force_mode_apache=1&' .
81 'r=' . urlencode(
$path) .
83 '&ilias_path=' . urlencode(ILIAS_HTTP_PATH)
95 $mappingFieldName = $this->
getSettings()->get(
'apache_auth_username_direct_mapping_fieldname',
'');
98 $this->
logger->debug($mappingFieldName);
100 switch ($this->
getSettings()->
get(
'apache_auth_username_config_type')) {
102 if (isset($this->httpRequest->getServerParams()[$mappingFieldName])) {
103 $this->
setUsername($this->httpRequest->getServerParams()[$mappingFieldName]);
115 $targetUrl = trim((
string) ($this->httpRequest->getQueryParams()[
'r'] ??
''));
116 if ($targetUrl ===
'') {
122 if (file_exists(
$path) && is_readable(
$path)) {
123 foreach (file(
$path) as $line) {
125 $validDomains[] = trim($line);
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
tryAuthenticationOnLoginPage()
Check if an authentication attempt should be done when login page has been called.
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
const int APACHE_AUTH_TYPE_DIRECT_MAPPING
const int APACHE_AUTH_TYPE_BY_FUNCTION
ServerRequestInterface $httpRequest
static getHtmlPath(string $relative_path)
get url of path
__construct(ServerRequestInterface $httpRequest, ilCtrlInterface $ctrl)
setUsername(string $a_name)
__construct(Container $dic, ilPlugin $plugin)
const IL_COOKIE_PATH(isset($_GET['client_id']))
static supportsRedirects()
Are redirects supported?