feat(admin): restore Blazor WebAssembly architecture for admin pages with hybrid Server routing
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m40s

This commit is contained in:
2026-07-01 11:21:10 +09:00
parent 62ce89359a
commit 2a046d0393
30 changed files with 168 additions and 10 deletions
@@ -0,0 +1,39 @@
namespace TaxBaik.Web.Services;
/// <summary>
/// Scoped in-memory token store for Blazor Server.
/// SOLID: Single Responsibility - Token lifecycle management
/// Avoids JS interop from DelegatingHandler (which runs on non-circuit thread)
/// </summary>
public interface ITokenStore
{
string? AccessToken { get; set; }
string? RefreshToken { get; set; }
long? TokenExpiryTicks { get; set; }
bool IsAccessTokenExpired();
void Clear();
}
public class TokenStore : ITokenStore
{
public string? AccessToken { get; set; }
public string? RefreshToken { get; set; }
public long? TokenExpiryTicks { get; set; }
public bool IsAccessTokenExpired()
{
if (TokenExpiryTicks == null)
return true;
var expiryTime = new DateTime(TokenExpiryTicks.Value, DateTimeKind.Utc);
return expiryTime <= DateTime.UtcNow;
}
public void Clear()
{
AccessToken = null;
RefreshToken = null;
TokenExpiryTicks = null;
}
}