Skip to content

refactor: reorg samples #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ The monorepo for Logto SDKs written in C#.

## Contents

### Packages

- [src/Logto.AspNetCore.Authentication](./src/Logto.AspNetCore.Authentication): ASP.NET Core authentication middleware for Logto.
- [src/Logto.AspNetCore.Authentication.Tests](./src/Logto.AspNetCore.Authentication.Tests): Tests for the ASP.NET Core authentication middleware.
- [sample](./sample): Sample ASP.NET Core web application that shows how to use the ASP.NET Core authentication middleware.
- [sample-mvc](./sample-mvc): Sample ASP.NET Core web MVC application that shows how to use the ASP.NET Core authentication middleware.
- [sample-wasm](./sample-wasm): Sample Blazor WebAssembly application that shows how to use Blorc.OpenIdConnect to authenticate users with Logto.

### Samples

- [sample](./samples/sample): Sample ASP.NET Core web application that shows how to use the ASP.NET Core authentication middleware.
- [sample-mvc](./samples/sample-mvc): Sample ASP.NET Core web MVC application that shows how to use the ASP.NET Core authentication middleware.
- [sample-wasm](./samples/sample-wasm): Sample Blazor WebAssembly application that shows how to use Blorc.OpenIdConnect to authenticate users with Logto.
- [sample-blazor](./samples/sample-blazor): Sample Blazor Server application that shows how to use the ASP.NET Core authentication middleware.

## Resources

