Fix jwt-token

This commit is contained in:
2025-09-13 14:23:01 +02:00
parent 02b1b6f62f
commit 181bd9cfa4
4 changed files with 798 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ module.exports = (sequelize) => {
// Authentication Configuration
auth_provider: {
type: DataTypes.ENUM('local', 'saml', 'oauth', 'ldap', 'custom_sso'),
type: DataTypes.ENUM('local', 'saml', 'oauth', 'ldap', 'ad', 'custom_sso'),
defaultValue: 'local',
comment: 'Primary authentication provider'
},
@@ -137,6 +137,32 @@ module.exports = (sequelize) => {
comment: 'Additional tenant metadata'
},
// Session Configuration
session_timeout: {
type: DataTypes.INTEGER,
defaultValue: 480, // 8 hours in minutes
validate: {
min: 15, // Minimum 15 minutes
max: 1440 // Maximum 24 hours
},
comment: 'Session timeout in minutes'
},
require_mfa: {
type: DataTypes.BOOLEAN,
defaultValue: false,
comment: 'Whether multi-factor authentication is required'
},
allow_concurrent_sessions: {
type: DataTypes.BOOLEAN,
defaultValue: true,
comment: 'Whether users can have multiple concurrent sessions'
},
role_mappings: {
type: DataTypes.JSONB,
allowNull: true,
comment: 'Mapping of external groups/attributes to system roles'
},
created_at: {
type: DataTypes.DATE,
defaultValue: DataTypes.NOW