From acb075c2e3a8a72a2136a569681581de3252e271 Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Thu, 8 May 2025 11:26:58 +0300 Subject: [PATCH] Add token_response field to Oauth2Server (#314) --- .../CoreServer/src/Model/Table/Oauth2ServersTable.php | 8 ++++++++ app/plugins/CoreServer/src/config/plugin.json | 1 + 2 files changed, 9 insertions(+) diff --git a/app/plugins/CoreServer/src/Model/Table/Oauth2ServersTable.php b/app/plugins/CoreServer/src/Model/Table/Oauth2ServersTable.php index ffc9113e3..54e720c59 100644 --- a/app/plugins/CoreServer/src/Model/Table/Oauth2ServersTable.php +++ b/app/plugins/CoreServer/src/Model/Table/Oauth2ServersTable.php @@ -270,6 +270,14 @@ public function validationDefault(Validator $validator): Validator { ]); $validator->allowEmptyString('access_token'); + $validator->add('token_response', [ + 'content' => [ + 'rule' => 'validateNotBlank', + 'provider' => 'table' + ] + ]); + $validator->allowEmptyString('token_response'); + $validator->integer('access_token_exp') ->allowEmptyString('access_token_exp'); diff --git a/app/plugins/CoreServer/src/config/plugin.json b/app/plugins/CoreServer/src/config/plugin.json index b9687eaf7..f64e58cbd 100644 --- a/app/plugins/CoreServer/src/config/plugin.json +++ b/app/plugins/CoreServer/src/config/plugin.json @@ -49,6 +49,7 @@ "scope": { "type": "string", "size": 256 }, "refresh_token": { "type": "text" }, "access_token": { "type": "text" }, + "token_response": { "type": "text" }, "access_token_exp": { "type": "boolean" } }, "indexes": {