forked from DMKEBUSINESSGMBH/mksamlauth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_localconf.php
More file actions
53 lines (46 loc) · 1.8 KB
/
ext_localconf.php
File metadata and controls
53 lines (46 loc) · 1.8 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
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Ext_localconf
*
* @category TYPO3-Extension
* @package DMK\SamlAuth
* @author Eric Hertwig <dev@dmk-ebusiness.de>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @link https://www.dmk-ebusiness.de/
*/
use DMK\MKSamlAuth\Authentication\SamlAuth;
use DMK\MKSamlAuth\EnricherRegistry;
use DMK\MKSamlAuth\Enricher;
use DMK\MKSamlAuth\Store\IdStore;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
ExtensionManagementUtility::addService(
$_EXTKEY,
'auth',
SamlAuth::class,
[
'title' => 'Saml-Auth FE-User',
'description' => 'Authenticates FE-Users/groups via Saml',
'subtype' => 'authUserFE,getUserFE',
'available' => true,
'priority' => 70,
'quality' => 70,
'os' => '',
'exec' => '',
'className' => SamlAuth::class,
]
);
EnricherRegistry::register(Enricher\DummyPasswordEnricher::class, 100);
EnricherRegistry::register(Enricher\SamlHostnameEnricher::class, 100);
EnricherRegistry::register(Enricher\SimpleAttributeEnricher::class);
EnricherRegistry::register(Enricher\SSOGroupEnricher::class, 10);
EnricherRegistry::register(Enricher\DefaultGroupEnricher::class);
$TYPO3_CONF_VARS['SVCONF']['auth']['setup']['FE_alwaysFetchUser'] = true;
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][IdStore::CACHE_KEY])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][IdStore::CACHE_KEY] = [];
}
if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][IdStore::CACHE_KEY]['backend'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][IdStore::CACHE_KEY]['backend'] = \TYPO3\CMS\Core\Cache\Backend\FileBackend::class;
}