forked from r3h6/TYPO3.EXT.oauth2_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
61 lines (56 loc) · 2.27 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
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
<?php
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function()
{
// Hooks
$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \R3H6\Oauth2Server\Hook\CreateClientSecretHook::class;
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('scheduler')) {
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'],
[
'tx_oauth2server_domain_model_authcode' => [
'dateField' => 'expires_at',
'expirePeriod' => 1,
],
'tx_oauth2server_domain_model_accesstoken' => [
'dateField' => 'expires_at',
'expirePeriod' => 1,
],
'tx_oauth2server_domain_model_refreshtoken' => [
'dateField' => 'expires_at',
'expirePeriod' => 1,
],
]
);
}
// Plugins
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Oauth2Server',
'Consent',
[
\R3H6\Oauth2Server\Controller\ConsentController::class => 'show',
],
[
\R3H6\Oauth2Server\Controller\ConsentController::class => 'show',
]
);
// Services
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService(
'oauth2_server',
'auth',
\R3H6\Oauth2Server\Service\Oauth2AuthService::class,
[
'title' => 'Oauth2 authentication',
'description' => 'Authenticate user by user uid and oauth access token.',
'subtype' => 'getUserFE,authUserFE',
'available' => true, // By default off
'priority' => 99,
'quality' => 50,
'os' => '',
'exec' => '',
'className' => \R3H6\Oauth2Server\Service\Oauth2AuthService::class,
]
);
}
);