From d8f2a50459b3441a7a4f15fb93de5abc4e390120 Mon Sep 17 00:00:00 2001 From: bidi47 Date: Mon, 26 Oct 2026 16:04:37 +0200 Subject: [PATCH] added config authentication Signed-off-by: bidi47 --- config/autoload/authentication.global.php | 34 +++++++++++++++++++++++ config/autoload/local.php.dist | 19 ------------- 2 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 config/autoload/authentication.global.php diff --git a/config/autoload/authentication.global.php b/config/autoload/authentication.global.php new file mode 100644 index 0000000..646c2f9 --- /dev/null +++ b/config/autoload/authentication.global.php @@ -0,0 +1,34 @@ + [ + 'private_key' => [ + 'key_or_path' => realpath(__DIR__ . '/../../data/oauth/private.key'), + 'key_permissions_check' => false, + ], + 'public_key' => [ + 'key_or_path' => realpath(__DIR__ . '/../../data/oauth/public.key'), + 'key_permissions_check' => false, + ], + 'encryption_key' => require realpath(__DIR__ . '/../../data/oauth/encryption.key'), + + //Period interval formatting: + //P period (used with D days, W weeks, M months, Y years) or PT (used with H hours, M minutes, S seconds) + //a number precedes each unit, e.g. P2D, PT10M + + //Usage examples: + //P1M is 1 calendar month - for exactly 30 days use P30D + //P2DT3H is 2 days + 3 hours + //PT3600S is 3600 seconds + 'access_token_expire' => 'P1D', //1 day + 'refresh_token_expire' => 'P1M', //1 calendar month + 'auth_code_expire' => 'PT10M', //10 minutes + 'invalid_credentials' => [ + 'error' => 'Invalid credentials.', + 'error_description' => 'Invalid credentials.', + 'message' => 'Invalid credentials.', + ], + ], +]; diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index eaca8a9..77c497d 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -45,25 +45,6 @@ return [ 'openapi' => [ 'server_description' => 'Development server', ], - 'authentication' => [ - 'private_key' => [ - 'key_or_path' => realpath(__DIR__ . '/../../data/oauth/private.key'), - 'key_permissions_check' => false, - ], - 'public_key' => [ - 'key_or_path' => realpath(__DIR__ . '/../../data/oauth/public.key'), - 'key_permissions_check' => false, - ], - 'encryption_key' => require realpath(__DIR__ . '/../../data/oauth/encryption.key'), - 'access_token_expire' => 'P1D', - 'refresh_token_expire' => 'P1M', - 'auth_code_expire' => 'PT10M', - 'invalid_credentials' => [ - 'error' => 'Invalid credentials.', - 'error_description' => 'Invalid credentials.', - 'message' => 'Invalid credentials.', - ], - ], 'databases' => $databases, 'doctrine' => [ 'connection' => [