Abstraction of authenticators. Reworked Gmail authentication.
This commit is contained in:
@@ -83,6 +83,19 @@ namespace Wino.Server
|
||||
|
||||
services.AddSingleton<IServerMessageHandlerFactory>(serverMessageHandlerFactory);
|
||||
|
||||
// Server type related services.
|
||||
// TODO: Better abstraction.
|
||||
|
||||
if (WinoServerType == WinoAppType.Mail)
|
||||
{
|
||||
services.AddSingleton<IAuthenticatorConfig, MailAuthenticatorConfiguration>();
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Calendar config will be added here.
|
||||
}
|
||||
|
||||
|
||||
return services.BuildServiceProvider();
|
||||
}
|
||||
|
||||
@@ -135,6 +148,8 @@ namespace Wino.Server
|
||||
{
|
||||
string processName = WinoServerType == WinoAppType.Mail ? "Wino.Mail" : "Wino.Calendar";
|
||||
|
||||
var processs = Process.GetProcesses();
|
||||
|
||||
var proc = Process.GetProcessesByName(processName).FirstOrDefault() ?? throw new Exception($"{processName} client is not running.");
|
||||
|
||||
for (IntPtr appWindow = FindWindowEx(IntPtr.Zero, IntPtr.Zero, FRAME_WINDOW, null); appWindow != IntPtr.Zero;
|
||||
|
||||
Reference in New Issue
Block a user