Minor fixes

This commit is contained in:
2025-03-04 00:55:30 +01:00
parent f73fe748ed
commit 78911eb877
2 changed files with 5 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ public class CryptUtils
private readonly string secretKey; private readonly string secretKey;
private const int M = 16; private const int M = 16;
private const int N = 32; private const int N = 32;
private readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
public CryptUtils(AppSettings appSettings) public CryptUtils(AppSettings appSettings)
{ {
secretKey = appSettings.EncryptionSettings?.Salt ?? String.Empty; secretKey = appSettings.EncryptionSettings?.Salt ?? String.Empty;

View File

@@ -62,8 +62,8 @@ public class JwtTokenUtils
return guid; return guid;
} }
string[]? authorizations = headerAuthorization.Split(" "); string[] authorizations = headerAuthorization.Split(" ");
if (authorizations != null && authorizations.Length == 2) if (authorizations.Length == 2)
{ {
token = authorizations[1]; token = authorizations[1];
} }
@@ -97,8 +97,9 @@ public class JwtTokenUtils
} }
} }
} }
catch catch(Exception exception)
{ {
Logger.Error($"[JwtTokenUtils][ValidateToken] | {exception.Message}");
return guid; return guid;
} }
} }