1
0
Fork 0
mirror of synced 2024-07-04 14:10:33 +12:00

feat: add auth session limit param

This commit is contained in:
Damodar Lohani 2022-12-11 07:15:18 +00:00
parent 509aef16bd
commit fd93c8aebd

View file

@ -114,6 +114,12 @@ class Project extends Model
'default' => 0,
'example' => 100,
])
->addRule('authSessionsLimit', [
'type' => self::TYPE_INTEGER,
'description' => 'Max sessions allowed per user. 100 maximum.',
'default' => 100,
'example' => 10,
])
->addRule('providers', [
'type' => Response::MODEL_PROVIDER,
'description' => 'List of Providers.',
@ -233,6 +239,7 @@ class Project extends Model
$document->setAttribute('authLimit', $authValues['limit'] ?? 0);
$document->setAttribute('authDuration', $authValues['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG);
$document->setAttribute('authSessionLimit', $authValues['maxSessions'] ?? APP_LIMIT_USER_SESSIONS);
foreach ($auth as $index => $method) {
$key = $method['key'];