Rearranged repo to make room for additional projects

This commit is contained in:
Cameron
2024-09-07 20:31:54 -05:00
parent 7479dbf8f8
commit 0082a6f219
50 changed files with 92 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
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;
}
}