This commit is contained in:
2022-06-20 23:54:52 +00:00
parent 0526dab167
commit 5b2f190bbf
2 changed files with 4 additions and 6 deletions

View File

@@ -91,7 +91,6 @@ namespace AyaNovaQBI
AyaNovaUserName: {util.AyaNovaUserName}\r\n
JWT: {util.JWT}\r\n
AyaNovaUserId: {util.AyaNovaUserId}\r\n
AyaNovaUserTranslationId: {util.AyaNovaUserTranslationId}\r\n
AyaNovaUserRoles: {util.AyaNovaUserRoles}\r\n
AyaNovaUserType: {util.AyaNovaUserType}");

View File

@@ -25,8 +25,8 @@ namespace AyaNovaQBI
internal static string GuessClientUrl { get; set; }
internal static string JWT { get; set; }
internal static long AyaNovaUserId { get; set; }
internal static long AyaNovaUserTranslationId { get; set; }
// internal static long AyaNovaUserId { get; set; } //probably don't need this, if I do then some code will need to be added to decode the JWT or at the server to get my currently logged in USER ID
internal static string AyaNovaUserName { get; set; }
internal static AuthorizationRoles AyaNovaUserRoles { get; set; }
internal static UserType AyaNovaUserType { get; set; }
@@ -162,9 +162,8 @@ namespace AyaNovaQBI
throw new Exception("Server login from QBI is disabled due to AyaNova license issue");
}
JWT = a.ObjectResponse["data"]["token"].Value<string>();
// AyaNovaUserId= a.ObjectResponse["data"]["id"].Value<long>();//nbot here maybe in jwt
//AyaNovaUserTranslationId = a.ObjectResponse["data"]["tid"].Value<long>();
JWT = a.ObjectResponse["data"]["token"].Value<string>();
AyaNovaUserName = a.ObjectResponse["data"]["name"].Value<string>();
AyaNovaUserRoles = (AuthorizationRoles)(int.Parse(a.ObjectResponse["data"]["roles"].Value<string>()));
AyaNovaUserType = (UserType)(int.Parse(a.ObjectResponse["data"]["usertype"].Value<string>()));