mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-09 23:00:57 -05:00
update schema to support unique guid + game combinations
This commit is contained in:
@ -10,7 +10,7 @@ namespace SharedLibraryCore.Interfaces
|
||||
Task<T> Delete(T entity);
|
||||
Task<T> Update(T entity);
|
||||
Task<T> Get(int entityID);
|
||||
Task<T> GetUnique(long entityProperty);
|
||||
Task<T> GetUnique(long entityProperty, object altKey);
|
||||
Task<IList<T>> Find(Func<T, bool> expression);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,16 +7,15 @@ namespace SharedLibraryCore.Interfaces
|
||||
/// <summary>
|
||||
/// generates and returns a token for the given network id
|
||||
/// </summary>
|
||||
/// <param name="networkId">network id of the players to generate the token for</param>
|
||||
/// <param name="authInfo">auth information for next token generation</param>
|
||||
/// <returns>4 character string token</returns>
|
||||
TokenState GenerateNextToken(long networkId);
|
||||
TokenState GenerateNextToken(ITokenIdentifier authInfo);
|
||||
|
||||
/// <summary>
|
||||
/// authorizes given token
|
||||
/// </summary>
|
||||
/// <param name="networkId">network id of the client to authorize</param>
|
||||
/// <param name="token">token to authorize</param>
|
||||
/// <param name="authInfo">auth information</param>
|
||||
/// <returns>true if token authorized successfully, false otherwise</returns>
|
||||
bool AuthorizeToken(long networkId, string token);
|
||||
bool AuthorizeToken(ITokenIdentifier authInfo);
|
||||
}
|
||||
}
|
||||
|
11
SharedLibraryCore/Interfaces/ITokenIdentifier.cs
Normal file
11
SharedLibraryCore/Interfaces/ITokenIdentifier.cs
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
using Data.Models;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces;
|
||||
|
||||
public interface ITokenIdentifier
|
||||
{
|
||||
long NetworkId { get; }
|
||||
Reference.Game Game { get; set; }
|
||||
string Token { get; set; }
|
||||
}
|
Reference in New Issue
Block a user