Skip to content

Commit a3fd59f

Browse files
committed
fixed refactoring bug in oauth2 misc router
reduced default live-time of refresh token from 500 years (whoops) to 1 year
1 parent e0c4fd5 commit a3fd59f

File tree

2 files changed

+4
-4
lines changed
  • Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST

2 files changed

+4
-4
lines changed

Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/oauth2_v2/models/Misc.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function FlowTokenInfo($apiKey, $apiSecret, $apiCert, $iliasClient
8888
);
8989

9090
// Invoke common checks for all flows (throws on error)
91-
Common::FlowAll($apiKey, $apiSecret, $apiCert, $remoteIp, $userId);
91+
self::FlowAll($apiKey, $apiSecret, $apiCert, $remoteIp, $userId);
9292

9393
// Store TTL (since it might change over time)
9494
$ttl = $token->getRemainingTime();
@@ -126,7 +126,7 @@ public static function FlowDeleteToken($apiKey, $apiSecret, $apiCert, $iliasClie
126126
$userId = $token->getUserId();
127127

128128
// Invoke common checks for all flows (throws on error)
129-
Common::FlowAll($apiKey, $apiSecret, $apiCert, $remoteIp, $userId);
129+
self::FlowAll($apiKey, $apiSecret, $apiCert, $remoteIp, $userId);
130130

131131
// Check wether api-keys match
132132
if ($apiKey != $token->getApiKey() || $iliasClient != $token->getIliasClient())
@@ -265,7 +265,7 @@ public static function FlowFromOAUTH($apiKey, $apiSecret, $apiCert, $accessCode,
265265
*/
266266
public static function FlowDeleteSession($apiKey, $apiSecret, $apiCert, $remoteIp, $userId, $token, $sessionID) {
267267
// Invoke common checks for all flows (throws on error)
268-
Common::FlowAll($apiKey, $apiSecret, $apiCert, $remoteIp, $userId);
268+
self::FlowAll($apiKey, $apiSecret, $apiCert, $remoteIp, $userId);
269269

270270
// Destroy given ILIAS session
271271
Libs\RESTilias::deleteSession($userId, $token, $sessionID);

Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/sql/dbupdate.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function gen_uuid() {
8080
));
8181
$ilDB->insert('ui_uihk_rest_config', array(
8282
'setting_name' => array('text', 'refresh_token_ttl'),
83-
'setting_value' => array('text', '315360000')
83+
'setting_value' => array('text', '525600')
8484
));
8585
$ilDB->insert('ui_uihk_rest_config', array(
8686
'setting_name' => array('text', 'authorization_token_ttl'),

0 commit comments

Comments
 (0)