-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathelgg-plugin.php
89 lines (87 loc) · 2 KB
/
elgg-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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
use Elgg\Router\Middleware\Gatekeeper;
use Elgg\Router\Middleware\LoggedOutGatekeeper;
return [
'plugin' => [
'version' => '5.2',
],
'settings' => [
'use_http_x_forwarded' => 0,
'disable_sso_on_logout' => false,
],
'entities' => [
[
'type' => 'object',
'subtype' => 'saml_idp',
'class' => \SAMLIDP::class,
],
],
'actions' => [
'saml_sso/add_idp_from_xml' => [
'access' => 'admin',
],
'saml_sso/edit_idp' => [
'access' => 'admin',
],
'saml_sso/force_authentication' => [
'access' => 'admin',
],
],
'routes' => [
'login:object:saml_idp' => [
'path' => 'saml_idp/login/{guid}',
'controller' => \ColdTrick\SAMLSSO\Controller\SSO::class,
'middleware' => [
LoggedOutGatekeeper::class,
],
'walled' => false,
],
'acs:object:saml_idp' => [
'path' => 'saml_idp/acs/{guid}',
'controller' => \ColdTrick\SAMLSSO\Controller\ACS::class,
'walled' => false,
],
'logout:object:saml_idp' => [
'path' => 'saml_idp/logout/{guid}',
'controller' => \ColdTrick\SAMLSSO\Controller\SLO::class,
'middleware' => [
Gatekeeper::class,
],
],
'metadata:object:saml_idp' => [
'path' => 'saml_idp/metadata/{guid}',
'controller' => \ColdTrick\SAMLSSO\Controller\Metadata::class,
'walled' => false,
],
],
'events' => [
'register' => [
'menu:entity' => [
'\ColdTrick\SAMLSSO\Menus\Entity::registerIDPEdit' => [],
],
'menu:login' => [
'\ColdTrick\SAMLSSO\Menus\Login::register' => [],
],
'menu:admin_header' => [
'\ColdTrick\SAMLSSO\Menus\AdminHeader::register' => [],
],
],
'response' => [
'action:logout' => [
'\ColdTrick\SAMLSSO\Logout::disableSso' => [],
],
],
],
'view_extensions' => [
'page/default' => [
'saml_sso/force_authentication' => ['priority' => 200],
],
'page/walled_garden' => [
'saml_sso/force_authentication' => ['priority' => 200],
],
],
'view_options' => [
'forms/saml_sso/add_idp_from_xml' => ['ajax' => true],
'forms/saml_sso/edit_idp' => ['ajax' => true],
],
];