Replace custom socket implementation with SignalR.

Replace MSAL and custom cookie auth with Microsoft.Identity.EntityFramework
Also some UI redesign to accommodate different login experience.
This commit is contained in:
2024-08-25 03:46:44 +00:00
parent d688afaeae
commit 51d234d871
172 changed files with 3857 additions and 4045 deletions

View File

@@ -1,9 +1,20 @@
namespace Shogi.Contracts.Types;
using System;
namespace Shogi.Contracts.Types;
public class Session
{
public User Player1 { get; set; }
public User? Player2 { get; set; }
public string SessionName { get; set; }
/// <summary>
/// Email
/// </summary>
public string Player1 { get; set; }
/// <summary>
/// Email. Null if no second player exists.
/// </summary>
public string? Player2 { get; set; }
public Guid SessionId { get; set; }
public BoardState BoardState { get; set; }
}

View File

@@ -1,8 +1,11 @@
namespace Shogi.Contracts.Types
using System;
namespace Shogi.Contracts.Types
{
public class SessionMetadata
{
public string Name { get; set; }
public int PlayerCount { get; set; }
}
public class SessionMetadata
{
public Guid SessionId { get; set; }
public string Player1 { get; set; } = string.Empty;
public string Player2 { get; set; } = string.Empty;
}
}

View File

@@ -1,9 +0,0 @@
namespace Shogi.Contracts.Types
{
public enum SocketAction
{
SessionCreated,
SessionJoined,
PieceMoved
}
}

View File

@@ -1,17 +0,0 @@
namespace Shogi.Contracts.Types;
public class User
{
public string Id { get; set; } = string.Empty;
/// <summary>
/// A display name for the user.
/// </summary>
public string Name { get; set; } = string.Empty;
public User(string id, string name)
{
Id = id;
Name = name;
}
}