IW4M-Admin/SharedLibraryCore/Interfaces/ITokenAuthentication.cs

23 lines
827 B
C#
Raw Normal View History

using SharedLibraryCore.Helpers;
namespace SharedLibraryCore.Interfaces
{
public interface ITokenAuthentication
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// 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>
/// <returns>4 character string token</returns>
TokenState GenerateNextToken(long networkId);
/// <summary>
2022-01-26 11:32:16 -05:00
/// authorizes given token
/// </summary>
/// <param name="networkId">network id of the client to authorize</param>
/// <param name="token">token to authorize</param>
/// <returns>true if token authorized successfully, false otherwise</returns>
bool AuthorizeToken(long networkId, string token);
}
}