Skip to content

Commit

Permalink
chore: move files to Eppie.App.Shared (#361)
Browse files Browse the repository at this point in the history
Move Authorization folder

References: #347
  • Loading branch information
al-kau authored Oct 2, 2024
1 parent 3807fdc commit 792436a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if (!HAS_UNO)
#if WINDOWS_UWP

using System;
using Finebits.Authorization.OAuth2.Google;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Finebits.Authorization.OAuth2.Abstractions;
using Finebits.Authorization.OAuth2.AuthenticationBroker;
Expand Down Expand Up @@ -26,15 +26,17 @@ private static IAuthenticationBroker GetAuthenticationBroker()
{
#if (__ANDROID__ || __IOS__)
throw new NotImplementedException();
#elif WINDOWS_UWP
return new WindowsAuthenticationBroker();
#elif (HAS_UNO) // macOS; Skia.Gtk; Wasm;
if (!DesktopAuthenticationBroker.IsSupported)
{
throw new InvalidOperationException("DesktopAuthenticationBroker is not supported");
}

return new DesktopAuthenticationBroker(new WebBrowserLauncher());
#else // UWP;
return new WindowsAuthenticationBroker();
#else // Unknown
throw new NotImplementedException();
#endif
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if (!HAS_UNO)
#if WINDOWS_UWP

using System;
using System.Threading;
Expand Down
3 changes: 3 additions & 0 deletions source/Eppie.App/Eppie.App.Shared/Eppie.App.Shared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Authorization\AuthConfig.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Authorization\AuthConfig.UWP.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Authorization\WindowsAuthenticationBroker.UWP.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IncrementalLoading\IncrementalLoadingCollection.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Common\UITools.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\ElementHierarchyTools.cs" />
Expand Down
4 changes: 4 additions & 0 deletions source/Eppie.App/Eppie.App.UWP/Eppie.App.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@
<Project>{2da63e2a-a0ac-4c55-b912-04d8970bced3}</Project>
<Name>Eppie.App.ViewModels</Name>
</ProjectReference>
<ProjectReference Include="..\Eppie.Authorization.OAuth2\Eppie.Authorization.OAuth2.csproj">
<Project>{b2128895-1cb6-4dcd-bd31-d0b561029f4f}</Project>
<Name>Eppie.Authorization.OAuth2</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\Eppie.App.Shared\Eppie.App.Shared.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
1 change: 1 addition & 0 deletions source/Eppie.App/Eppie.App/Eppie.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<ProjectReference Include="..\..\..\gitmodules\TuviPgpLib\TuviPgpLib\TuviPgpLib.csproj" />
<ProjectReference Include="..\Eppie.App.Converters\Eppie.App.Converters.Uno\Eppie.App.Converters.Uno.csproj" />
<ProjectReference Include="..\Eppie.App.ViewModels\Eppie.App.ViewModels.csproj" />
<ProjectReference Include="..\Eppie.Authorization.OAuth2\Eppie.Authorization.OAuth2.csproj" />
</ItemGroup>

<Import Project="..\Eppie.App.Shared\Eppie.App.Shared.projitems" Label="Shared" />
Expand Down

0 comments on commit 792436a

Please sign in to comment.