From 136148705a8b53c6de7b3ac0bb67c7b757fe2e65 Mon Sep 17 00:00:00 2001 From: iglocska Date: Wed, 22 Dec 2021 12:26:37 +0100 Subject: [PATCH] chg: [keycloak] added screw to loosen timing issues --- src/Application.php | 1 + .../Table/SettingProviders/CerebrateSettingsProvider.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/Application.php b/src/Application.php index a63a6ce..0bf89c9 100644 --- a/src/Application.php +++ b/src/Application.php @@ -118,6 +118,7 @@ class Application extends BaseApplication implements AuthenticationServiceProvid 'collectionFactory' => null, 'logErrors' => true, ])); + \SocialConnect\JWX\JWT::$screw = Configure::check('keycloak.screw') ? Configure::read('keycloak.screw') : 0; } $middlewareQueue->add(new AuthenticationMiddleware($this)) ->add(new BodyParserMiddleware()); diff --git a/src/Model/Table/SettingProviders/CerebrateSettingsProvider.php b/src/Model/Table/SettingProviders/CerebrateSettingsProvider.php index 25365de..fa80078 100644 --- a/src/Model/Table/SettingProviders/CerebrateSettingsProvider.php +++ b/src/Model/Table/SettingProviders/CerebrateSettingsProvider.php @@ -211,6 +211,13 @@ class CerebrateSettingsProvider extends BaseSettingsProvider }, 'dependsOn' => 'keycloak.enabled' ], + 'keycloak.screw' => [ + 'name' => 'Screw', + 'type' => 'string', + 'severity' => 'info', + 'default' => 0, + 'description' => __('The misalignment allowed when validating JWT tokens between cerebrate and keycloak. Whilst crisp timings are essential for any timing push, perfect timing is only achievable by GSL participants. (given in seconds)') + ], 'keycloak.mapping.org_uuid' => [ 'name' => 'org_uuid mapping', 'type' => 'string',