logger)
- {
- _logger = logger;
- }
-
- [HttpGet("todos")]
- public IActionResult GetAll()
- {
- _logger.LogInformation("GetAll");
-
- return Ok(__data.AsEnumerable());
- }
-
- [HttpGet("todos/{id}")]
- public IActionResult Get(int id)
- {
- var item = __data.FirstOrDefault(x => x.Id == id);
- if (item == null) return NotFound();
-
- _logger.LogInformation("Get {id}", id);
- return Ok(item);
- }
-
- [HttpPost("todos")]
- public IActionResult Post([FromBody] ToDo model)
- {
- model.Id = ToDo.NewId();
- model.User = $"{User.FindFirst("sub").Value} ({User.FindFirst("name").Value})";
-
- __data.Add(model);
- _logger.LogInformation("Add {name}", model.Name);
-
- return Created(Url.Action(nameof(Get), new { id = model.Id }), model);
- }
-
- [HttpPut("todos/{id}")]
- public IActionResult Put(int id, ToDo model)
- {
- var item = __data.FirstOrDefault(x => x.Id == id);
- if (item == null) return NotFound();
-
- item.Date = model.Date;
- item.Name = model.Name;
-
- _logger.LogInformation("Update {name}", model.Name);
-
- return NoContent();
- }
-
- [HttpDelete("todos/{id}")]
- public IActionResult Delete(int id)
- {
- var item = __data.FirstOrDefault(x => x.Id == id);
- if (item == null) return NotFound();
-
- __data.Remove(item);
- _logger.LogInformation("Delete {id}", id);
-
- return NoContent();
- }
-}
-
-public class ToDo
-{
- static int _nextId = 1;
- public static int NewId()
- {
- return _nextId++;
- }
-
- public int Id { get; set; }
- public DateTimeOffset Date { get; set; }
- public string Name { get; set; }
- public string User { get; set; }
-}
diff --git a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/FrontendHost.csproj b/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/FrontendHost.csproj
deleted file mode 100644
index 8ec9905e..00000000
--- a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/FrontendHost.csproj
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- net6.0
- enable
- false
- ClientApp\
- https://localhost:44451
- npm start
- enable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- wwwroot\%(RecursiveDir)%(FileName)%(Extension)
- PreserveNewest
- true
-
-
-
-
diff --git a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/Error.cshtml b/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/Error.cshtml
deleted file mode 100644
index 6f92b956..00000000
--- a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/Error.cshtml
+++ /dev/null
@@ -1,26 +0,0 @@
-@page
-@model ErrorModel
-@{
- ViewData["Title"] = "Error";
-}
-
-Error.
-An error occurred while processing your request.
-
-@if (Model.ShowRequestId)
-{
-
- Request ID: @Model.RequestId
-
-}
-
-Development Mode
-
- Swapping to the Development environment displays detailed information about the error that occurred.
-
-
- The Development environment shouldn't be enabled for deployed applications.
- It can result in displaying sensitive information from exceptions to end users.
- For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
- and restarting the app.
-
diff --git a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/Error.cshtml.cs b/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/Error.cshtml.cs
deleted file mode 100644
index 7219af57..00000000
--- a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/Error.cshtml.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.RazorPages;
-using System.Diagnostics;
-
-namespace FrontendHost.Pages
-{
- [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
- public class ErrorModel : PageModel
- {
- private readonly ILogger _logger;
-
- public ErrorModel(ILogger logger)
- {
- _logger = logger;
- }
-
- public string? RequestId { get; set; }
-
- public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
-
- public void OnGet()
- {
- RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
- }
- }
-}
\ No newline at end of file
diff --git a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/_ViewImports.cshtml b/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/_ViewImports.cshtml
deleted file mode 100644
index 84af37d6..00000000
--- a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Pages/_ViewImports.cshtml
+++ /dev/null
@@ -1,3 +0,0 @@
-@using FrontendHost
-@namespace FrontendHost.Pages
-@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
diff --git a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Properties/launchSettings.json b/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Properties/launchSettings.json
deleted file mode 100644
index fce557d9..00000000
--- a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/Properties/launchSettings.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:6875",
- "sslPort": 44384
- }
- },
- "profiles": {
- "FrontendHost": {
- "commandName": "Project",
- "launchBrowser": true,
- "applicationUrl": "https://localhost:7237;http://localhost:5241",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development",
- "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
- }
- },
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development",
- "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
- }
- }
- }
-}
diff --git a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/appsettings.Development.json b/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/appsettings.Development.json
deleted file mode 100644
index 84308c97..00000000
--- a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/appsettings.Development.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.AspNetCore.SpaProxy": "Information",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- }
-}
diff --git a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/appsettings.json b/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/appsettings.json
deleted file mode 100644
index ad75fee4..00000000
--- a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/appsettings.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
-"AllowedHosts": "*"
-}
diff --git a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/wwwroot/favicon.ico b/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/wwwroot/favicon.ico
deleted file mode 100644
index 63e859b4..00000000
Binary files a/IdentityServer/v7/BFF/AngularBffSample/src/FrontendHost/wwwroot/favicon.ico and /dev/null differ