mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-21 09:11:20 +00:00
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
28 lines
1.1 KiB
C#
Executable file
28 lines
1.1 KiB
C#
Executable file
using FSO.Server.Database.DA.Utils;
|
|
using System.Collections.Generic;
|
|
|
|
namespace FSO.Server.Database.DA.Users
|
|
{
|
|
public interface IUsers
|
|
{
|
|
User GetById(uint id);
|
|
List<User> GetByRegisterIP(string ip);
|
|
void UpdateConnectIP(uint id, string ip);
|
|
void UpdateBanned(uint id, bool banned);
|
|
void UpdateClientID(uint id, string cid);
|
|
User GetByUsername(string username);
|
|
UserAuthenticate GetAuthenticationSettings(uint userId);
|
|
PagedList<User> All(int offset = 0, int limit = 20, string orderBy = "register_date");
|
|
uint Create(User user);
|
|
void CreateAuth(UserAuthenticate auth);
|
|
User GetByEmail(string email);
|
|
void UpdateAuth(UserAuthenticate auth);
|
|
void UpdateLastLogin(uint id, uint last_login);
|
|
|
|
DbAuthAttempt GetRemainingAuth(uint user_id, string ip);
|
|
int FailedConsecutive(uint user_id, string ip);
|
|
int FailedAuth(uint attempt_id, uint delay, int failLimit);
|
|
void NewFailedAuth(uint user_id, string ip, uint delay);
|
|
void SuccessfulAuth(uint user_id, string ip);
|
|
}
|
|
}
|