mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: add ServeDebugAppRequestHandler for serving debug app assets and improve error handling in LoginRequestHandler
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
9ea5ec5d1a
commit
ee240ca378
6 changed files with 288 additions and 36 deletions
|
|
@ -71,14 +71,17 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
|||
{
|
||||
context.Response.StatusCode = 401;
|
||||
context.Response.StatusDescription = "Bad Request";
|
||||
context.Response.StatusDescription = "Unauthorized";
|
||||
context.Response.ContentType = "application/json";
|
||||
context.Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
context.Response.Write(JsonConvert.SerializeObject(new { Error = "Unauthorized" }, Formatting.Indented), false);
|
||||
context.Response.End();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!token.Valid)
|
||||
{
|
||||
context.Response.StatusCode = 401;
|
||||
{
|
||||
context.Response.StatusCode = 401;
|
||||
context.Response.StatusDescription = "Unauthorized";
|
||||
context.Response.End();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue