-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathrun.php
More file actions
43 lines (34 loc) · 1.56 KB
/
Copy pathrun.php
File metadata and controls
43 lines (34 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/** @var $this \Icinga\Application\Modules\Module */
use Icinga\Application\Icinga;
use Icinga\Application\Modules\Module;
require_once 'vendor/autoload.php';
if(!Icinga::app()->isCli()){
if(Module::exists('loginhooks') && Module::get('loginhooks')->isRegistered()){
$this->provideHook('loginhooks/LoginFormModifier', \Icinga\Module\Oidc\ProvidedHook\LoginFormModifier::class, true);
}else{
$versions = \Icinga\Application\Version::get();
if (version_compare($versions['appVersion'], "2.14.0", '>=')) {
$this->addRoute('authentication/login', new Zend_Controller_Router_Route_Static(
'authentication/login',
[
'controller' => 'authentication',
'action' => 'login',
'module' => 'oidc'
]
));
}else{
$this->addRoute('authentication/login', new Zend_Controller_Router_Route_Static(
'authentication/login',
[
'controller' => 'legacy-authentication',
'action' => 'login',
'module' => 'oidc'
]
));
}
}
}
$this->provideHook('DbMigration', '\\Icinga\\Module\\Oidc\\ProvidedHook\\DbMigration');
$this->provideHook('Authentication', '\\Icinga\\Module\\Oidc\\ProvidedHook\\Authentication',true);
//$this->provideHook('Oidc\\OidcImplementation', '\Icinga\Module\Oidc\ProvidedHook\Oidc\Default', true);