ILIAS  trunk Revision v13.0_alpha-52-g21c366bbdd4
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 ?ilLanguage $language = null;
34
35 private function language(): ilLanguage
36 {
37 if ($this->language === null) {
38 global $DIC;
39 $this->language = $DIC->language();
40 }
41 return $this->language;
42 }
43
44 public function getNamespace(): string
45 {
46 return 'auth';
47 }
48
49 public function handle(Request $request, Context $context, Factory $response_factory): Response
50 {
51 $additional_params = implode('/', $request->getAdditionalParameters() ?? []);
52
53 return match ($additional_params) {
54 'login' => $response_factory->can('login.php?' . http_build_query([
55 'cmd' => 'force_login',
56 'lang' => $this->language()->getLangKey(),
57 ])),
58 };
59 }
60}
handle(Request $request, Context $context, Factory $response_factory)
can(string $uri_path, bool $shift=false)
The Handler successfully resolved the target.
Definition: Factory.php:88
language handling
$request
@ilCtrl_Calls ilObjLearningSequenceContentGUI: ilObjLearningSequenceConditionsGUI
Definition: ltiauth.php:39
global $DIC
Definition: shib_login.php:26