feat: implement security enhancements for Jitsi integration, including JWT token generation and automatic blocking of detected attacks, improving system resilience and user authentication
This commit is contained in:
@@ -214,3 +214,19 @@ export async function decryptSMTPPassword(encryptedPassword: string): Promise<st
|
||||
throw new Error('Falha ao descriptografar senha SMTP');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Criptografa um JWT secret usando AES-GCM (mesma lógica de SMTP password)
|
||||
*/
|
||||
export async function encryptJWTSecret(secret: string): Promise<string> {
|
||||
// Reutilizar a mesma função de criptografia de SMTP password
|
||||
return encryptSMTPPassword(secret);
|
||||
}
|
||||
|
||||
/**
|
||||
* Descriptografa um JWT secret usando AES-GCM (mesma lógica de SMTP password)
|
||||
*/
|
||||
export async function decryptJWTSecret(encryptedSecret: string): Promise<string> {
|
||||
// Reutilizar a mesma função de descriptografia de SMTP password
|
||||
return decryptSMTPPassword(encryptedSecret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user