v1.0 release

This commit is contained in:
Cameron
2024-08-27 03:29:38 -05:00
parent a4403ce17b
commit ef7c3f9dbd
38 changed files with 1172 additions and 73 deletions

View File

@@ -0,0 +1,33 @@
using ComiServ.Entities;
namespace ComiServ.Services
{
public interface IAuthenticationService
{
public bool Tested { get; }
public User? User { get; }
public void Authenticate(User user);
public void FailAuth();
}
//acts as a per-request container of authentication info
public class AuthenticationService : IAuthenticationService
{
public bool Tested { get; private set; } = false;
public User? User { get; private set; }
public AuthenticationService()
{
}
public void Authenticate(User user)
{
User = user;
Tested = true;
}
public void FailAuth()
{
User = null;
Tested = true;
}
}
}