19declare(strict_types=1);
23use Psr\Http\Message\ServerRequestInterface;
54 $cmd = (string) ($this->http_request->getQueryParams()[
'cmd'] ??
'');
56 $cmd = (string) ($this->http_request->getParsedBody()[
'cmd'] ??
'');
59 if ($cmd ===
'force_login') {
63 if (!$this->
getSettings()->get(
'apache_enable_auth',
'0')) {
67 if (!$this->
getSettings()->get(
'apache_auth_authenticate_on_login_page',
'0')) {
71 if ((\defined(
'IL_CERT_SSO') &&
\IL_CERT_SSO ===
true) ||
73 isset($this->http_request->getQueryParams()[
'passed_sso'])) {
77 $path = (string) ($this->http_request->getServerParams()[
'REQUEST_URI'] ??
'');
78 if (str_starts_with(
$path,
'/')) {
82 if (!str_starts_with(
$path,
'http')) {
83 $parts = parse_url(ILIAS_HTTP_PATH);
87 $this->
ctrl->redirectToURL(
89 './sso/index.php?' . http_build_query([
90 'force_mode_apache' => 1,
93 'ilias_path' => ILIAS_HTTP_PATH,
106 $mapping_field_name = $this->
getSettings()->get(
'apache_auth_username_direct_mapping_fieldname',
'');
109 $this->
logger->debug($mapping_field_name);
111 switch ($this->
getSettings()->
get(
'apache_auth_username_config_type')) {
113 if (isset($this->http_request->getServerParams()[$mapping_field_name])) {
114 $this->
setUsername($this->http_request->getServerParams()[$mapping_field_name]);
121 require CollectUsernameProvidersObjective::PATH()
131 $target_url = trim((
string) ($this->http_request->getQueryParams()[
'r'] ??
''));
132 if ($target_url ===
'') {
138 if (file_exists(
$path) && is_readable(
$path)) {
139 foreach (file(
$path) as $line) {
141 $valid_hosts[] = trim($line);
const IL_CERT_SSO(isset($_GET['client_id']))
foreach($components as $component) $resolver
Resolves a username by selecting the first provider (by descending priority) that returns a non-empty...
tryAuthenticationOnLoginPage()
Check if an authentication attempt should be done when login page has been called.
__construct(ServerRequestInterface $http_request, ilCtrlInterface $ctrl)
ServerRequestInterface $http_request
const int APACHE_AUTH_TYPE_DIRECT_MAPPING
const int APACHE_AUTH_TYPE_BY_FUNCTION
setUsername(string $a_name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static supportsRedirects()
Are redirects supported?
Util class various functions, usage as namespace.
static getHtmlPath(string $relative_path)
get url of path
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc