Abstraction of authenticators. Reworked Gmail authentication.
This commit is contained in:
@@ -96,7 +96,7 @@ namespace Wino
|
||||
services.AddSingleton<IMailDialogService, DialogService>();
|
||||
services.AddTransient<ISettingsBuilderService, SettingsBuilderService>();
|
||||
services.AddTransient<IProviderService, ProviderService>();
|
||||
|
||||
services.AddSingleton<IAuthenticatorConfig, MailAuthenticatorConfiguration>();
|
||||
}
|
||||
|
||||
private void RegisterViewModels(IServiceCollection services)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="Wino.App">
|
||||
EntryPoint="Wino.Mail.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="Wino Mail"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
|
||||
29
Wino.Mail/Services/MailAuthenticatorConfiguration.cs
Normal file
29
Wino.Mail/Services/MailAuthenticatorConfiguration.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Services
|
||||
{
|
||||
public class MailAuthenticatorConfiguration : IAuthenticatorConfig
|
||||
{
|
||||
public string OutlookAuthenticatorClientId => "b19c2035-d740-49ff-b297-de6ec561b208";
|
||||
|
||||
public string[] OutlookScope => new string[]
|
||||
{
|
||||
"email",
|
||||
"mail.readwrite",
|
||||
"offline_access",
|
||||
"mail.send",
|
||||
"Mail.Send.Shared",
|
||||
"Mail.ReadWrite.Shared",
|
||||
"User.Read"
|
||||
};
|
||||
|
||||
public string GmailAuthenticatorClientId => "973025879644-s7b4ur9p3rlgop6a22u7iuptdc0brnrn.apps.googleusercontent.com";
|
||||
|
||||
public string[] GmailScope => new string[]
|
||||
{
|
||||
"https://mail.google.com/",
|
||||
"https://www.googleapis.com/auth/userinfo.profile",
|
||||
"https://www.googleapis.com/auth/gmail.labels"
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,8 @@
|
||||
<ProjectGuid>{68A432B8-C1B7-494C-8D6D-230788EA683E}</ProjectGuid>
|
||||
<OutputType>AppContainerExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Wino</RootNamespace>
|
||||
<AssemblyName>Wino</AssemblyName>
|
||||
<RootNamespace>Wino.Mail</RootNamespace>
|
||||
<AssemblyName>Wino.Mail</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
|
||||
@@ -259,6 +259,7 @@
|
||||
<Compile Include="Selectors\MailItemDisplayModePreviewTemplateSelector.cs" />
|
||||
<Compile Include="Selectors\MailItemDisplaySelector.cs" />
|
||||
<Compile Include="Services\DialogService.cs" />
|
||||
<Compile Include="Services\MailAuthenticatorConfiguration.cs" />
|
||||
<Compile Include="Services\NavigationService.cs" />
|
||||
<Compile Include="Services\ProviderService.cs" />
|
||||
<Compile Include="Services\SettingsBuilderService.cs" />
|
||||
@@ -565,7 +566,6 @@
|
||||
<Content Include="JS\editor.html" />
|
||||
<Content Include="JS\editor.js" />
|
||||
<Content Include="JS\global.css" />
|
||||
<Content Include="Assets\WinoIcons.ttf" />
|
||||
<Content Include="JS\libs\jodit.min.css" />
|
||||
<Content Include="JS\libs\jodit.min.js" />
|
||||
<Content Include="JS\reader.html" />
|
||||
@@ -623,9 +623,7 @@
|
||||
<Name>Windows Desktop Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Helpers\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user