From 07da41bd690dc0f981d31258e2bb518167b38d15 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 12 Jan 2024 17:35:16 +0000 Subject: [PATCH] docs: better descriptions for create token params --- app/controllers/api/users.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 653d830319..1d6f80393a 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -1558,8 +1558,8 @@ App::post('/v1/users/:userId/tokens') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TOKEN) ->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') - ->param('length', 6, new Range(4, 128), 'Token length in chars.', true) - ->param('expire', Auth::TOKEN_EXPIRATION_GENERIC, new Range(60, Auth::TOKEN_EXPIRATION_LOGIN_LONG), 'Token expiration in seconds.', true) + ->param('length', 6, new Range(4, 128), 'Token length in characters. The default length is 6 characters', true) + ->param('expire', Auth::TOKEN_EXPIRATION_GENERIC, new Range(60, Auth::TOKEN_EXPIRATION_LOGIN_LONG), 'Token expiration period in seconds. The default expiration is 15 minutes.', true) ->inject('request') ->inject('response') ->inject('project')