Expand Down
42 changes: 27 additions & 15 deletions logto-csharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logto.AspNetCore.Authentica
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logto.AspNetCore.Authentication.Tests", "src\Logto.AspNetCore.Authentication.Tests\Logto.AspNetCore.Authentication.Tests.csproj", "{0A3281B7-4673-4FCC-A138-E72E92DCD57D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "logto-csharp-sample", "sample\logto-csharp-sample.csproj", "{63F09EFF-03EB-4A80-BC46-1F40CCF4CD2D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E138A45B-E985-4364-AA8A-86467AEE5693}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sample-mvc", "sample-mvc\sample-mvc.csproj", "{2C4D9EC2-8697-4217-82E8-953835F990CA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sample-blazor", "samples\sample-blazor\sample-blazor.csproj", "{8B6A343E-7691-468E-89D0-7A3EFACAADC1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sample-wasm", "sample-wasm\sample-wasm.csproj", "{A4D02F83-0AF6-4886-9DDC-D0E109780CD4}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sample-mvc", "samples\sample-mvc\sample-mvc.csproj", "{64A4D492-3ABB-410C-AE0D-6F9A8881B100}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sample-wasm", "samples\sample-wasm\sample-wasm.csproj", "{CFF04115-513A-4A6F-BA07-C45EC28BDB63}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sample", "samples\sample\sample.csproj", "{72761E5E-12B5-4FB8-AE83-77AEEE38D864}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -32,21 +36,29 @@ Global
{0A3281B7-4673-4FCC-A138-E72E92DCD57D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A3281B7-4673-4FCC-A138-E72E92DCD57D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A3281B7-4673-4FCC-A138-E72E92DCD57D}.Release|Any CPU.Build.0 = Release|Any CPU
{63F09EFF-03EB-4A80-BC46-1F40CCF4CD2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63F09EFF-03EB-4A80-BC46-1F40CCF4CD2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63F09EFF-03EB-4A80-BC46-1F40CCF4CD2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63F09EFF-03EB-4A80-BC46-1F40CCF4CD2D}.Release|Any CPU.Build.0 = Release|Any CPU
{2C4D9EC2-8697-4217-82E8-953835F990CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C4D9EC2-8697-4217-82E8-953835F990CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C4D9EC2-8697-4217-82E8-953835F990CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C4D9EC2-8697-4217-82E8-953835F990CA}.Release|Any CPU.Build.0 = Release|Any CPU
{A4D02F83-0AF6-4886-9DDC-D0E109780CD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4D02F83-0AF6-4886-9DDC-D0E109780CD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4D02F83-0AF6-4886-9DDC-D0E109780CD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4D02F83-0AF6-4886-9DDC-D0E109780CD4}.Release|Any CPU.Build.0 = Release|Any CPU
{8B6A343E-7691-468E-89D0-7A3EFACAADC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B6A343E-7691-468E-89D0-7A3EFACAADC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B6A343E-7691-468E-89D0-7A3EFACAADC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B6A343E-7691-468E-89D0-7A3EFACAADC1}.Release|Any CPU.Build.0 = Release|Any CPU
{64A4D492-3ABB-410C-AE0D-6F9A8881B100}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64A4D492-3ABB-410C-AE0D-6F9A8881B100}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64A4D492-3ABB-410C-AE0D-6F9A8881B100}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64A4D492-3ABB-410C-AE0D-6F9A8881B100}.Release|Any CPU.Build.0 = Release|Any CPU
{CFF04115-513A-4A6F-BA07-C45EC28BDB63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFF04115-513A-4A6F-BA07-C45EC28BDB63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFF04115-513A-4A6F-BA07-C45EC28BDB63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFF04115-513A-4A6F-BA07-C45EC28BDB63}.Release|Any CPU.Build.0 = Release|Any CPU
{72761E5E-12B5-4FB8-AE83-77AEEE38D864}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72761E5E-12B5-4FB8-AE83-77AEEE38D864}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72761E5E-12B5-4FB8-AE83-77AEEE38D864}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72761E5E-12B5-4FB8-AE83-77AEEE38D864}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D05B1B5F-D560-492A-A566-95888C8C5C43} = {D44D6C8F-1A29-4796-930F-B37ADB539EA3}
{0A3281B7-4673-4FCC-A138-E72E92DCD57D} = {D44D6C8F-1A29-4796-930F-B37ADB539EA3}
{8B6A343E-7691-468E-89D0-7A3EFACAADC1} = {E138A45B-E985-4364-AA8A-86467AEE5693}
{64A4D492-3ABB-410C-AE0D-6F9A8881B100} = {E138A45B-E985-4364-AA8A-86467AEE5693}
{CFF04115-513A-4A6F-BA07-C45EC28BDB63} = {E138A45B-E985-4364-AA8A-86467AEE5693}
{72761E5E-12B5-4FB8-AE83-77AEEE38D864} = {E138A45B-E985-4364-AA8A-86467AEE5693}
EndGlobalSection
EndGlobal
3 changes: 0 additions & 3 deletions sample/Pages/_ViewImports.cshtml

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<ItemGroup>
<ProjectReference Include="..\src\Logto.AspNetCore.Authentication\Logto.AspNetCore.Authentication.csproj" />
<ProjectReference Include="..\..\src\Logto.AspNetCore.Authentication\Logto.AspNetCore.Authentication.csproj" />
</ItemGroup>

<PropertyGroup>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<ItemGroup>
<ProjectReference Include="..\src\Logto.AspNetCore.Authentication\Logto.AspNetCore.Authentication.csproj" />
<ItemGroup>
<ProjectReference Include="..\..\src\Logto.AspNetCore.Authentication\Logto.AspNetCore.Authentication.csproj" />
</ItemGroup>

<PropertyGroup>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace logto_csharp_sample.Pages;
namespace sample.Pages;

[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace logto_csharp_sample.Pages;
namespace sample.Pages;

public class IndexModel : PageModel
{
Expand Down
3 changes: 3 additions & 0 deletions samples/sample/Pages/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@using sample
@namespace sample.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"profiles": {
"logto_csharp_sample": {
"sample": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>logto_csharp_sample</RootNamespace>
<RootNamespace>sample</RootNamespace>
<IsPackable>false</IsPackable>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>

<ItemGroup>
<ProjectReference
Include="..\src\Logto.AspNetCore.Authentication\Logto.AspNetCore.Authentication.csproj" />
Include="..\..\src\Logto.AspNetCore.Authentication\Logto.AspNetCore.Authentication.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.