-
Notifications
You must be signed in to change notification settings - Fork 8
/
Plugin.php
51 lines (37 loc) · 1.34 KB
/
Plugin.php
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
44
45
46
47
48
49
50
51
<?php
namespace Kanboard\Plugin\SamlAuth;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Security\Role;
use Kanboard\Plugin\SamlAuth\Auth\SamlAuth;
use Kanboard\Plugin\SamlAuth\Auth\SamlSettings;
class Plugin extends Base
{
public function initialize()
{
$this->authenticationManager->register(new SamlAuth($this->container));
$this->applicationAccessMap->add('SamlAuthController', '*', Role::APP_PUBLIC);
$this->applicationAccessMap->add('SamlAuthController', 'metadata', Role::APP_ADMIN);
//Generate Metadata
$this->route->addRoute('/sso/metadata', 'SamlAuthController', 'metadata', 'SamlAuth');
//Send to SAML URL
$this->route->addRoute('/sso/saml', 'SamlAuthController', 'index', 'SamlAuth');
$this->template->hook->attach('template:auth:login-form:after', 'SamlAuth:auth/login');
$this->template->hook->attach('template:config:integrations', 'SamlAuth:config/integrations');
}
public function getPluginDescription()
{
return 'This SAML Authentication plugin lets you use Kanboard as a Service Provider.';
}
public function getPluginAuthor()
{
return 'Halton Oy';
}
public function getPluginVersion()
{
return '1.0.0';
}
public function getPluginHomepage()
{
return 'http://tj.mk';
}
}