From 76d5dcb82f2b6b5ee6a1169b1cfcd1b91bda7a4c Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 26 Jul 2024 22:38:28 -0500 Subject: [PATCH] Fix user_name. --- .../BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs | 2 +- src/Infrastructure/BotSharp.Core/Users/Services/UserIdentity.cs | 2 +- .../BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs index d956834a..dcbe66f7 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs @@ -12,6 +12,6 @@ public class PageActionArgs public string Url { get; set; } = null!; public bool OpenNewTab { get; set; } = false; - public bool WaitForNetworkIdle = true; + public bool WaitForNetworkIdle { get; set; } = true; public float? Timeout { get; set; } } diff --git a/src/Infrastructure/BotSharp.Core/Users/Services/UserIdentity.cs b/src/Infrastructure/BotSharp.Core/Users/Services/UserIdentity.cs index e289e1bc..a8eaac5e 100644 --- a/src/Infrastructure/BotSharp.Core/Users/Services/UserIdentity.cs +++ b/src/Infrastructure/BotSharp.Core/Users/Services/UserIdentity.cs @@ -20,7 +20,7 @@ public class UserIdentity : IUserIdentity [JsonPropertyName("user_name")] public string UserName - => _claims?.FirstOrDefault(x => x.Type == "name")?.Value!; + => _claims?.FirstOrDefault(x => x.Type == ClaimTypes.Name)?.Value!; public string Email => _claims?.FirstOrDefault(x => x.Type == ClaimTypes.Email)?.Value!; diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj b/src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj index 892c3ca9..fcaac28e 100644 --- a/src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj +++ b/src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj @@ -17,7 +17,7 @@ - +