forked from marketing-factory/oauth2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
34 lines (29 loc) · 1.02 KB
/
ext_localconf.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
<?php
use Mfc\OAuth2\LoginProvider\OAuth2LoginProvider;
use Mfc\OAuth2\Services\OAuth2LoginService;
defined('TYPO3_MODE') || die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService(
$_EXTKEY,
'auth',
OAuth2LoginService::class,
[
'title' => 'OAuth Authentication',
'description' => 'OAuth authentication service for backend users',
'subtype' => 'getUserBE,authUserBE',
'available' => true,
'priority' => 75,
'quality' => 50,
'os' => '',
'exec' => '',
'className' => OAuth2LoginService::class
]
);
$extensionConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['oauth2']);
if ($extensionConfig['enableBackendLogin']) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['loginProviders'][1529672977] = [
'provider' => OAuth2LoginProvider::class,
'sorting' => 25,
'icon-class' => 'fa-sign-in',
'label' => 'LLL:EXT:oauth2/Resources/Private/Language/locallang.xlf:oauth2.login.link'
];
}