Skip to content

Commit df07ab1

Browse files
committed
Cleaned up test hosts
1 parent d64e231 commit df07ab1

27 files changed

Lines changed: 98 additions & 68 deletions

IdentityManager2.sln

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{21035206-B37
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityManager2", "src\IdentityManager2\IdentityManager2.csproj", "{E4718661-6384-4378-82C3-56D66F6E060F}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Host", "src\Host\Host.csproj", "{D024CAF4-4371-45C5-9728-D06B462CD4B3}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hosts.LosthostAuthentication", "src\Hosts\Hosts.LosthostAuthentication\Hosts.LosthostAuthentication.csproj", "{D024CAF4-4371-45C5-9728-D06B462CD4B3}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HostWithLocalAuth", "src\HostWithLocalAuth\HostWithLocalAuth.csproj", "{20FEF10D-D003-48A7-A931-4DEB80796E08}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hosts.CookieAuthentication", "src\Hosts\Hosts.CookieAuthentication\Hosts.CookieAuthentication.csproj", "{20FEF10D-D003-48A7-A931-4DEB80796E08}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hosts.Shared", "src\Hosts.Shared\Hosts.Shared.csproj", "{BE7A2243-B7D0-4D32-92F6-0DD4C8DA8208}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hosts.Shared", "src\Hosts\Hosts.Shared\Hosts.Shared.csproj", "{BE7A2243-B7D0-4D32-92F6-0DD4C8DA8208}"
15+
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hosts", "Hosts", "{59FA21EB-3472-4E3D-BDF0-AD32DCFA6035}"
1517
EndProject
1618
Global
1719
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -41,9 +43,10 @@ Global
4143
EndGlobalSection
4244
GlobalSection(NestedProjects) = preSolution
4345
{E4718661-6384-4378-82C3-56D66F6E060F} = {21035206-B373-4994-901B-2C9E882B5852}
44-
{D024CAF4-4371-45C5-9728-D06B462CD4B3} = {21035206-B373-4994-901B-2C9E882B5852}
45-
{20FEF10D-D003-48A7-A931-4DEB80796E08} = {21035206-B373-4994-901B-2C9E882B5852}
46-
{BE7A2243-B7D0-4D32-92F6-0DD4C8DA8208} = {21035206-B373-4994-901B-2C9E882B5852}
46+
{D024CAF4-4371-45C5-9728-D06B462CD4B3} = {59FA21EB-3472-4E3D-BDF0-AD32DCFA6035}
47+
{20FEF10D-D003-48A7-A931-4DEB80796E08} = {59FA21EB-3472-4E3D-BDF0-AD32DCFA6035}
48+
{BE7A2243-B7D0-4D32-92F6-0DD4C8DA8208} = {59FA21EB-3472-4E3D-BDF0-AD32DCFA6035}
49+
{59FA21EB-3472-4E3D-BDF0-AD32DCFA6035} = {21035206-B373-4994-901B-2C9E882B5852}
4750
EndGlobalSection
4851
GlobalSection(ExtensibilityGlobals) = postSolution
4952
SolutionGuid = {22A3DD5E-832A-4FFC-B0B9-1A3D07313154}

src/Host/Program.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/HostWithLocalAuth/Views/Login/Login.cshtml

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/HostWithLocalAuth/Controllers/LoginController.cs renamed to src/Hosts/Hosts.CookieAuthentication/Controllers/LoginController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Microsoft.AspNetCore.Authentication;
99
using Microsoft.AspNetCore.Mvc;
1010

11-
namespace HostWithLocalAuth
11+
namespace Hosts.CookieAuthentication
1212
{
1313
public class LoginController : Controller
1414
{

src/Host/Host.csproj renamed to src/Hosts/Hosts.CookieAuthentication/Hosts.CookieAuthentication.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
<ItemGroup>
88
<ProjectReference Include="..\Hosts.Shared\Hosts.Shared.csproj" />
9-
<ProjectReference Include="..\IdentityManager2\IdentityManager2.csproj" />
109
</ItemGroup>
10+
1111
</Project>
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Microsoft.AspNetCore.Hosting;
22
using Microsoft.Extensions.Hosting;
33

4-
namespace HostWithLocalAuth
4+
namespace Hosts.CookieAuthentication
55
{
66
public class Program
77
{
@@ -11,10 +11,6 @@ public static void Main(string[] args)
1111
}
1212

1313
public static IHostBuilder CreateHostBuilder(string[] args) =>
14-
Host.CreateDefaultBuilder(args)
15-
.ConfigureWebHostDefaults(webBuilder =>
16-
{
17-
webBuilder.UseStartup<Startup>();
18-
});
14+
Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());
1915
}
2016
}

src/HostWithLocalAuth/Properties/launchSettings.json renamed to src/Hosts/Hosts.CookieAuthentication/Properties/launchSettings.json

File renamed without changes.

src/HostWithLocalAuth/Startup.cs renamed to src/Hosts/Hosts.CookieAuthentication/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Microsoft.Extensions.DependencyInjection;
77
using Microsoft.Extensions.FileProviders;
88

9-
namespace HostWithLocalAuth
9+
namespace Hosts.CookieAuthentication
1010
{
1111
public class Startup
1212
{
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@model Hosts.CookieAuthentication.LoginModel
2+
3+
@{
4+
ViewBag.Title = "Login";
5+
}
6+
7+
<div class="row pt-3">
8+
<div class="col-12">
9+
<h1 class="h2">Login using Local Cookie <small class="text-muted">"cookie" scheme</small></h1>
10+
<div class="row">
11+
<div class="col-lg-8">
12+
<form asp-action="Login" method="post">
13+
<input asp-for="ReturnUrl" type="hidden"/>
14+
<div class="form-group">
15+
<label asp-for="Username"></label>
16+
<input asp-for="Username" class="form-control" required />
17+
</div>
18+
<div class="form-group">
19+
<label asp-for="Password"></label>
20+
<input asp-for="Password" class="form-control" required type="password" />
21+
</div>
22+
<button class="btn btn-primary" type="submit">Submit</button>
23+
</form>
24+
</div>
25+
<div class="col-lg-4">
26+
<div class="alert alert-info text-break">
27+
<p>
28+
Authorized IdentityManager users:
29+
</p>
30+
<ul>
31+
<li>alice:alice</li>
32+
<li>bob:bob</li>
33+
<li><em>any other user with the IdentityManagerAdministrator role</em></li>
34+
</ul>
35+
</div>
36+
</div>
37+
</div>
38+
</div>
39+
</div>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<title>@ViewBag.Title</title>
7+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
8+
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
9+
</head>
10+
<body>
11+
<div class="container">
12+
@RenderBody()
13+
</div>
14+
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
15+
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
16+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)