ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
StaticUrlHandler.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Authentication;
22
29use ilLanguage;
30
31class StaticUrlHandler extends BaseHandler implements Handler
32{
33 private readonly ilLanguage $language;
34
35 public function __construct()
36 {
37 global $DIC;
38 $this->language = $DIC->language();
40 }
41
42 public function getNamespace(): string
43 {
44 return 'auth';
45 }
46
47 public function handle(Request $request, Context $context, Factory $response_factory): Response
48 {
49 $additional_params = implode('/', $request->getAdditionalParameters() ?? []);
50
51 return match ($additional_params) {
52 'login' => $response_factory->can('login.php?' . http_build_query([
53 'cmd' => 'force_login',
54 'lang' => $this->language->getLangKey(),
55 ])),
56 };
57 }
58}
handle(Request $request, Context $context, Factory $response_factory)
language handling
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26
$context
Definition: webdav.php:31