Minor fixes
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user